summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/disabled/neg/macro-keyword-bind.check7
-rw-r--r--test/disabled/neg/macro-keyword-bind.flags1
-rw-r--r--test/disabled/neg/macro-keyword-bind.scala6
-rw-r--r--test/disabled/neg/macro-keyword-class1.check4
-rw-r--r--test/disabled/neg/macro-keyword-class1.flags1
-rw-r--r--test/disabled/neg/macro-keyword-class1.scala3
-rw-r--r--test/disabled/neg/macro-keyword-class2.check4
-rw-r--r--test/disabled/neg/macro-keyword-class2.flags1
-rw-r--r--test/disabled/neg/macro-keyword-class2.scala3
-rw-r--r--test/disabled/neg/macro-keyword-object1.check4
-rw-r--r--test/disabled/neg/macro-keyword-object1.flags1
-rw-r--r--test/disabled/neg/macro-keyword-object1.scala3
-rw-r--r--test/disabled/neg/macro-keyword-object2.check4
-rw-r--r--test/disabled/neg/macro-keyword-object2.flags1
-rw-r--r--test/disabled/neg/macro-keyword-object2.scala3
-rw-r--r--test/disabled/neg/macro-keyword-package1.check4
-rw-r--r--test/disabled/neg/macro-keyword-package1.flags1
-rw-r--r--test/disabled/neg/macro-keyword-package1.scala3
-rw-r--r--test/disabled/neg/macro-keyword-package2.check4
-rw-r--r--test/disabled/neg/macro-keyword-package2.flags1
-rw-r--r--test/disabled/neg/macro-keyword-package2.scala3
-rw-r--r--test/disabled/neg/macro-keyword-trait1.check4
-rw-r--r--test/disabled/neg/macro-keyword-trait1.flags1
-rw-r--r--test/disabled/neg/macro-keyword-trait1.scala3
-rw-r--r--test/disabled/neg/macro-keyword-trait2.check4
-rw-r--r--test/disabled/neg/macro-keyword-trait2.flags1
-rw-r--r--test/disabled/neg/macro-keyword-trait2.scala3
-rw-r--r--test/disabled/neg/macro-keyword-type.check4
-rw-r--r--test/disabled/neg/macro-keyword-type.flags1
-rw-r--r--test/disabled/neg/macro-keyword-type.scala3
-rw-r--r--test/disabled/neg/macro-keyword-val.check7
-rw-r--r--test/disabled/neg/macro-keyword-val.flags1
-rw-r--r--test/disabled/neg/macro-keyword-val.scala3
-rw-r--r--test/disabled/neg/macro-keyword-var.check7
-rw-r--r--test/disabled/neg/macro-keyword-var.flags1
-rw-r--r--test/disabled/neg/macro-keyword-var.scala3
-rw-r--r--test/files/jvm/manifests.check56
-rw-r--r--test/files/jvm/manifests.check.temporarily.disabled55
-rw-r--r--test/files/jvm/manifests.scala (renamed from test/files/jvm/manifests.scala.temporarily.disabled)9
-rw-r--r--test/files/neg/t3507.check4
-rw-r--r--test/files/pos/implicits.scala (renamed from test/files/pos/implicits.scala.temporarily.disabled)0
-rw-r--r--test/files/pos/manifest1.scala (renamed from test/files/pos/manifest1.scala.temporarily.disabled)0
-rw-r--r--test/files/run/existentials3.check24
-rw-r--r--test/files/run/existentials3.check.temporarily.disabled22
-rw-r--r--test/files/run/existentials3.scala (renamed from test/files/run/existentials3.scala.temporarily.disabled)20
-rw-r--r--test/files/run/t1195.check6
-rw-r--r--test/files/run/t1195.check.temporarily.disabled6
-rw-r--r--test/files/run/t1195.scala (renamed from test/files/run/t1195.scala.temporarily.disabled)4
-rw-r--r--test/files/run/t3507.check1
-rw-r--r--test/files/run/t3507.scala (renamed from test/files/neg/t3507.scala)6
-rw-r--r--test/files/run/t3835.scala9
-rw-r--r--test/files/run/t4110.check2
-rw-r--r--test/files/run/t4110.check.temporarily.disabled2
-rw-r--r--test/files/run/t4110.scala (renamed from test/files/run/t4110.scala.temporarily.disabled)0
-rw-r--r--test/files/run/treePrint.check (renamed from test/files/run/treePrint.check.temporarily.disabled)0
-rw-r--r--test/files/run/treePrint.scala (renamed from test/files/run/treePrint.scala.temporarily.disabled)11
56 files changed, 126 insertions, 219 deletions
diff --git a/test/disabled/neg/macro-keyword-bind.check b/test/disabled/neg/macro-keyword-bind.check
deleted file mode 100644
index 1f74cfe5cd..0000000000
--- a/test/disabled/neg/macro-keyword-bind.check
+++ /dev/null
@@ -1,7 +0,0 @@
-macro-keyword-bind.scala:2: error: illegal start of simple pattern
- val Some(macro) = Some(42)
- ^
-macro-keyword-bind.scala:6: error: ')' expected but '}' found.
-}
-^
-two errors found
diff --git a/test/disabled/neg/macro-keyword-bind.flags b/test/disabled/neg/macro-keyword-bind.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-bind.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-bind.scala b/test/disabled/neg/macro-keyword-bind.scala
deleted file mode 100644
index a3b1553348..0000000000
--- a/test/disabled/neg/macro-keyword-bind.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-object Test12 {
- val Some(macro) = Some(42)
- macro match {
- case macro => println(macro)
- }
-} \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-class1.check b/test/disabled/neg/macro-keyword-class1.check
deleted file mode 100644
index d8983180ef..0000000000
--- a/test/disabled/neg/macro-keyword-class1.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-class1.scala:3: error: identifier expected but 'macro' found.
-class macro
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-class1.flags b/test/disabled/neg/macro-keyword-class1.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-class1.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-class1.scala b/test/disabled/neg/macro-keyword-class1.scala
deleted file mode 100644
index 8635d1f4f6..0000000000
--- a/test/disabled/neg/macro-keyword-class1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package test4
-
-class macro
diff --git a/test/disabled/neg/macro-keyword-class2.check b/test/disabled/neg/macro-keyword-class2.check
deleted file mode 100644
index 0e4d11bcc4..0000000000
--- a/test/disabled/neg/macro-keyword-class2.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-class2.scala:2: error: identifier expected but 'macro' found.
- class macro
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-class2.flags b/test/disabled/neg/macro-keyword-class2.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-class2.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-class2.scala b/test/disabled/neg/macro-keyword-class2.scala
deleted file mode 100644
index af24a489d0..0000000000
--- a/test/disabled/neg/macro-keyword-class2.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test5 {
- class macro
-}
diff --git a/test/disabled/neg/macro-keyword-object1.check b/test/disabled/neg/macro-keyword-object1.check
deleted file mode 100644
index cfbd06ffd6..0000000000
--- a/test/disabled/neg/macro-keyword-object1.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-object1.scala:3: error: identifier expected but 'macro' found.
-object macro
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-object1.flags b/test/disabled/neg/macro-keyword-object1.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-object1.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-object1.scala b/test/disabled/neg/macro-keyword-object1.scala
deleted file mode 100644
index 66eb494e6b..0000000000
--- a/test/disabled/neg/macro-keyword-object1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package test6
-
-object macro
diff --git a/test/disabled/neg/macro-keyword-object2.check b/test/disabled/neg/macro-keyword-object2.check
deleted file mode 100644
index ede31f13e5..0000000000
--- a/test/disabled/neg/macro-keyword-object2.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-object2.scala:2: error: identifier expected but 'macro' found.
- object macro
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-object2.flags b/test/disabled/neg/macro-keyword-object2.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-object2.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-object2.scala b/test/disabled/neg/macro-keyword-object2.scala
deleted file mode 100644
index 6f5b9ceacd..0000000000
--- a/test/disabled/neg/macro-keyword-object2.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test7 {
- object macro
-}
diff --git a/test/disabled/neg/macro-keyword-package1.check b/test/disabled/neg/macro-keyword-package1.check
deleted file mode 100644
index 22c1e11ded..0000000000
--- a/test/disabled/neg/macro-keyword-package1.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-package1.scala:1: error: identifier expected but 'macro' found.
-package macro
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-package1.flags b/test/disabled/neg/macro-keyword-package1.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-package1.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-package1.scala b/test/disabled/neg/macro-keyword-package1.scala
deleted file mode 100644
index 52d3fbabf6..0000000000
--- a/test/disabled/neg/macro-keyword-package1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package macro
-
-package macro.bar \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-package2.check b/test/disabled/neg/macro-keyword-package2.check
deleted file mode 100644
index 0cb542a85d..0000000000
--- a/test/disabled/neg/macro-keyword-package2.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-package2.scala:3: error: identifier expected but 'macro' found.
-package macro.foo
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-package2.flags b/test/disabled/neg/macro-keyword-package2.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-package2.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-package2.scala b/test/disabled/neg/macro-keyword-package2.scala
deleted file mode 100644
index a68ebd935f..0000000000
--- a/test/disabled/neg/macro-keyword-package2.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package foo
-
-package macro.foo
diff --git a/test/disabled/neg/macro-keyword-trait1.check b/test/disabled/neg/macro-keyword-trait1.check
deleted file mode 100644
index 9586a62e08..0000000000
--- a/test/disabled/neg/macro-keyword-trait1.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-trait1.scala:3: error: identifier expected but 'macro' found.
-trait macro
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-trait1.flags b/test/disabled/neg/macro-keyword-trait1.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-trait1.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-trait1.scala b/test/disabled/neg/macro-keyword-trait1.scala
deleted file mode 100644
index e32d4c1385..0000000000
--- a/test/disabled/neg/macro-keyword-trait1.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-package test8
-
-trait macro
diff --git a/test/disabled/neg/macro-keyword-trait2.check b/test/disabled/neg/macro-keyword-trait2.check
deleted file mode 100644
index 40aa764378..0000000000
--- a/test/disabled/neg/macro-keyword-trait2.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-trait2.scala:2: error: identifier expected but 'macro' found.
- trait macro
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-trait2.flags b/test/disabled/neg/macro-keyword-trait2.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-trait2.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-trait2.scala b/test/disabled/neg/macro-keyword-trait2.scala
deleted file mode 100644
index 243a54abe6..0000000000
--- a/test/disabled/neg/macro-keyword-trait2.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test9 {
- trait macro
-}
diff --git a/test/disabled/neg/macro-keyword-type.check b/test/disabled/neg/macro-keyword-type.check
deleted file mode 100644
index 4a7481114c..0000000000
--- a/test/disabled/neg/macro-keyword-type.check
+++ /dev/null
@@ -1,4 +0,0 @@
-macro-keyword-type.scala:2: error: identifier expected but 'macro' found.
- type macro = Int
- ^
-one error found
diff --git a/test/disabled/neg/macro-keyword-type.flags b/test/disabled/neg/macro-keyword-type.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-type.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-type.scala b/test/disabled/neg/macro-keyword-type.scala
deleted file mode 100644
index 30e523bcaf..0000000000
--- a/test/disabled/neg/macro-keyword-type.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test3 {
- type macro = Int
-} \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-val.check b/test/disabled/neg/macro-keyword-val.check
deleted file mode 100644
index 0dc4c030a9..0000000000
--- a/test/disabled/neg/macro-keyword-val.check
+++ /dev/null
@@ -1,7 +0,0 @@
-macro-keyword-val.scala:2: error: illegal start of simple pattern
- val macro = ???
- ^
-macro-keyword-val.scala:3: error: '=' expected but '}' found.
-}
-^
-two errors found
diff --git a/test/disabled/neg/macro-keyword-val.flags b/test/disabled/neg/macro-keyword-val.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-val.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-val.scala b/test/disabled/neg/macro-keyword-val.scala
deleted file mode 100644
index 96f57acb30..0000000000
--- a/test/disabled/neg/macro-keyword-val.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test1 {
- val macro = ???
-} \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-var.check b/test/disabled/neg/macro-keyword-var.check
deleted file mode 100644
index 96d02e0052..0000000000
--- a/test/disabled/neg/macro-keyword-var.check
+++ /dev/null
@@ -1,7 +0,0 @@
-macro-keyword-var.scala:2: error: illegal start of simple pattern
- var macro = ???
- ^
-macro-keyword-var.scala:3: error: '=' expected but '}' found.
-}
-^
-two errors found
diff --git a/test/disabled/neg/macro-keyword-var.flags b/test/disabled/neg/macro-keyword-var.flags
deleted file mode 100644
index cd66464f2f..0000000000
--- a/test/disabled/neg/macro-keyword-var.flags
+++ /dev/null
@@ -1 +0,0 @@
--language:experimental.macros \ No newline at end of file
diff --git a/test/disabled/neg/macro-keyword-var.scala b/test/disabled/neg/macro-keyword-var.scala
deleted file mode 100644
index a79dda6dc2..0000000000
--- a/test/disabled/neg/macro-keyword-var.scala
+++ /dev/null
@@ -1,3 +0,0 @@
-object Test2 {
- var macro = ???
-} \ No newline at end of file
diff --git a/test/files/jvm/manifests.check b/test/files/jvm/manifests.check
new file mode 100644
index 0000000000..be8ec2bb5b
--- /dev/null
+++ b/test/files/jvm/manifests.check
@@ -0,0 +1,56 @@
+x=(), m=ConcreteTypeTag[Unit], k=TypeRef, s=class Unit
+x=true, m=ConcreteTypeTag[Boolean], k=TypeRef, s=class Boolean
+x=a, m=ConcreteTypeTag[Char], k=TypeRef, s=class Char
+x=1, m=ConcreteTypeTag[Int], k=TypeRef, s=class Int
+x=abc, m=ConcreteTypeTag[String], k=TypeRef, s=class String
+x='abc, m=ConcreteTypeTag[Symbol], k=TypeRef, s=class Symbol
+
+x=List(()), m=ConcreteTypeTag[List[Unit]], k=TypeRef, s=class List
+x=List(true), m=ConcreteTypeTag[List[Boolean]], k=TypeRef, s=class List
+x=List(1), m=ConcreteTypeTag[List[Int]], k=TypeRef, s=class List
+x=List(abc), m=ConcreteTypeTag[List[String]], k=TypeRef, s=class List
+x=List('abc), m=ConcreteTypeTag[List[Symbol]], k=TypeRef, s=class List
+
+x=[Z, m=ConcreteTypeTag[Array[Boolean]], k=TypeRef, s=class Array
+x=[C, m=ConcreteTypeTag[Array[Char]], k=TypeRef, s=class Array
+x=[I, m=ConcreteTypeTag[Array[Int]], k=TypeRef, s=class Array
+x=[Ljava.lang.String;, m=ConcreteTypeTag[Array[String]], k=TypeRef, s=class Array
+x=[Lscala.Symbol;, m=ConcreteTypeTag[Array[Symbol]], k=TypeRef, s=class Array
+
+x=((),()), m=ConcreteTypeTag[(Unit, Unit)], k=TypeRef, s=class Tuple2
+x=(true,false), m=ConcreteTypeTag[(Boolean, Boolean)], k=TypeRef, s=class Tuple2
+x=(1,2), m=ConcreteTypeTag[(Int, Int)], k=TypeRef, s=class Tuple2
+x=(abc,xyz), m=ConcreteTypeTag[(String, String)], k=TypeRef, s=class Tuple2
+x=('abc,'xyz), m=ConcreteTypeTag[(Symbol, Symbol)], k=TypeRef, s=class Tuple2
+
+
+x=Foo, m=ConcreteTypeTag[Foo[Int]], k=TypeRef, s=class Foo
+x=Foo, m=ConcreteTypeTag[Foo[List[Int]]], k=TypeRef, s=class Foo
+x=Foo, m=ConcreteTypeTag[Foo[Foo[Int]]], k=TypeRef, s=class Foo
+x=Foo, m=ConcreteTypeTag[Foo[List[Foo[Int]]]], k=TypeRef, s=class Foo
+
+x=Test1$$anon$1, m=ConcreteTypeTag[Bar[String]], k=RefinedType, s=<local Test1>
+x=Test1$$anon$2, m=ConcreteTypeTag[Bar[String]], k=RefinedType, s=<local Test1>
+
+()=()
+true=true
+a=a
+1=1
+'abc='abc
+
+List(())=List(())
+List(true)=List(true)
+List('abc)=List('abc)
+
+Array()=Array()
+Array(true)=Array(true)
+Array(a)=Array(a)
+Array(1)=Array(1)
+
+((),())=((),())
+(true,false)=(true,false)
+
+List(List(1), List(2))=List(List(1), List(2))
+
+Array(Array(1), Array(2))=Array(Array(1), Array(2))
+
diff --git a/test/files/jvm/manifests.check.temporarily.disabled b/test/files/jvm/manifests.check.temporarily.disabled
deleted file mode 100644
index 54f504b929..0000000000
--- a/test/files/jvm/manifests.check.temporarily.disabled
+++ /dev/null
@@ -1,55 +0,0 @@
-x=(), m=Unit
-x=true, m=Boolean
-x=a, m=Char
-x=1, m=Int
-x=abc, m=java.lang.String
-x='abc, m=scala.Symbol
-
-x=List(()), m=scala.collection.immutable.List[Unit]
-x=List(true), m=scala.collection.immutable.List[Boolean]
-x=List(1), m=scala.collection.immutable.List[Int]
-x=List(abc), m=scala.collection.immutable.List[java.lang.String]
-x=List('abc), m=scala.collection.immutable.List[scala.Symbol]
-
-x=[Z, m=Array[Boolean]
-x=[C, m=Array[Char]
-x=[I, m=Array[Int]
-x=[Ljava.lang.String;, m=Array[java.lang.String]
-x=[Lscala.Symbol;, m=Array[scala.Symbol]
-
-x=((),()), m=scala.Tuple2[Unit, Unit]
-x=(true,false), m=scala.Tuple2[Boolean, Boolean]
-x=(1,2), m=scala.Tuple2[Int, Int]
-x=(abc,xyz), m=scala.Tuple2[java.lang.String, java.lang.String]
-x=('abc,'xyz), m=scala.Tuple2[scala.Symbol, scala.Symbol]
-
-
-x=Foo, m=Foo[Int]
-x=Foo, m=Foo[scala.collection.immutable.List[Int]]
-x=Foo, m=Foo[Foo[Int]]
-x=Foo, m=Foo[scala.collection.immutable.List[Foo[Int]]]
-
-x=Test1$$anon$1, m=Object with Bar[java.lang.String]
-
-()=()
-true=true
-a=a
-1=1
-'abc='abc
-
-List(())=List(())
-List(true)=List(true)
-List('abc)=List('abc)
-
-Array()=Array()
-Array(true)=Array(true)
-Array(a)=Array(a)
-Array(1)=Array(1)
-
-((),())=((),())
-(true,false)=(true,false)
-
-List(List(1), List(2))=List(List(1), List(2))
-
-Array(Array(1), Array(2))=Array(Array(1), Array(2))
-
diff --git a/test/files/jvm/manifests.scala.temporarily.disabled b/test/files/jvm/manifests.scala
index 241966fd9d..935427f5d4 100644
--- a/test/files/jvm/manifests.scala.temporarily.disabled
+++ b/test/files/jvm/manifests.scala
@@ -50,7 +50,8 @@ object Test1 extends TestUtil {
print(new Foo(List(new Foo(2))))
println()
- print(new Bar[String] { def f = "abc" })
+ print(new Bar[String] { def f = "abc" });
+ {print(new Bar[String] { def f = "abc" })}
println()
}
@@ -102,8 +103,10 @@ trait TestUtil {
}
import scala.reflect._
def print[T](x: T)(implicit m: Manifest[T]) {
- val m1: Manifest[T] = read(write(m))
+ // manifests are no longer serializable
+// val m1: Manifest[T] = read(write(m))
+ val m1: Manifest[T] = m
val x1 = x.toString.replaceAll("@[0-9a-z]+$", "")
- println("x="+x1+", m="+m1)
+ println("x="+x1+", m="+m1+", k="+m1.tpe.kind+", s="+m1.sym.toString)
}
}
diff --git a/test/files/neg/t3507.check b/test/files/neg/t3507.check
deleted file mode 100644
index 71bf295039..0000000000
--- a/test/files/neg/t3507.check
+++ /dev/null
@@ -1,4 +0,0 @@
-t3507.scala:13: error: No ConcreteTypeTag available for _1.b.c.type
- mani/*[object _1.b.c]*/(c) // kaboom in manifestOfType / TreeGen.mkAttributedQualifier
- ^
-one error found
diff --git a/test/files/pos/implicits.scala.temporarily.disabled b/test/files/pos/implicits.scala
index 2c01dd0ba8..2c01dd0ba8 100644
--- a/test/files/pos/implicits.scala.temporarily.disabled
+++ b/test/files/pos/implicits.scala
diff --git a/test/files/pos/manifest1.scala.temporarily.disabled b/test/files/pos/manifest1.scala
index 8901aa7437..8901aa7437 100644
--- a/test/files/pos/manifest1.scala.temporarily.disabled
+++ b/test/files/pos/manifest1.scala
diff --git a/test/files/run/existentials3.check b/test/files/run/existentials3.check
new file mode 100644
index 0000000000..8227d77909
--- /dev/null
+++ b/test/files/run/existentials3.check
@@ -0,0 +1,24 @@
+ConcreteTypeTag[Bar.type], t=TypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton
+ConcreteTypeTag[Bar], t=TypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar}
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=f3
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=f4
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=f5
+ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
+ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
+ConcreteTypeTag[$anon], t=TypeRef, s= <: B with Test.ToS
+ConcreteTypeTag[$anon], t=TypeRef, s= <: B with A with Test.ToS
+ConcreteTypeTag[List[Object{type T1}#T1]], t=TypeRef, s=class List
+ConcreteTypeTag[List[Seq[Int]]], t=TypeRef, s=class List
+ConcreteTypeTag[List[Seq[U forSome { type U <: Int }]]], t=TypeRef, s=class List
+ConcreteTypeTag[Bar.type], t=TypeRef, s= <: scala.runtime.AbstractFunction0[Bar] with Serializable{case def unapply(x$0: Bar): Boolean} with Singleton
+ConcreteTypeTag[Bar], t=TypeRef, s= <: Test.ToS with Product with Serializable{def copy(): Bar}
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=g3
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=g4
+ConcreteTypeTag[Test.ToS], t=RefinedType, s=g5
+ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
+ConcreteTypeTag[() => Test.ToS], t=TypeRef, s=class Function0
+ConcreteTypeTag[$anon], t=TypeRef, s= <: B with Test.ToS
+ConcreteTypeTag[$anon], t=TypeRef, s= <: B with A with Test.ToS
+ConcreteTypeTag[List[Object{type T1}#T1]], t=TypeRef, s=class List
+ConcreteTypeTag[List[Seq[Int]]], t=TypeRef, s=class List
+ConcreteTypeTag[List[Seq[U forSome { type U <: Int }]]], t=TypeRef, s=class List
diff --git a/test/files/run/existentials3.check.temporarily.disabled b/test/files/run/existentials3.check.temporarily.disabled
deleted file mode 100644
index 36a458dacc..0000000000
--- a/test/files/run/existentials3.check.temporarily.disabled
+++ /dev/null
@@ -1,22 +0,0 @@
-_ <: scala.runtime.AbstractFunction0[_ <: Object with Test$ToS with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with Test$ToS with scala.Product with scala.Serializable
-Object with Test$ToS
-Object with Test$ToS
-Object with Test$ToS
-scala.Function0[Object with Test$ToS]
-scala.Function0[Object with Test$ToS]
-_ <: Object with _ <: Object with Object with Test$ToS
-_ <: Object with _ <: Object with _ <: Object with Test$ToS
-scala.collection.immutable.List[Object with scala.collection.Seq[Int]]
-scala.collection.immutable.List[Object with scala.collection.Seq[_ <: Int]]
-_ <: scala.runtime.AbstractFunction0[_ <: Object with Test$ToS with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with Test$ToS with scala.Product with scala.Serializable
-Object with Test$ToS
-Object with Test$ToS
-Object with Test$ToS
-scala.Function0[Object with Test$ToS]
-scala.Function0[Object with Test$ToS]
-_ <: Object with _ <: Object with Object with Test$ToS
-_ <: Object with _ <: Object with _ <: Object with Test$ToS
-scala.collection.immutable.List[Object with scala.collection.Seq[Int]]
-scala.collection.immutable.List[Object with scala.collection.Seq[_ <: Int]]
diff --git a/test/files/run/existentials3.scala.temporarily.disabled b/test/files/run/existentials3.scala
index bb80d366cc..d6d5612687 100644
--- a/test/files/run/existentials3.scala.temporarily.disabled
+++ b/test/files/run/existentials3.scala
@@ -11,11 +11,11 @@ object Test {
def f8 = { trait A ; trait B extends A ; class C extends B with ToS; new C { } }
def f9 = { trait A ; trait B ; class C extends B with A with ToS; new C { } }
-
+
def f10 = { class A { type T1 } ; List[A#T1]() }
def f11 = { abstract class A extends Seq[Int] ; List[A]() }
def f12 = { abstract class A extends Seq[U forSome { type U <: Int }] ; List[A]() }
-
+
val g1 = { case class Bar() extends ToS; Bar }
val g2 = { case class Bar() extends ToS; Bar() }
val g3 = { class Bar() extends ToS; object Bar extends ToS; Bar }
@@ -30,10 +30,16 @@ object Test {
val g10 = { class A { type T1 } ; List[A#T1]() }
val g11 = { abstract class A extends Seq[Int] ; List[A]() }
val g12 = { abstract class A extends Seq[U forSome { type U <: Int }] ; List[A]() }
-
- def m[T: Manifest](x: T) = println(manifest[T])
-
+
+ def printTag(t: TypeTag[_]) = {
+ val s = if (t.sym.isFreeType) t.sym.typeSignature.toString else t.sym.toString
+ println("%s, t=%s, s=%s".format(t, t.tpe.kind, s))
+ }
+ def m[T: ConcreteTypeTag](x: T) = printTag(concreteTypeTag[T])
+ def m2[T: TypeTag](x: T) = printTag(typeTag[T])
+
// manifests don't work for f10/g10
+ // oh, they do now :)
def main(args: Array[String]): Unit = {
m(f1)
m(f2)
@@ -44,7 +50,7 @@ object Test {
m(f7)
m(f8)
m(f9)
- // m(f10)
+ m2(f10)
m(f11)
m(f12)
m(g1)
@@ -56,7 +62,7 @@ object Test {
m(g7)
m(g8)
m(g9)
- // m(g10)
+ m2(g10)
m(g11)
m(g12)
}
diff --git a/test/files/run/t1195.check b/test/files/run/t1195.check
new file mode 100644
index 0000000000..554e3fd03d
--- /dev/null
+++ b/test/files/run/t1195.check
@@ -0,0 +1,6 @@
+ConcreteTypeTag[Bar.type], underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
+ConcreteTypeTag[Bar], underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
+ConcreteTypeTag[Product with Serializable], underlying = Product with Serializable
+ConcreteTypeTag[Bar.type], underlying = <: scala.runtime.AbstractFunction1[Int,Bar] with Serializable{case def unapply(x$0: Bar): Option[Int]} with Singleton
+ConcreteTypeTag[Bar], underlying = <: Product with Serializable{val x: Int; def copy(x: Int): Bar; def copy$default$1: Int; def _1: Int}
+ConcreteTypeTag[Product with Serializable], underlying = Product with Serializable
diff --git a/test/files/run/t1195.check.temporarily.disabled b/test/files/run/t1195.check.temporarily.disabled
deleted file mode 100644
index d023bc91f7..0000000000
--- a/test/files/run/t1195.check.temporarily.disabled
+++ /dev/null
@@ -1,6 +0,0 @@
-_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with scala.Product with scala.Serializable
-Object with scala.Product with scala.Serializable
-_ <: scala.runtime.AbstractFunction1[Int, _ <: Object with scala.Product with scala.Serializable] with scala.Serializable with java.lang.Object
-_ <: Object with scala.Product with scala.Serializable
-Object with scala.Product with scala.Serializable
diff --git a/test/files/run/t1195.scala.temporarily.disabled b/test/files/run/t1195.scala
index 81ef5bdb0e..93b1dcbd07 100644
--- a/test/files/run/t1195.scala.temporarily.disabled
+++ b/test/files/run/t1195.scala
@@ -6,8 +6,8 @@ object Test {
val f1 = f()
val g1 = g()
val h1 = h()
-
- def m[T: Manifest](x: T) = println(manifest[T])
+
+ def m[T: Manifest](x: T) = println(manifest[T] + ", underlying = " + manifest[T].sym.typeSignature)
def main(args: Array[String]): Unit = {
m(f)
diff --git a/test/files/run/t3507.check b/test/files/run/t3507.check
new file mode 100644
index 0000000000..50ab029592
--- /dev/null
+++ b/test/files/run/t3507.check
@@ -0,0 +1 @@
+ConcreteTypeTag[_1.type#b.c.type]
diff --git a/test/files/neg/t3507.scala b/test/files/run/t3507.scala
index 32688d3934..3cdd40a881 100644
--- a/test/files/neg/t3507.scala
+++ b/test/files/run/t3507.scala
@@ -5,11 +5,11 @@ class A {
def m = b.c
}
-object Test {
+object Test extends App {
var a: A = new A // mutable
val c /*: object _1.b.c forSome { val _1: A } */ = a.m // widening using existential
-
- def mani[T: Manifest](x: T) = ()
+
+ def mani[T: Manifest](x: T) = println(manifest[T])
mani/*[object _1.b.c]*/(c) // kaboom in manifestOfType / TreeGen.mkAttributedQualifier
// --> _1 is not in scope here
} \ No newline at end of file
diff --git a/test/files/run/t3835.scala b/test/files/run/t3835.scala
index 49e591195f..c120a61f6e 100644
--- a/test/files/run/t3835.scala
+++ b/test/files/run/t3835.scala
@@ -1,4 +1,9 @@
object Test extends App {
- println((1, 2, 3) match { case (r, \u03b8, \u03c6) => r + \u03b8 + \u03c6 })
- println(1 match { case \u00e9 => \u00e9 })
+ // work around optimizer bug SI-5672 -- generates wrong bytecode for switches in arguments
+ // virtpatmat happily emits a switch for a one-case switch, whereas -Xoldpatmat did not
+ // this is not the focus of this test, hence the temporary workaround
+ def a = (1, 2, 3) match { case (r, \u03b8, \u03c6) => r + \u03b8 + \u03c6 }
+ println(a)
+ def b = (1 match { case \u00e9 => \u00e9 })
+ println(b)
}
diff --git a/test/files/run/t4110.check b/test/files/run/t4110.check
new file mode 100644
index 0000000000..28f220e1fe
--- /dev/null
+++ b/test/files/run/t4110.check
@@ -0,0 +1,2 @@
+ConcreteTypeTag[Test.A with Test.B]
+ConcreteTypeTag[Test.A with Test.B]
diff --git a/test/files/run/t4110.check.temporarily.disabled b/test/files/run/t4110.check.temporarily.disabled
deleted file mode 100644
index 8b005989de..0000000000
--- a/test/files/run/t4110.check.temporarily.disabled
+++ /dev/null
@@ -1,2 +0,0 @@
-Object with Test$A with Test$B
-Object with Test$A with Test$B
diff --git a/test/files/run/t4110.scala.temporarily.disabled b/test/files/run/t4110.scala
index 4bd377b73e..4bd377b73e 100644
--- a/test/files/run/t4110.scala.temporarily.disabled
+++ b/test/files/run/t4110.scala
diff --git a/test/files/run/treePrint.check.temporarily.disabled b/test/files/run/treePrint.check
index 3360815ac1..3360815ac1 100644
--- a/test/files/run/treePrint.check.temporarily.disabled
+++ b/test/files/run/treePrint.check
diff --git a/test/files/run/treePrint.scala.temporarily.disabled b/test/files/run/treePrint.scala
index e0332a705f..4a80e2824d 100644
--- a/test/files/run/treePrint.scala.temporarily.disabled
+++ b/test/files/run/treePrint.scala
@@ -4,7 +4,7 @@ object Test {
import scala.tools.nsc._
import interpreter._
import java.io.{ OutputStream, BufferedReader, StringReader, PrintWriter, Writer, OutputStreamWriter}
-
+
val code = """
def foo = {
var q: Boolean = false
@@ -22,11 +22,11 @@ object Test {
else 20
}
else 30
-
+
(x == 5) || !q || true
}
- """
-
+ """
+
class NullOutputStream extends OutputStream { def write(b: Int) { } }
def main(args: Array[String]) {
@@ -35,7 +35,8 @@ object Test {
settings.Ycompacttrees.value = true
val intp = new IMain(settings, new PrintWriter(new NullOutputStream))
- val power = new Power(intp, new ReplVals { })
+ val vals = new ReplVals { }
+ val power = new Power(intp, vals)
intp.interpret("""def initialize = "Have to interpret something or we get errors." """)
power trees code foreach println
}