aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/pos/i1865.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-01-03 19:12:18 +0700
committerMartin Odersky <odersky@gmail.com>2017-01-03 19:12:34 +0700
commitc40302cf0b0545cfe023fd5f8c833114398f8ff7 (patch)
tree446b2f52ed32fa15be071a710865eb5241775c2d /tests/pending/pos/i1865.scala
parent39c27b6a8aaa2c7303db54011082246ada06c0a0 (diff)
downloaddotty-c40302cf0b0545cfe023fd5f8c833114398f8ff7.tar.gz
dotty-c40302cf0b0545cfe023fd5f8c833114398f8ff7.tar.bz2
dotty-c40302cf0b0545cfe023fd5f8c833114398f8ff7.zip
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.
Diffstat (limited to 'tests/pending/pos/i1865.scala')
-rw-r--r--tests/pending/pos/i1865.scala24
1 files changed, 24 insertions, 0 deletions
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)
+ }
+}