File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -7013,7 +7013,7 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
70137013 " package-external function definition must be serialized" );
70147014 break ;
70157015 case SILLinkage::HiddenExternal:
7016- require (F->isExternalDeclaration (),
7016+ require (F->isExternalDeclaration () || embedded ,
70177017 " hidden-external function cannot have a body" );
70187018 break ;
70197019 }
Original file line number Diff line number Diff line change 1+ // RUN: %empty-directory(%t)
2+ // RUN: %{python} %utils/split_file.py -o %t %s
3+
4+ // RUN: %target-swift-frontend -emit-module -o %t/MyModule.swiftmodule %t/MyModule.swift -enable-experimental-feature Embedded -parse-as-library
5+ // RUN: %target-swift-frontend -c -I %t %t/Main.swift -enable-experimental-feature Embedded -o %t/a.o
6+ // RUN: %target-clang -x c -c %S/Inputs/print.c -o %t/print.o
7+ // RUN: %target-clang %t/a.o %t/print.o -o %t/a.out
8+ // RUN: %target-run %t/a.out | %FileCheck %s
9+
10+ // REQUIRES: swift_in_compiler
11+ // REQUIRES: executable_test
12+ // REQUIRES: OS=macosx || OS=linux-gnu
13+
14+ // BEGIN MyModule.swift
15+
16+ open class Foo {
17+ public init ( ) { }
18+ func test( ) { }
19+ }
20+
21+ // BEGIN Main.swift
22+
23+ import MyModule
24+
25+ class Bar : Foo { }
26+
27+ print ( " OK! " )
28+
29+ // CHECK: OK!
You can’t perform that action at this time.
0 commit comments