aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-01-03 12:43:22 +0100
committerodersky <odersky@gmail.com>2016-01-03 12:43:22 +0100
commitbe3ab3f0806cea8cd3993ef486ded254d8b00143 (patch)
treead808fe5478f7f623ac5e4e76d5e3c060cdf768d /tests
parent2427f056447ab3f9a0ceaa001353eb0a4067e1bb (diff)
parent8d8fd269a5e798d4951041c2851ee3b7bd33185d (diff)
downloaddotty-be3ab3f0806cea8cd3993ef486ded254d8b00143.tar.gz
dotty-be3ab3f0806cea8cd3993ef486ded254d8b00143.tar.bz2
dotty-be3ab3f0806cea8cd3993ef486ded254d8b00143.zip
Merge pull request #1010 from dotty-staging/fix/new-asSeenFrom
Fix #1009: Do not forget to skolemize some types
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/skolemize.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/neg/skolemize.scala b/tests/neg/skolemize.scala
new file mode 100644
index 000000000..77045cfc4
--- /dev/null
+++ b/tests/neg/skolemize.scala
@@ -0,0 +1,13 @@
+class Inv[T]
+
+class Foo {
+ val foo: Inv[this.type] = new Inv[this.type]
+}
+object Test {
+ def test: Unit = {
+ val e1 = new Foo
+ val f1: Inv[Foo] = e1.foo // error
+ var e2 = new Foo
+ val f2: Inv[Foo] = e2.foo // error
+ }
+}