From 82a6d6f52065ae39a0a162f95e5002a6ab26cc55 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Fri, 2 Oct 2015 23:25:30 +0200 Subject: TypeAssigner#avoid: do not lose type parameters when the base type changes. Fixes #741. --- tests/pos/escapingRefs.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/pos/escapingRefs.scala') 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] + } } } -- cgit v1.2.3