File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -3850,6 +3850,10 @@ void IRGenSILFunction::visitFullApplySite(FullApplySite site) {
3850
3850
}
3851
3851
}
3852
3852
3853
+ // Lower the arguments and return value in the callee's generic context.
3854
+ GenericContextScope scope (IGM,
3855
+ origCalleeType->getInvocationGenericSignature ());
3856
+
3853
3857
Explosion llArgs;
3854
3858
WitnessMetadata witnessMetadata;
3855
3859
auto emission = getCallEmissionForLoweredValue (
@@ -3862,9 +3866,6 @@ void IRGenSILFunction::visitFullApplySite(FullApplySite site) {
3862
3866
3863
3867
emission->begin ();
3864
3868
3865
- // Lower the arguments and return value in the callee's generic context.
3866
- GenericContextScope scope (IGM, origCalleeType->getInvocationGenericSignature ());
3867
-
3868
3869
auto &calleeFP = emission->getCallee ().getFunctionPointer ();
3869
3870
3870
3871
// Allocate space for the coroutine buffer.
Original file line number Diff line number Diff line change @@ -359,3 +359,15 @@ struct SomeStruct {
359
359
func someFunc( ) async throws ( SmallError) -> SomeStruct {
360
360
SomeStruct ( x: 42 , y: 23 , z: 25 )
361
361
}
362
+
363
+ // Used to crash the compiler -- https://github.com/swiftlang/swift/issues/80732
364
+ protocol PAssoc < T> : AnyObject {
365
+ associatedtype T
366
+ func foo( ) async throws ( SmallError) -> ( any PAssoc < T > )
367
+ }
368
+
369
+ class MyProtocolImpl < T> : PAssoc {
370
+ func foo( ) async throws ( SmallError) -> ( any PAssoc < T > ) {
371
+ fatalError ( )
372
+ }
373
+ }
You can’t perform that action at this time.
0 commit comments