File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1776,6 +1776,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
1776
1776
}
1777
1777
1778
1778
static bool treatAsError = getenv (" ENABLE_PUBLIC_IMPORT_OF_PRIVATE_AS_ERROR" );
1779
+ #ifndef NDEBUG
1780
+ treatAsError = true ;
1781
+ #endif
1779
1782
if (!treatAsError)
1780
1783
inFlight.limitBehavior (DiagnosticBehavior::Warning);
1781
1784
}
Original file line number Diff line number Diff line change 34
34
// RUN: -library-level other -D PUBLIC_IMPORTS
35
35
#if PUBLIC_IMPORTS
36
36
import PublicSwift
37
- import PrivateSwift // expected-warning {{private module 'PrivateSwift' is imported publicly from the public module 'main'}}
37
+ import PrivateSwift // expected-error {{private module 'PrivateSwift' is imported publicly from the public module 'main'}}
38
38
39
39
import PublicClang
40
- import PublicClang_Private // expected-warning {{private module 'PublicClang_Private' is imported publicly from the public module 'main'}}
41
- import FullyPrivateClang // expected-warning {{private module 'FullyPrivateClang' is imported publicly from the public module 'main'}}
40
+ import PublicClang_Private // expected-error {{private module 'PublicClang_Private' is imported publicly from the public module 'main'}}
41
+ import FullyPrivateClang // expected-error {{private module 'FullyPrivateClang' is imported publicly from the public module 'main'}}
42
42
import main // expected-warning{{'implementation-only-import-suggestion.swift' is part of module 'main'; ignoring import}}
43
43
44
44
/// Expect no warnings with implementation-only imports.
You can’t perform that action at this time.
0 commit comments