Skip to content

Commit 11acdd9

Browse files
Merge pull request #6860 from dotty-staging/fix-#6854
Fix #6854: Add regression test
2 parents fb24ecb + 7d011e5 commit 11acdd9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/neg/i6854.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
object Test {
2+
import Lib._
3+
val xs: IArray2[Int] = IArray2(1)
4+
}
5+
6+
object Lib {
7+
opaque type IArray2[+T] = Array[_ <: T]
8+
9+
object IArray2 {
10+
inline def apply(x: =>Int): IArray2[Int] = Array(x) // error
11+
}
12+
}

0 commit comments

Comments
 (0)