aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/i583a.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-06-05 17:18:11 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-06 11:05:27 +0200
commit91dd827a726a12395d7b84c03d45ca6822bf8f12 (patch)
treed8acfd662bdea9800664e60e91bf7cc61ae25e4e /tests/pos/i583a.scala
parent0ee8e506dac87bae6ec432b2cd277109df872145 (diff)
downloaddotty-91dd827a726a12395d7b84c03d45ca6822bf8f12.tar.gz
dotty-91dd827a726a12395d7b84c03d45ca6822bf8f12.tar.bz2
dotty-91dd827a726a12395d7b84c03d45ca6822bf8f12.zip
Deskolemize types inferred for vals and defs
We want to establish the invariant (optionally checked by assertNoSkolems) that symbols do not contain skolemized types as their info. This avoids unsoundness situations where a skolem gets exported as part if the result type of a method, so different instantiations look like their are the same instance.
Diffstat (limited to 'tests/pos/i583a.scala')
-rw-r--r--tests/pos/i583a.scala20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/pos/i583a.scala b/tests/pos/i583a.scala
new file mode 100644
index 000000000..a97a3998b
--- /dev/null
+++ b/tests/pos/i583a.scala
@@ -0,0 +1,20 @@
+object Test1 {
+
+ class Box[B](x: B)
+
+ class C {
+ type T
+ val box: Box[T] = ???
+ def f(x: T): T = ???
+ def x: T = ???
+ }
+
+ def c: C = new C
+
+ val b = c.box
+
+ val f = c.f _
+
+}
+
+