From 0cd801ae0d75b7024d899e0d4c15576184c571be Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Fri, 7 Nov 2014 19:53:51 +1000 Subject: SI-7750 Test case for fixed spurious existential feature warning In 2.11.0-M8, the enclosed test issued the following feature warning: sandbox/t7750.scala:7: warning: the existential type LazyCombiner[_$1,_$2,_$3] forSome { type _$1; type _$2; type _$3 <: Growable[_$1] with Sizing }, which cannot be expressed by wildcards, This went way in 2.11.0-RC1 after we turned off the problematic attempt to infer existential bounds based on the bounds of the corresponding type parameters. --- test/files/pos/t7750.flags | 1 + test/files/pos/t7750.scala | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 test/files/pos/t7750.flags create mode 100644 test/files/pos/t7750.scala (limited to 'test/files/pos') diff --git a/test/files/pos/t7750.flags b/test/files/pos/t7750.flags new file mode 100644 index 0000000000..b216e74c97 --- /dev/null +++ b/test/files/pos/t7750.flags @@ -0,0 +1 @@ +-Xfatal-warnings -feature diff --git a/test/files/pos/t7750.scala b/test/files/pos/t7750.scala new file mode 100644 index 0000000000..befec76949 --- /dev/null +++ b/test/files/pos/t7750.scala @@ -0,0 +1,8 @@ +trait LazyCombiner[Elem, +To, Buff <: Growable[Elem] with Sizing] +trait Growable[T] +trait Sizing + + +object Test { + null.isInstanceOf[LazyCombiner[_, _, _]] // issued an existential feature warning +} -- cgit v1.2.3