Skip to content

Commit 4f9b5cc

Browse files
committed
Add missing test file.
1 parent 32f31b8 commit 4f9b5cc

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package P { // `X' bound by package clause
2+
import Console._ // `println' bound by wildcard import
3+
object A {
4+
println("L4: " + X) // `X' refers to `P.X' here
5+
object B {
6+
import Q._ // `X' bound by wildcard import
7+
println("L7: " + X) // `X' refers to `Q.X' here
8+
import X._ // `x' and `y' bound by wildcard import
9+
println("L8: " + x) // `x' refers to `Q.X.x' here
10+
object C {
11+
val x = 3 // `x' bound by local definition
12+
println("L12: " + x) // `x' refers to constant `3' here
13+
locally {
14+
import Q.X._ // `x' and `y' bound by wildcard import
15+
// println("L14: " + x) // reference to `x' is ambiguous here
16+
import X.y // `y' bound by explicit import
17+
println("L16: " + y) // `y' refers to `Q.X.y' here
18+
locally {
19+
val x = "abc" // `x' bound by local definition
20+
import P.X._ // `x' and `y' bound by wildcard import
21+
// println("L19: " + y) // reference to `y' is ambiguous here
22+
println("L20: " + x) // `x' refers to string ``abc'' here
23+
}
24+
}
25+
}
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)