You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously package decls at the defition sites were non-resilient.
Now they are resilient by default and are printed in interface as so.
Ref: rdar://118461385
// CHECK-LOAD-PKG-OFF: error: module 'Bar' is in package 'barpkg' but was built from a non-package interface; modules of the same package can only be loaded if built from source or package interface: {{.*}}Bar.private.swiftinterface
46
-
47
-
/// Client loads a private interface since the package-name is different from the loaded module's.
/// Client loads a private interface since package interface doesn't exist. It should error since the loaded module is not built from a package interface.
59
-
// RUN: not %target-swift-frontend -typecheck %t/Client.swift -I %t \
// CHECK-LOAD-PRIV: error: module 'Bar' is in package 'barpkg' but was built from a non-package interface; modules of the same package can only be loaded if built from source or package interface: {{.*}}Bar.private.swiftinterface
66
-
67
-
// RUN: rm -rf %t/*.swiftmodule
68
-
// RUN: rm -rf %t/Bar.private.swiftinterface
69
-
70
-
/// Client loads a public interface since package or private interface doesn't exist.
71
-
/// It should error since the loaded module is not built from a package interface.
72
-
// RUN: not %target-swift-frontend -typecheck %t/Client.swift -I %t \
// CHECK-LOAD-PUB: error: module 'Bar' is in package 'barpkg' but was built from a non-package interface; modules of the same package can only be loaded if built from source or package interface: {{.*}}Bar.swiftinterface
80
-
81
20
82
21
//--- Bar.swift
83
22
publicenumPubEnum{
@@ -94,6 +33,29 @@ public enum PubEnum {
94
33
// CHECK: }
95
34
// CHECK: }
96
35
36
+
@_transparent
37
+
publicfunc pubFunc(arg:PubEnum){
38
+
switch arg {
39
+
case.red:
40
+
print("r")
41
+
case.green:
42
+
print("g")
43
+
@unknowndefault:
44
+
print("def")
45
+
}
46
+
}
47
+
48
+
// CHECK: @_transparent public func pubFunc(arg: Bar.PubEnum) {
0 commit comments