diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-12-05 17:54:47 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-12-05 17:54:47 -0800 |
commit | 9547753a80fab450c842cb4a9a8296aa41875ff3 (patch) | |
tree | 637acdd45dbf93ba87ae6cb67d4237da652ac8c1 /test/files/neg | |
parent | 4b2330b3d3db4263a8b1e19b792596dd60d79045 (diff) | |
parent | c42c1742e26dc47f940e4003e4ca25e8c738796d (diff) | |
download | scala-9547753a80fab450c842cb4a9a8296aa41875ff3.tar.gz scala-9547753a80fab450c842cb4a9a8296aa41875ff3.tar.bz2 scala-9547753a80fab450c842cb4a9a8296aa41875ff3.zip |
Merge pull request #1716 from paulp/merge-2.10
Merged 2.10.0/x into master.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/gadts1.check | 4 | ||||
-rw-r--r-- | test/files/neg/t5753.check | 4 | ||||
-rw-r--r-- | test/files/neg/t5753.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t5753/Impls$class.class | bin | 0 -> 626 bytes | |||
-rw-r--r-- | test/files/neg/t5753/Impls.class | bin | 0 -> 866 bytes | |||
-rw-r--r-- | test/files/neg/t5753/Impls_Macros_1.scala | 6 | ||||
-rw-r--r-- | test/files/neg/t5753/Test_2.scala | 11 |
7 files changed, 24 insertions, 2 deletions
diff --git a/test/files/neg/gadts1.check b/test/files/neg/gadts1.check index a61231a27a..9b7ea5556a 100644 --- a/test/files/neg/gadts1.check +++ b/test/files/neg/gadts1.check @@ -1,6 +1,6 @@ -gadts1.scala:20: error: class Cell of type Test.Cell does not take type parameters. +gadts1.scala:20: error: Test.Cell[a] does not take parameters case Cell[a](x: Int) => c.x = 5 - ^ + ^ gadts1.scala:20: error: type mismatch; found : Int(5) required: a diff --git a/test/files/neg/t5753.check b/test/files/neg/t5753.check new file mode 100644 index 0000000000..76602de17d --- /dev/null +++ b/test/files/neg/t5753.check @@ -0,0 +1,4 @@ +Test_2.scala:9: error: macro implementation not found: foo (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them) + println(foo(42)) + ^ +one error found diff --git a/test/files/neg/t5753.flags b/test/files/neg/t5753.flags new file mode 100644 index 0000000000..cd66464f2f --- /dev/null +++ b/test/files/neg/t5753.flags @@ -0,0 +1 @@ +-language:experimental.macros
\ No newline at end of file diff --git a/test/files/neg/t5753/Impls$class.class b/test/files/neg/t5753/Impls$class.class Binary files differnew file mode 100644 index 0000000000..476329174e --- /dev/null +++ b/test/files/neg/t5753/Impls$class.class diff --git a/test/files/neg/t5753/Impls.class b/test/files/neg/t5753/Impls.class Binary files differnew file mode 100644 index 0000000000..dfcf89ed44 --- /dev/null +++ b/test/files/neg/t5753/Impls.class diff --git a/test/files/neg/t5753/Impls_Macros_1.scala b/test/files/neg/t5753/Impls_Macros_1.scala new file mode 100644 index 0000000000..1d9c26458c --- /dev/null +++ b/test/files/neg/t5753/Impls_Macros_1.scala @@ -0,0 +1,6 @@ +import scala.reflect.macros.{Context => Ctx} + +trait Impls { +def impl(c: Ctx)(x: c.Expr[Any]) = x +} + diff --git a/test/files/neg/t5753/Test_2.scala b/test/files/neg/t5753/Test_2.scala new file mode 100644 index 0000000000..2369b18e76 --- /dev/null +++ b/test/files/neg/t5753/Test_2.scala @@ -0,0 +1,11 @@ +import scala.reflect.macros.{Context => Ctx} + +object Macros extends Impls { + def foo(x: Any) = macro impl +} + +object Test extends App { + import Macros._ + println(foo(42)) +} + |