Skip to content

Commit f40f0b0

Browse files
committed
ModuleInterface: Adopt swiftinterface verification lit substitutions in access-filter.swift. Fix an error caused by conforming to a @usableFromInline protocol using a non-UFI member (this was diagnosed as a warning in Swift 4 and became an error in Swift 5). Also, remove @_hasInitialValue from the expted swiftinterface contents since that attribute isn't emitted for types in resilient modules.
1 parent e10ebca commit f40f0b0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/ModuleInterface/access-filter.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface %s -module-name AccessFilter -requirement-machine-inferred-signatures=on
1+
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name AccessFilter -requirement-machine-inferred-signatures=on
2+
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name AccessFilter
23
// RUN: %FileCheck %s < %t.swiftinterface
34
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
45

@@ -109,7 +110,7 @@ extension UFIProto {
109110

110111
// CHECK: extension AccessFilter.PublicStruct {{[{]$}}
111112
extension PublicStruct {
112-
// CHECK: @_hasInitialValue public static var secretlySettable: Swift.Int {
113+
// CHECK: public static var secretlySettable: Swift.Int {
113114
// CHECK-NEXT: get
114115
// CHECK-NEXT: }
115116
public private(set) static var secretlySettable: Int = 0
@@ -123,12 +124,11 @@ extension InternalStruct_BAD: PublicProto {
123124
// CHECK: extension AccessFilter.UFIStruct : AccessFilter.PublicProto {{[{]$}}
124125
extension UFIStruct: PublicProto {
125126
// CHECK-NEXT: @usableFromInline
126-
// CHECK-NEXT: internal typealias Assoc = Swift.Int
127-
128-
// FIXME: Is it okay for this non-@usableFromInline implementation to satisfy
129-
// the protocol?
130-
func requirement() {}
127+
// CHECK-NEXT: internal func requirement()
128+
@usableFromInline func requirement() {}
131129
internal static var dummy: Int { return 0 }
130+
// CHECK-NEXT: @usableFromInline
131+
// CHECK-NEXT: internal typealias Assoc = Swift.Int
132132
} // CHECK-NEXT: {{^[}]$}}
133133

134134
// CHECK: public enum PublicEnum {{[{]$}}

0 commit comments

Comments
 (0)