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 @@ -1282,7 +1282,10 @@ class SILGenApply : public Lowering::ExprVisitor<SILGenApply> {
12821282 CanType superFormalType = arg->getType ()->getCanonicalType ();
12831283
12841284 // The callee for a super call has to be either a method or constructor.
1285+ // There might be one level of conversion in between.
12851286 Expr *fn = apply->getFn ();
1287+ if (auto fnConv = dyn_cast<FunctionConversionExpr>(fn))
1288+ fn = fnConv->getSubExpr ();
12861289 SubstitutionMap substitutions;
12871290 SILDeclRef constant;
12881291 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