Skip to content

Commit aa7830f

Browse files
committed
Test that #1065 is fixed.
1 parent 45c7534 commit aa7830f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pos/erasure-array.scala

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// https://github.com/lampepfl/dotty/issues/1065
2+
package hello
3+
4+
object world {
5+
def mkArray(atype: Int): Array[_ <: AnyVal] = {
6+
(if (atype == 1) new Array[Int](10) else new Array[Float](10))
7+
}
8+
9+
def main(args: Array[String]): Unit = {
10+
println(mkArray(1))
11+
}
12+
}

0 commit comments

Comments
 (0)