diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 17:51:28 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-04-23 17:54:19 +0200 |
commit | 2b09d8caf5497c4e016a3e1179e5f7e842766176 (patch) | |
tree | 27c872f82fb8290b8cba6fa626ecd0b0dd627229 /test/files/neg | |
parent | 14df5d74b58505e082d6f7c0e42b51249d35eec4 (diff) | |
download | scala-2b09d8caf5497c4e016a3e1179e5f7e842766176.tar.gz scala-2b09d8caf5497c4e016a3e1179e5f7e842766176.tar.bz2 scala-2b09d8caf5497c4e016a3e1179e5f7e842766176.zip |
rethinks tags
* introduces ArrayTag and ErasureTag
* all type tags now feature erasure
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/classtags_contextbound_a.check | 2 | ||||
-rw-r--r-- | test/files/neg/classtags_contextbound_c.check | 2 | ||||
-rw-r--r-- | test/files/neg/classtags_dont_use_typetags.check | 4 | ||||
-rw-r--r-- | test/files/neg/classtags_dont_use_typetags.scala | 3 | ||||
-rw-r--r-- | test/files/neg/macro-invalidret-nontree.check | 14 | ||||
-rw-r--r-- | test/files/neg/macro-invalidret-nonuniversetree.check | 14 | ||||
-rw-r--r-- | test/files/neg/t5689.check | 2 |
7 files changed, 24 insertions, 17 deletions
diff --git a/test/files/neg/classtags_contextbound_a.check b/test/files/neg/classtags_contextbound_a.check index f4b6ff5af1..a4fd37506d 100644 --- a/test/files/neg/classtags_contextbound_a.check +++ b/test/files/neg/classtags_contextbound_a.check @@ -1,4 +1,4 @@ -classtags_contextbound_a.scala:2: error: No ClassTag available for T
+classtags_contextbound_a.scala:2: error: No ArrayTag available for T
def foo[T] = Array[T]()
^
one error found
diff --git a/test/files/neg/classtags_contextbound_c.check b/test/files/neg/classtags_contextbound_c.check index 54f630862a..a1c5eddfe1 100644 --- a/test/files/neg/classtags_contextbound_c.check +++ b/test/files/neg/classtags_contextbound_c.check @@ -1,4 +1,4 @@ -classtags_contextbound_c.scala:2: error: No ClassTag available for T
+classtags_contextbound_c.scala:2: error: No ArrayTag available for T
def mkArray[T] = Array[T]()
^
one error found
diff --git a/test/files/neg/classtags_dont_use_typetags.check b/test/files/neg/classtags_dont_use_typetags.check new file mode 100644 index 0000000000..c7d2fba35b --- /dev/null +++ b/test/files/neg/classtags_dont_use_typetags.check @@ -0,0 +1,4 @@ +classtags_dont_use_typetags.scala:2: error: No ArrayTag available for T
+ def foo[T: TypeTag] = Array[T]()
+ ^
+one error found
diff --git a/test/files/neg/classtags_dont_use_typetags.scala b/test/files/neg/classtags_dont_use_typetags.scala new file mode 100644 index 0000000000..0f675f71aa --- /dev/null +++ b/test/files/neg/classtags_dont_use_typetags.scala @@ -0,0 +1,3 @@ +object Test extends App { + def foo[T: TypeTag] = Array[T]() +}
\ No newline at end of file diff --git a/test/files/neg/macro-invalidret-nontree.check b/test/files/neg/macro-invalidret-nontree.check index 7fcc396463..0b793cf421 100644 --- a/test/files/neg/macro-invalidret-nontree.check +++ b/test/files/neg/macro-invalidret-nontree.check @@ -1,7 +1,7 @@ -Macros_Test_2.scala:2: error: macro implementation has wrong shape: - required: (c: scala.reflect.makro.Context): c.Expr[Any] - found : (c: scala.reflect.makro.Context): Int -type mismatch for return type : c.Expr[Any] does not conform to Int - def foo = macro Impls.foo - ^ -one error found +Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.makro.Context): c.Expr[Any]
+ found : (c: scala.reflect.makro.Context): Int
+type mismatch for return type: Int does not conform to c.Expr[Any]
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/macro-invalidret-nonuniversetree.check b/test/files/neg/macro-invalidret-nonuniversetree.check index a97d6daaa9..4fc06b5ceb 100644 --- a/test/files/neg/macro-invalidret-nonuniversetree.check +++ b/test/files/neg/macro-invalidret-nonuniversetree.check @@ -1,7 +1,7 @@ -Macros_Test_2.scala:2: error: macro implementation has wrong shape: - required: (c: scala.reflect.makro.Context): c.Expr[Any] - found : (c: scala.reflect.makro.Context): reflect.mirror.Literal -type mismatch for return type : c.Expr[Any] does not conform to reflect.mirror.Literal - def foo = macro Impls.foo - ^ -one error found +Macros_Test_2.scala:2: error: macro implementation has wrong shape:
+ required: (c: scala.reflect.makro.Context): c.Expr[Any]
+ found : (c: scala.reflect.makro.Context): reflect.mirror.Literal
+type mismatch for return type: reflect.mirror.Literal does not conform to c.Expr[Any]
+ def foo = macro Impls.foo
+ ^
+one error found
diff --git a/test/files/neg/t5689.check b/test/files/neg/t5689.check index f286d08cfa..6abc4c13f6 100644 --- a/test/files/neg/t5689.check +++ b/test/files/neg/t5689.check @@ -1,7 +1,7 @@ t5689.scala:4: error: macro implementation has wrong shape:
required: (c: scala.reflect.makro.Context)(i: c.Expr[Double]): c.Expr[String]
found : (c: scala.reflect.makro.Context)(i: c.Expr[Double]): c.Expr[Int]
-type mismatch for return type : c.Expr[String] does not conform to c.Expr[Int]
+type mismatch for return type: c.Expr[Int] does not conform to c.Expr[String]
def returnsString(i: Double): String = macro returnsIntImpl
^
one error found
|