File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ // Regression test for rdar://164588082
2+
3+ // RUN: %empty-directory(%t)
4+ // RUN: split-file %s %t
5+
6+ // RUN: %target-swift-frontend -verify -verify-additional-file %t%{fs-sep}bar.h -typecheck %t/test.swift -I %t
7+
8+ //--- test.swift
9+ // expected-note@+1{{struct 'Baz' imported as 'private' from 'Bar' here}}
10+ private import Foo. Bar
11+ public import Foo
12+
13+ // expected-error@+2{{function cannot be declared public because its parameter uses a private type}}
14+ // expected-note@+1{{struct 'Baz' is imported by this file as 'private' from 'Bar'}}
15+ public func test( x: Baz ) { }
16+
17+ //--- foo.h
18+ #pragma once
19+ #include " bar.h "
20+
21+ //--- bar.h
22+ #pragma once
23+ // expected-note@+1{{type declared here}}
24+ struct Baz { } ;
25+
26+ //--- module.modulemap
27+ module Foo {
28+ header " foo.h "
29+ export *
30+
31+ explicit module Bar {
32+ header " bar.h "
33+ export *
34+ }
35+ }
You can’t perform that action at this time.
0 commit comments