File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ inline bool isEmbedded(CanType t) {
9090}
9191
9292inline bool isMetadataAllowedInEmbedded (CanType t) {
93- return isa<ClassType>(t) || isa<BoundGenericClassType>(t);
93+ return isa<ClassType>(t) || isa<BoundGenericClassType>(t) ||
94+ isa<DynamicSelfType>(t);
9495}
9596
9697inline bool isEmbedded (Decl *d) {
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-emit-ir %s -enable-experimental-feature Embedded -parse-as-library -module-name main | %FileCheck %s
2+
3+ // REQUIRES: swift_in_compiler
4+ // REQUIRES: VENDOR=apple
5+ // REQUIRES: OS=macosx
6+
7+ class MyClass {
8+ init ( ) {
9+ Self . static_foo ( )
10+ }
11+
12+ static func static_foo( ) { }
13+ }
14+
15+ @main
16+ struct Main {
17+ static func main( ) {
18+ _ = MyClass ( )
19+ }
20+ }
21+
22+ // CHECK: define {{.*}}@main(
You can’t perform that action at this time.
0 commit comments