File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
validation-test/compiler_crashers_2_fixed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -1814,6 +1814,11 @@ Expr *CallExpr::getDirectCallee() const {
1814
1814
continue ;
1815
1815
}
1816
1816
1817
+ if (auto ctorCall = dyn_cast<ConstructorRefCallExpr>(fn)) {
1818
+ fn = ctorCall->getFn ();
1819
+ continue ;
1820
+ }
1821
+
1817
1822
return fn;
1818
1823
}
1819
1824
}
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-ir %s
2
+
3
+ struct MyText < V> {
4
+ let label : String
5
+ let value : V
6
+ }
7
+
8
+ extension MyText where V == Void {
9
+ init ( _ label: String , defaulted: Int = 17 ) {
10
+ self . label = label
11
+ self . value = ( )
12
+ }
13
+ }
14
+
15
+ struct ImagePulse {
16
+ @Inspectable ( control: { MyText ( " duration " ) } )
17
+ var test : Double = 0
18
+ }
19
+
20
+ @propertyWrapper
21
+ final class Inspectable < Value> {
22
+ var wrappedValue : Value
23
+
24
+ init < V> ( wrappedValue initialValue: Value , control: @escaping ( ) -> V ) {
25
+ self . wrappedValue = initialValue
26
+ }
27
+ }
You can’t perform that action at this time.
0 commit comments