From c40302cf0b0545cfe023fd5f8c833114398f8ff7 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 3 Jan 2017 19:12:18 +0700 Subject: Fix #1865: Compute outer path at right phase When computing the outer path, we need to be careful to dealias before erasure, even if the outer path is demanded during erasure. Otherwise we lose prefixes. --- tests/pending/pos/i1865.scala | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/pending/pos/i1865.scala (limited to 'tests/pending/pos/i1865.scala') diff --git a/tests/pending/pos/i1865.scala b/tests/pending/pos/i1865.scala new file mode 100644 index 000000000..1b77558ff --- /dev/null +++ b/tests/pending/pos/i1865.scala @@ -0,0 +1,24 @@ +class AbsCell { + type T = Node + class Node +} + +object Test { + def test: Unit = { + val cell = new AbsCell + new cell.T + } +} + +class AbsCell2 { + type T = Node + val value: T = value + def set(x: T): Unit = {} + class Node +} +object init { + def main = { + val cell = new AbsCell2 { val init = new Node } + cell set (new cell.T) + } +} -- cgit v1.2.3