summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-02-17 16:28:22 -0800
committerPaul Phillips <paulp@improving.org>2012-02-17 16:28:22 -0800
commit2fe570291a41e2701f3118bc0f643a9fa60c476b (patch)
tree510b348b9c85a69314e0092a3160d948090a53bc /test/files/neg
parent8d5ce774a869814d802c54b180f13aeffdeceba0 (diff)
parente9926a5207aadcfe3831b51b1cd6164757278013 (diff)
downloadscala-2fe570291a41e2701f3118bc0f643a9fa60c476b.tar.gz
scala-2fe570291a41e2701f3118bc0f643a9fa60c476b.tar.bz2
scala-2fe570291a41e2701f3118bc0f643a9fa60c476b.zip
Merge remote-tracking branch 'scalamacros/pullrequest/macros' into develop
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/macro-argtype-mismatch.check6
-rw-r--r--test/files/neg/macro-argtype-mismatch.flags1
-rw-r--r--test/files/neg/macro-argtype-mismatch/Macros_1.scala3
-rw-r--r--test/files/neg/macro-argtype-mismatch/Test_2.scala4
-rw-r--r--test/files/neg/macro-noexpand.check4
-rw-r--r--test/files/neg/macro-noexpand.flags1
-rw-r--r--test/files/neg/macro-noexpand/Macros_1.scala3
-rw-r--r--test/files/neg/macro-noexpand/Test_2.scala4
-rw-r--r--test/files/neg/macro-noncompilertree.check6
-rw-r--r--test/files/neg/macro-noncompilertree.flags1
-rw-r--r--test/files/neg/macro-noncompilertree/Macros_1.scala3
-rw-r--r--test/files/neg/macro-nontree.check6
-rw-r--r--test/files/neg/macro-nontree.flags1
-rw-r--r--test/files/neg/macro-nontree/Macros_1.scala3
14 files changed, 46 insertions, 0 deletions
diff --git a/test/files/neg/macro-argtype-mismatch.check b/test/files/neg/macro-argtype-mismatch.check
new file mode 100644
index 0000000000..dd867be804
--- /dev/null
+++ b/test/files/neg/macro-argtype-mismatch.check
@@ -0,0 +1,6 @@
+Test_2.scala:3: error: type mismatch;
+ found : String("2")
+ required: Int
+ foo("2")
+ ^
+one error found
diff --git a/test/files/neg/macro-argtype-mismatch.flags b/test/files/neg/macro-argtype-mismatch.flags
new file mode 100644
index 0000000000..7fea2ff901
--- /dev/null
+++ b/test/files/neg/macro-argtype-mismatch.flags
@@ -0,0 +1 @@
+-Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-argtype-mismatch/Macros_1.scala b/test/files/neg/macro-argtype-mismatch/Macros_1.scala
new file mode 100644
index 0000000000..4b5f98ba37
--- /dev/null
+++ b/test/files/neg/macro-argtype-mismatch/Macros_1.scala
@@ -0,0 +1,3 @@
+object Macros {
+ def macro foo(x: Int) = x
+} \ No newline at end of file
diff --git a/test/files/neg/macro-argtype-mismatch/Test_2.scala b/test/files/neg/macro-argtype-mismatch/Test_2.scala
new file mode 100644
index 0000000000..18feb69425
--- /dev/null
+++ b/test/files/neg/macro-argtype-mismatch/Test_2.scala
@@ -0,0 +1,4 @@
+object Test extends App {
+ import Macros._
+ foo("2")
+} \ No newline at end of file
diff --git a/test/files/neg/macro-noexpand.check b/test/files/neg/macro-noexpand.check
new file mode 100644
index 0000000000..c15d54bb32
--- /dev/null
+++ b/test/files/neg/macro-noexpand.check
@@ -0,0 +1,4 @@
+Test_2.scala:3: error: not found: value x
+ foo(x)
+ ^
+one error found
diff --git a/test/files/neg/macro-noexpand.flags b/test/files/neg/macro-noexpand.flags
new file mode 100644
index 0000000000..7fea2ff901
--- /dev/null
+++ b/test/files/neg/macro-noexpand.flags
@@ -0,0 +1 @@
+-Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-noexpand/Macros_1.scala b/test/files/neg/macro-noexpand/Macros_1.scala
new file mode 100644
index 0000000000..7a6aadf6a1
--- /dev/null
+++ b/test/files/neg/macro-noexpand/Macros_1.scala
@@ -0,0 +1,3 @@
+object Macros {
+ def macro foo(x: Any) = ???
+} \ No newline at end of file
diff --git a/test/files/neg/macro-noexpand/Test_2.scala b/test/files/neg/macro-noexpand/Test_2.scala
new file mode 100644
index 0000000000..0bed592883
--- /dev/null
+++ b/test/files/neg/macro-noexpand/Test_2.scala
@@ -0,0 +1,4 @@
+object Test extends App {
+ import Macros._
+ foo(x)
+} \ No newline at end of file
diff --git a/test/files/neg/macro-noncompilertree.check b/test/files/neg/macro-noncompilertree.check
new file mode 100644
index 0000000000..616765a39e
--- /dev/null
+++ b/test/files/neg/macro-noncompilertree.check
@@ -0,0 +1,6 @@
+Macros_1.scala:2: error: type mismatch;
+ found : reflect.mirror.Literal
+ required: _context.Tree
+ def macro foo = scala.reflect.mirror.Literal(scala.reflect.mirror.Constant(2))
+ ^
+one error found
diff --git a/test/files/neg/macro-noncompilertree.flags b/test/files/neg/macro-noncompilertree.flags
new file mode 100644
index 0000000000..7fea2ff901
--- /dev/null
+++ b/test/files/neg/macro-noncompilertree.flags
@@ -0,0 +1 @@
+-Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-noncompilertree/Macros_1.scala b/test/files/neg/macro-noncompilertree/Macros_1.scala
new file mode 100644
index 0000000000..eb1253e5e9
--- /dev/null
+++ b/test/files/neg/macro-noncompilertree/Macros_1.scala
@@ -0,0 +1,3 @@
+object Macros {
+ def macro foo = scala.reflect.mirror.Literal(scala.reflect.mirror.Constant(2))
+} \ No newline at end of file
diff --git a/test/files/neg/macro-nontree.check b/test/files/neg/macro-nontree.check
new file mode 100644
index 0000000000..a1c7139580
--- /dev/null
+++ b/test/files/neg/macro-nontree.check
@@ -0,0 +1,6 @@
+Macros_1.scala:2: error: type mismatch;
+ found : Int(2)
+ required: _context.Tree
+ def macro foo = 2
+ ^
+one error found
diff --git a/test/files/neg/macro-nontree.flags b/test/files/neg/macro-nontree.flags
new file mode 100644
index 0000000000..7fea2ff901
--- /dev/null
+++ b/test/files/neg/macro-nontree.flags
@@ -0,0 +1 @@
+-Xmacros \ No newline at end of file
diff --git a/test/files/neg/macro-nontree/Macros_1.scala b/test/files/neg/macro-nontree/Macros_1.scala
new file mode 100644
index 0000000000..2433974a85
--- /dev/null
+++ b/test/files/neg/macro-nontree/Macros_1.scala
@@ -0,0 +1,3 @@
+object Macros {
+ def macro foo = 2
+} \ No newline at end of file