File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -4312,7 +4312,7 @@ namespace {
4312
4312
StringRef (stringCopy, compatStringBuf.size ()),
4313
4313
SourceRange (),
4314
4314
/* implicit*/ true );
4315
- cs.setType (stringExpr, cs.getType (E ));
4315
+ cs.setType (stringExpr, TypeChecker::getStringType ( cs.getASTContext () ));
4316
4316
E->setObjCStringLiteralExpr (stringExpr);
4317
4317
}
4318
4318
}
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -typecheck -verify
2
+ // REQUIRES: objc_interop
3
+
4
+ import Foundation
5
+
6
+ @objc class A : NSObject {
7
+ @objc var x : Int = 42
8
+ }
9
+
10
+ @propertyWrapper
11
+ struct Attr < V> {
12
+ var wrappedValue : V {
13
+ get { fatalError ( ) }
14
+ }
15
+
16
+ init ( wrappedValue: V , key: KeyPath < A , V > ) { }
17
+ }
18
+
19
+ class B {
20
+ @Attr ( key: \. x) var y : Int = 0 // Ok
21
+ }
You can’t perform that action at this time.
0 commit comments