From eb4795fb8893b88ffcf471849e3353531f2bc13e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 2 Dec 2016 10:53:56 +0100 Subject: 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. --- tests/pos/i1755.scala | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/pos/i1755.scala (limited to 'tests') 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() } +} -- cgit v1.2.3