aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-10-02 23:25:30 +0200
committerGuillaume Martres <smarter@ubuntu.com>2015-10-09 15:00:08 +0200
commit82a6d6f52065ae39a0a162f95e5002a6ab26cc55 (patch)
treef9a3667539ccc93d1aabc1031c60ed5575b32fde /tests
parentd1014c3a2cf87b783f383e52b8923a42ee1bc31c (diff)
downloaddotty-82a6d6f52065ae39a0a162f95e5002a6ab26cc55.tar.gz
dotty-82a6d6f52065ae39a0a162f95e5002a6ab26cc55.tar.bz2
dotty-82a6d6f52065ae39a0a162f95e5002a6ab26cc55.zip
TypeAssigner#avoid: do not lose type parameters when the base type changes.
Fixes #741.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/escapingRefs.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/escapingRefs.scala b/tests/pos/escapingRefs.scala
index 684dba868..1b1deb8de 100644
--- a/tests/pos/escapingRefs.scala
+++ b/tests/pos/escapingRefs.scala
@@ -6,6 +6,8 @@ class Outer {
class HasA { type A }
+class Foo[A]
+
object Test {
def test = {
val a: Outer#Inner = {
@@ -26,5 +28,15 @@ object Test {
val x: HasA { type A = h.A } = h
x
}
+
+ val d: Foo[Int] = {
+ class Bar[B] extends Foo[B]
+ new Bar[Int]
+ }
+
+ val e: Foo[_] = {
+ class Bar[B] extends Foo[B]
+ new Bar[Int]: Bar[_ <: Int]
+ }
}
}