mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
// RUN: %target-swift-frontend -typecheck -emit-module-interface-path %t.swiftinterface %s -module-name AccessFilter -requirement-machine-inferred-signatures=on
|
||||
// RUN: %target-swift-emit-module-interface(%t.swiftinterface) %s -module-name AccessFilter -requirement-machine-inferred-signatures=on
|
||||
// RUN: %target-swift-typecheck-module-from-interface(%t.swiftinterface) -module-name AccessFilter
|
||||
// RUN: %FileCheck %s < %t.swiftinterface
|
||||
// RUN: %FileCheck -check-prefix NEGATIVE %s < %t.swiftinterface
|
||||
|
||||
@@ -109,7 +110,7 @@ extension UFIProto {
|
||||
|
||||
// CHECK: extension AccessFilter.PublicStruct {{[{]$}}
|
||||
extension PublicStruct {
|
||||
// CHECK: @_hasInitialValue public static var secretlySettable: Swift.Int {
|
||||
// CHECK: public static var secretlySettable: Swift.Int {
|
||||
// CHECK-NEXT: get
|
||||
// CHECK-NEXT: }
|
||||
public private(set) static var secretlySettable: Int = 0
|
||||
@@ -123,12 +124,11 @@ extension InternalStruct_BAD: PublicProto {
|
||||
// CHECK: extension AccessFilter.UFIStruct : AccessFilter.PublicProto {{[{]$}}
|
||||
extension UFIStruct: PublicProto {
|
||||
// CHECK-NEXT: @usableFromInline
|
||||
// CHECK-NEXT: internal typealias Assoc = Swift.Int
|
||||
|
||||
// FIXME: Is it okay for this non-@usableFromInline implementation to satisfy
|
||||
// the protocol?
|
||||
func requirement() {}
|
||||
// CHECK-NEXT: internal func requirement()
|
||||
@usableFromInline func requirement() {}
|
||||
internal static var dummy: Int { return 0 }
|
||||
// CHECK-NEXT: @usableFromInline
|
||||
// CHECK-NEXT: internal typealias Assoc = Swift.Int
|
||||
} // CHECK-NEXT: {{^[}]$}}
|
||||
|
||||
// CHECK: public enum PublicEnum {{[{]$}}
|
||||
|
||||
Reference in New Issue
Block a user