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> {
13031303 CanType superFormalType = arg->getType ()->getCanonicalType ();
13041304
13051305 // The callee for a super call has to be either a method or constructor.
1306+ // There might be one level of conversion in between.
13061307 Expr *fn = apply->getFn ();
1308+ if (auto fnConv = dyn_cast<FunctionConversionExpr>(fn))
1309+ fn = fnConv->getSubExpr ();
13071310 SubstitutionMap substitutions;
13081311 SILDeclRef constant;
13091312 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