diff options
author | Martin Odersky <odersky@gmail.com> | 2015-10-30 09:00:49 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-10-30 09:00:49 +0100 |
commit | 4f9b5cc0b785e8a4e5375407b695278fecb94588 (patch) | |
tree | daf9edc90ab92252cdd7a7e9e01b548632d5dd61 /tests | |
parent | 32f31b8924d16074679bfa0857019d3ba078c4a2 (diff) | |
download | dotty-4f9b5cc0b785e8a4e5375407b695278fecb94588.tar.gz dotty-4f9b5cc0b785e8a4e5375407b695278fecb94588.tar.bz2 dotty-4f9b5cc0b785e8a4e5375407b695278fecb94588.zip |
Add missing test file.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/typedIdents/typedIdents.scala | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/pos/typedIdents/typedIdents.scala b/tests/pos/typedIdents/typedIdents.scala new file mode 100644 index 000000000..95b9f1b63 --- /dev/null +++ b/tests/pos/typedIdents/typedIdents.scala @@ -0,0 +1,28 @@ +package P { // `X' bound by package clause + import Console._ // `println' bound by wildcard import + object A { + println("L4: " + X) // `X' refers to `P.X' here + object B { + import Q._ // `X' bound by wildcard import + println("L7: " + X) // `X' refers to `Q.X' here + import X._ // `x' and `y' bound by wildcard import + println("L8: " + x) // `x' refers to `Q.X.x' here + object C { + val x = 3 // `x' bound by local definition + println("L12: " + x) // `x' refers to constant `3' here + locally { + import Q.X._ // `x' and `y' bound by wildcard import + // println("L14: " + x) // reference to `x' is ambiguous here + import X.y // `y' bound by explicit import + println("L16: " + y) // `y' refers to `Q.X.y' here + locally { + val x = "abc" // `x' bound by local definition + import P.X._ // `x' and `y' bound by wildcard import + // println("L19: " + y) // reference to `y' is ambiguous here + println("L20: " + x) // `x' refers to string ``abc'' here + } + } + } + } + } +} |