File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1303,7 +1303,10 @@ class SILGenApply : public Lowering::ExprVisitor<SILGenApply> {
1303
1303
CanType superFormalType = arg->getType ()->getCanonicalType ();
1304
1304
1305
1305
// The callee for a super call has to be either a method or constructor.
1306
+ // There might be one level of conversion in between.
1306
1307
Expr *fn = apply->getFn ();
1308
+ if (auto fnConv = dyn_cast<FunctionConversionExpr>(fn))
1309
+ fn = fnConv->getSubExpr ();
1307
1310
SubstitutionMap substitutions;
1308
1311
SILDeclRef constant;
1309
1312
if (auto *ctorRef = dyn_cast<OtherConstructorDeclRefExpr>(fn)) {
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -emit-silgen %s -module-name test -swift-version 5 -disable-availability-checking | %FileCheck --enable-var-scope %s
2
+ // REQUIRES: concurrency
3
+
4
+ actor MyActor { }
5
+
6
+ @globalActor
7
+ struct GlobalActor {
8
+ static var shared : MyActor = MyActor ( )
9
+ }
10
+
11
+ @GlobalActor
12
+ class Super {
13
+ func f( ) { }
14
+ }
15
+
16
+ @GlobalActor
17
+ class Sub : Super {
18
+ // CHECK-LABEL: sil hidden [ossa] @$s4test3SubC1fyyF : $@convention(method) (@guaranteed Sub) -> ()
19
+ // CHECK: function_ref @$s4test5SuperC1fyyF
20
+ // CHECK-NEXT: apply
21
+ override func f( ) {
22
+ super. f ( )
23
+ }
24
+ }
You can’t perform that action at this time.
0 commit comments