Files
swift-mirror/test/decl/import/Inputs/inconsistent-implementation-only/2.swift
Jordan Rose 9647483aee Warn when using '@_implementationOnly' inconsistently in a module (#24800)
I thought it would be useful to allow some uses of a module to be
'@_implementationOnly' and others to not be in case someone wanted to
change from one to the other gradually, but it turns out that if
you're trying to /make/ an import implementation-only, you want to
know everywhere you used it.

rdar://problem/50748157
2019-05-16 09:13:34 -07:00

9 lines
504 B
Swift

import NotSoSecret // expected-warning {{'NotSoSecret' inconsistently imported as implementation-only}}
@_implementationOnly import NotSoSecret2 // expected-note 2 {{imported as implementation-only here}}
import NotSoSecret3 // expected-warning {{'NotSoSecret3' inconsistently imported as implementation-only}}
@_implementationOnly import ActuallySecret // no-warning
import ActuallyOkay // no-warning
@_implementationOnly import Contradictory // expected-note {{imported as implementation-only here}}