Files
swift-mirror/test/attr/attr_usableFromInline_protocol_hole.swift
Henrik G. Olsson cbc0ec3b88 Add -verify-ignore-unrelated where necessary (NFC)
These are tests that fail in the next commit without this flag. This
does not add -verify-ignore-unrelated to all tests with -verify, only
the ones that would fail without it. This is NFC since this flag is
currently a no-op.
2025-10-04 14:19:52 -07:00

24 lines
879 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -o %t/Lib.swiftmodule %S/Inputs/attr_usableFromInline_protocol_hole_helper.swift
// RUN: %target-typecheck-verify-swift -verify-ignore-unrelated -I %t -verify-ignore-unknown
import Lib
func test(_ obj: PublicProtocol) {
obj.publicExtensionMethod()
obj.ufiExtensionMethod() // expected-error {{inaccessible}}
obj.internalExtensionMethod() // expected-error {{inaccessible}}
}
func test(_ obj: PublicImpl) {
obj.publicExtensionMethod()
obj.ufiExtensionMethod() // expected-error {{inaccessible}}
obj.internalExtensionMethod() // expected-error {{inaccessible}}
}
func test(_ obj: UFIImpl) {
obj.publicExtensionMethod() // This being accessible is the "hole".
obj.ufiExtensionMethod() // expected-error {{inaccessible}}
obj.internalExtensionMethod() // expected-error {{inaccessible}}
}