aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-20 10:20:31 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-20 10:20:31 +0100
commit1d2fe4823bc4c8a69351d49229556ac3a1532778 (patch)
tree796ed0db2c510cf191548fdd0a813acf12e58a0c /tests
parentad4ce030052d6013641eefc9481e50c2ca0b9c2e (diff)
downloaddotty-1d2fe4823bc4c8a69351d49229556ac3a1532778.tar.gz
dotty-1d2fe4823bc4c8a69351d49229556ac3a1532778.tar.bz2
dotty-1d2fe4823bc4c8a69351d49229556ac3a1532778.zip
Remove bogus test on rebasing
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/arrayclone-new.scala38
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/neg/arrayclone-new.scala b/tests/neg/arrayclone-new.scala
deleted file mode 100644
index 0e42545f8..000000000
--- a/tests/neg/arrayclone-new.scala
+++ /dev/null
@@ -1,38 +0,0 @@
-// Run with -explaintypes to see information about shadowing failures
-import scala.reflect.{ClassTag, classTag}
-
-object Test extends dotty.runtime.LegacyApp{
- ObjectArrayClone;
- PolymorphicArrayClone;
-}
-
-object ObjectArrayClone{
- val it : Array[String] = Array("1", "0"); // error
- val cloned = it.clone();
- assert(cloned.sameElements(it));
- cloned(0) = "0";
- assert(it(0) == "1")
-}
-
-object PolymorphicArrayClone{
- def testIt[T](it : Array[T], one : T, zero : T) = {
- val cloned = it.clone();
- assert(cloned.sameElements(it));
- cloned(0) = zero;
- assert(it(0) == one)
- }
-
- testIt(Array("one", "two"), "one", "two"); // error
-
- class Mangler[T: ClassTag](ts : T*){
- // this will always be a BoxedAnyArray even after we've unboxed its contents.
- val it = ts.toArray[T];
- }
-
- val mangled = new Mangler[Int](0, 1);
-
- val y : Array[Int] = mangled.it; // make sure it's unboxed
-
- testIt(mangled.it, 0, 1);
-}
-