aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-02-08 17:17:21 +0100
committerodersky <odersky@gmail.com>2016-02-08 17:17:21 +0100
commit0c4eb3305b0adf82f779f6e88bb01f7274ce00b9 (patch)
treed685173b89ef38ee883aa42bb9f544d0129e6dc5 /tests
parent8aeee17d2b6f24a0c3cc21f858ff60bc47ab2dc1 (diff)
parente384b3af6859c7e2d8481288e293ee9d86a377b9 (diff)
downloaddotty-0c4eb3305b0adf82f779f6e88bb01f7274ce00b9.tar.gz
dotty-0c4eb3305b0adf82f779f6e88bb01f7274ce00b9.tar.bz2
dotty-0c4eb3305b0adf82f779f6e88bb01f7274ce00b9.zip
Merge pull request #1067 from dotty-staging/fix-1065
Fix #1065 erasedLub for arrays of primitives.
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/erasure-array.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/pos/erasure-array.scala b/tests/pos/erasure-array.scala
new file mode 100644
index 000000000..63240e980
--- /dev/null
+++ b/tests/pos/erasure-array.scala
@@ -0,0 +1,12 @@
+// https://github.com/lampepfl/dotty/issues/1065
+package hello
+
+object world {
+ def mkArray(atype: Int): Array[_ <: AnyVal] = {
+ (if (atype == 1) new Array[Int](10) else new Array[Float](10))
+ }
+
+ def main(args: Array[String]): Unit = {
+ println(mkArray(1))
+ }
+}