diff options
author | Martin Odersky <odersky@gmail.com> | 2017-02-01 17:18:13 +1100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-02-01 17:48:32 +1100 |
commit | e34555f69e7cdd6d19d0d1ed969127f4ee65c36e (patch) | |
tree | 9b3011bf3074f1d1d8e7d815814b8ed370d98639 /tests/run | |
parent | b11e6d678a92187e5e9f821ba1116cec2cce0f8c (diff) | |
download | dotty-e34555f69e7cdd6d19d0d1ed969127f4ee65c36e.tar.gz dotty-e34555f69e7cdd6d19d0d1ed969127f4ee65c36e.tar.bz2 dotty-e34555f69e7cdd6d19d0d1ed969127f4ee65c36e.zip |
Disallow taking a class tag of Nothing or Null.
It seems in most cases this leads to weird behavior and cause
confusing error messages later.
It also means we cannot create an Array[Nothing], except by
passing the classtag explicitly.
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/array-addition.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/run/array-addition.scala b/tests/run/array-addition.scala index 8def48e85..09a1b0bad 100644 --- a/tests/run/array-addition.scala +++ b/tests/run/array-addition.scala @@ -4,8 +4,8 @@ object Test { def main(args: Array[String]): Unit = { prettyPrintArray(Array(1,2,3) :+ 4) prettyPrintArray(1 +: Array(2,3,4)) - prettyPrintArray(Array() :+ 1) - prettyPrintArray(1 +: Array()) + prettyPrintArray(Array[Int]() :+ 1) + prettyPrintArray(1 +: Array[Int]()) } } |