diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-02-08 15:04:07 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2016-02-08 15:14:30 +0100 |
commit | e384b3af6859c7e2d8481288e293ee9d86a377b9 (patch) | |
tree | 38db4b17384c7d96a1d18014d25b02e7b6a842e0 /tests | |
parent | 692cd5a349f44d9862d607ed69eada0bef04bb23 (diff) | |
download | dotty-e384b3af6859c7e2d8481288e293ee9d86a377b9.tar.gz dotty-e384b3af6859c7e2d8481288e293ee9d86a377b9.tar.bz2 dotty-e384b3af6859c7e2d8481288e293ee9d86a377b9.zip |
Test that #1065 is fixed.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/erasure-array.scala | 12 |
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)) + } +} |