File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ package class Base {
2+ package func packageMethod( ) { }
3+ internal func internalMethod( ) { }
4+ }
Original file line number Diff line number Diff line change 1+ // RUN: %empty-directory(%t)
2+
3+ // RUN: %target-swift-frontend -emit-silgen %S/Inputs/accessibility_vtables_package_helper.swift -package-name Package | %FileCheck %s --check-prefix=LIBRARY
4+ // RUN: %target-swift-frontend -enable-library-evolution -emit-silgen %S/Inputs/accessibility_vtables_package_helper.swift -package-name Package | %FileCheck %s --check-prefix=LIBRARY
5+
6+ // RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/accessibility_vtables_package_helper.swift -package-name Package
7+ // RUN: %target-swift-emit-silgen -primary-file %s -I %t -package-name Package | %FileCheck %s --check-prefix=CLIENT
8+
9+ // RUN: %target-swift-frontend -enable-library-evolution -emit-module -o %t %S/Inputs/accessibility_vtables_package_helper.swift -package-name Package
10+ // RUN: %target-swift-emit-silgen -primary-file %s -I %t -package-name Package | %FileCheck %s --check-prefix=CLIENT
11+
12+ import accessibility_vtables_package_helper
13+
14+ // LIBRARY-LABEL: sil_vtable Base {
15+ // LIBRARY-NEXT: #Base.packageMethod: (Base) -> () -> () : @$s36accessibility_vtables_package_helper4BaseC0C6MethodyyF
16+ // LIBRARY-NEXT: #Base.internalMethod: (Base) -> () -> () : @$s36accessibility_vtables_package_helper4BaseC14internalMethodyyF
17+ // LIBRARY-NEXT: #Base.init!allocator: (Base.Type) -> () -> Base : @$s36accessibility_vtables_package_helper4BaseCACycfC
18+ // LIBRARY-NEXT: #Base.deinit!deallocator: @$s36accessibility_vtables_package_helper4BaseCfD
19+ // LIBRARY-NEXT: }
20+
21+ // CLIENT-LABEL: sil hidden [ossa] @$s29accessibility_vtables_package15usePackageClassyy0a1_b1_C7_helper4BaseCF : $@convention(thin) (@guaranteed Base) -> () {
22+ func usePackageClass( _ c: Base ) {
23+ c. packageMethod ( )
24+ }
25+
26+ // TODO: If cross-module inheritance from package visibility superclasses ever becomes a thing,
27+ // test serialization of the vtable for the derived class in this file.
You can’t perform that action at this time.
0 commit comments