From e41bf5d44a24f8a3d8faea1b8de0e10c86f92dc0 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Thu, 9 Jan 2020 11:53:23 +0100 Subject: [PATCH] Fix #6126: Add regression test --- tests/pos/i6126.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/pos/i6126.scala diff --git a/tests/pos/i6126.scala b/tests/pos/i6126.scala new file mode 100644 index 000000000000..2997aa152a3b --- /dev/null +++ b/tests/pos/i6126.scala @@ -0,0 +1,9 @@ +class Test { + class Foo[+T](val x: T) + + def unfoo[T](foo: Foo[T]): T = foo.x + + def fooArray: Foo[Array[Object]] = new Foo(Array.empty[Object]) + + unfoo(fooArray) ++ unfoo(fooArray) +}