Skip to content

Commit f25e678

Browse files
committed
Add a regression test for use of unexported fully-qualified paths
An unexported foo.baz can't be resolved from inside foo when called as foo.baz instead of just baz. This behavior may want to change eventually.
1 parent a697210 commit f25e678

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// xfail-boot
2+
// error-pattern: unresolved name
3+
4+
// In this test baz isn't resolved when called as foo.baz even though
5+
// it's called from inside foo. This is somewhat surprising and may
6+
// want to change eventually.
7+
8+
mod foo {
9+
10+
export bar;
11+
12+
fn bar() {
13+
foo.baz();
14+
}
15+
16+
fn baz() {
17+
}
18+
}
19+
20+
fn main() {
21+
}

0 commit comments

Comments
 (0)