Skip to content

Commit e384b3a

Browse files
committed
Test that #1065 is fixed.
1 parent 692cd5a commit e384b3a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pos/erasure-array.scala

Lines changed: 12 additions & 0 deletions
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)