aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i1755.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-12-02 10:53:56 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-02 10:53:56 +0100
commiteb4795fb8893b88ffcf471849e3353531f2bc13e (patch)
tree424624b9d06298219d7e9c284f3c181b97900365 /tests/pos/i1755.scala
parent47d208448e614125446c7f294f8231c3fb7108d6 (diff)
downloaddotty-eb4795fb8893b88ffcf471849e3353531f2bc13e.tar.gz
dotty-eb4795fb8893b88ffcf471849e3353531f2bc13e.tar.bz2
dotty-eb4795fb8893b88ffcf471849e3353531f2bc13e.zip
Fix #1755: Make sure references in outer args are accessible
Needed a fixup action in ExplicitOuter to avoid references to module's This from outside their scope. The problem is fixed, but I wish I understood better the root cause.
Diffstat (limited to 'tests/pos/i1755.scala')
-rw-r--r--tests/pos/i1755.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/pos/i1755.scala b/tests/pos/i1755.scala
new file mode 100644
index 000000000..1361ebeec
--- /dev/null
+++ b/tests/pos/i1755.scala
@@ -0,0 +1,21 @@
+class hierarOverload {
+ trait AB {
+ type TB
+ protected trait A { val entities: List[TB] }
+ protected trait B
+ }
+ object NAnB {
+ type TB = nB
+ type TA = nA
+ class nA { List[nB]() }
+ class nB {}
+ }
+ def foo = { val t = new NAnB.TB() }
+}
+class hierarOverload2 {
+ object NAnB {
+ type TB = nB
+ class nB
+ }
+ def foo = { val t = new NAnB.TB() }
+}