From 7d011e562aea9956cb0329a97466ca5fc8dc52f5 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Tue, 16 Jul 2019 13:11:15 +0200 Subject: [PATCH] Fix #6854: Add regression test --- tests/neg/i6854.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/neg/i6854.scala diff --git a/tests/neg/i6854.scala b/tests/neg/i6854.scala new file mode 100644 index 000000000000..00e960bb670b --- /dev/null +++ b/tests/neg/i6854.scala @@ -0,0 +1,12 @@ +object Test { + import Lib._ + val xs: IArray2[Int] = IArray2(1) +} + +object Lib { + opaque type IArray2[+T] = Array[_ <: T] + + object IArray2 { + inline def apply(x: =>Int): IArray2[Int] = Array(x) // error + } +}