File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 2ff5de58b24d11ec51da7c8ea0d51511e740cce3
2
+ refs/heads/master: 3f44b65bb3304d4f6c44dfe82ef64ceaf9e57efb
3
3
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
Original file line number Diff line number Diff line change @@ -1431,8 +1431,6 @@ namespace {
1431
1431
// Create the allocating setter function. It captures the base address.
1432
1432
auto setterInfo = SGF.getConstantInfo (setter);
1433
1433
SILValue setterFRef = SGF.emitGlobalFunctionRef (loc, setter, setterInfo);
1434
- auto setterSubs = SGF.getFunction ().getForwardingSubstitutionMap ();
1435
-
1436
1434
CanSILFunctionType setterTy = setterFRef->getType ().castTo <SILFunctionType>();
1437
1435
SILFunctionConventions setterConv (setterTy, SGF.SGM .M );
1438
1436
@@ -1446,7 +1444,7 @@ namespace {
1446
1444
1447
1445
PartialApplyInst *setterPAI =
1448
1446
SGF.B .createPartialApply (loc, setterFRef,
1449
- setterSubs , { capturedBase },
1447
+ Substitutions , { capturedBase },
1450
1448
ParameterConvention::Direct_Guaranteed);
1451
1449
ManagedValue setterFn = SGF.emitManagedRValueWithCleanup (setterPAI);
1452
1450
Original file line number Diff line number Diff line change @@ -61,6 +61,12 @@ struct IntStruct {
61
61
}
62
62
wrapped = 27
63
63
}
64
+
65
+ // Check that we don't crash if the function has unrelated generic parameters.
66
+ // SR-11484
67
+ mutating func setit< V> ( _ v: V ) {
68
+ wrapped = 5
69
+ }
64
70
}
65
71
66
72
final class IntClass {
@@ -142,10 +148,15 @@ func testIntStruct() {
142
148
143
149
// CHECK-NEXT: .. init 42
144
150
// CHECK-NEXT: .. set 27
145
- let t1 = IntStruct ( )
151
+ var t1 = IntStruct ( )
146
152
// CHECK-NEXT: 27
147
153
print ( t1. wrapped)
148
154
155
+ // CHECK-NEXT: .. set 5
156
+ t1. setit ( false )
157
+ // CHECK-NEXT: 5
158
+ print ( t1. wrapped)
159
+
149
160
// CHECK-NEXT: .. init 42
150
161
let t2 = IntStruct ( conditional: false )
151
162
// CHECK-NEXT: 42
You can’t perform that action at this time.
0 commit comments