diff options
author | Paul Phillips <paulp@improving.org> | 2012-04-14 10:54:13 +0100 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-04-14 10:54:13 +0100 |
commit | 07f2e5fe7296d1c7e35fe53c1065a5c269b8d40c (patch) | |
tree | 647c44152467d2a1f3e349eb9359dfe9a80624a6 /test/disabled | |
parent | 625397b02ead976f7144d30868f1b058eb6823b6 (diff) | |
parent | 0ba3d542cc236ab2dbed3dc551920ede94787a0c (diff) | |
download | scala-07f2e5fe7296d1c7e35fe53c1065a5c269b8d40c.tar.gz scala-07f2e5fe7296d1c7e35fe53c1065a5c269b8d40c.tar.bz2 scala-07f2e5fe7296d1c7e35fe53c1065a5c269b8d40c.zip |
Merge commit '625397b02e'; commit 'refs/pull/396/head' into develop
Diffstat (limited to 'test/disabled')
33 files changed, 11 insertions, 310 deletions
diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check deleted file mode 100644 index 25df9a6a4a..0000000000 --- a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.check +++ /dev/null @@ -1,10 +0,0 @@ -macro-deprecate-dont-touch-backquotedidents.scala:37: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
-package `macro` {
- ^
-macro-deprecate-dont-touch-backquotedidents.scala:38: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- package `macro`.bar {
- ^
-macro-deprecate-dont-touch-backquotedidents.scala:43: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- package `macro`.foo {
- ^
-three errors found
diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags deleted file mode 100644 index e8fb65d50c..0000000000 --- a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala b/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala deleted file mode 100644 index dee2f1de3b..0000000000 --- a/test/disabled/neg/macro-deprecate-dont-touch-backquotedidents.scala +++ /dev/null @@ -1,56 +0,0 @@ -object Test1 { - val `macro` = ??? -} - -object Test2 { - var `macro` = ??? -} - -object Test3 { - type `macro` = Int -} - -package test4 { - class `macro` -} - -object Test5 { - class `macro` -} - -package test6 { - object `macro` -} - -object Test7 { - object `macro` -} - -package test8 { - trait `macro` -} - -object Test9 { - trait `macro` -} - -package `macro` { - package `macro`.bar { - } -} - -package foo { - package `macro`.foo { - } -} - -object Test12 { - val Some(`macro`) = Some(42) - `macro` match { - case `macro` => println(`macro`) - } -} - -object Test13 { - def `macro` = 2 -}
\ No newline at end of file diff --git a/test/disabled/neg/macro-deprecate-idents.check b/test/disabled/neg/macro-deprecate-idents.check deleted file mode 100644 index bd685fc7b9..0000000000 --- a/test/disabled/neg/macro-deprecate-idents.check +++ /dev/null @@ -1,46 +0,0 @@ -macro-deprecate-idents.scala:2: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- val macro = ???
- ^
-macro-deprecate-idents.scala:6: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- var macro = ???
- ^
-macro-deprecate-idents.scala:10: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- type macro = Int
- ^
-macro-deprecate-idents.scala:14: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- class macro
- ^
-macro-deprecate-idents.scala:18: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- class macro
- ^
-macro-deprecate-idents.scala:22: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- object macro
- ^
-macro-deprecate-idents.scala:26: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- object macro
- ^
-macro-deprecate-idents.scala:30: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- trait macro
- ^
-macro-deprecate-idents.scala:34: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- trait macro
- ^
-macro-deprecate-idents.scala:37: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
-package macro {
- ^
-macro-deprecate-idents.scala:38: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- package macro.bar {
- ^
-macro-deprecate-idents.scala:43: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- package macro.foo {
- ^
-macro-deprecate-idents.scala:48: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- val Some(macro) = Some(42)
- ^
-macro-deprecate-idents.scala:50: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- case macro => println(macro)
- ^
-macro-deprecate-idents.scala:55: error: in future versions of Scala "macro" will be a keyword. consider using a different name.
- def macro = 2
- ^
-15 errors found
diff --git a/test/disabled/neg/macro-deprecate-idents.flags b/test/disabled/neg/macro-deprecate-idents.flags deleted file mode 100644 index e8fb65d50c..0000000000 --- a/test/disabled/neg/macro-deprecate-idents.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/test/disabled/neg/macro-deprecate-idents.scala b/test/disabled/neg/macro-deprecate-idents.scala deleted file mode 100644 index 23c398e341..0000000000 --- a/test/disabled/neg/macro-deprecate-idents.scala +++ /dev/null @@ -1,56 +0,0 @@ -object Test1 { - val macro = ??? -} - -object Test2 { - var macro = ??? -} - -object Test3 { - type macro = Int -} - -package test4 { - class macro -} - -object Test5 { - class macro -} - -package test6 { - object macro -} - -object Test7 { - object macro -} - -package test8 { - trait macro -} - -object Test9 { - trait macro -} - -package macro { - package macro.bar { - } -} - -package foo { - package macro.foo { - } -} - -object Test12 { - val Some(macro) = Some(42) - macro match { - case macro => println(macro) - } -} - -object Test13 { - def macro = 2 -}
\ No newline at end of file diff --git a/test/disabled/neg/macro-invalidshape-d.check b/test/disabled/neg/macro-invalidshape-d.check deleted file mode 100644 index 031aa653ab..0000000000 --- a/test/disabled/neg/macro-invalidshape-d.check +++ /dev/null @@ -1,4 +0,0 @@ -Macros_Test_2.scala:2: error: illegal start of statement
- def foo(x: Any) = {2; macro Impls.foo}
- ^
-one error found
diff --git a/test/disabled/neg/macro-invalidshape-d.flags b/test/disabled/neg/macro-invalidshape-d.flags deleted file mode 100644 index cd66464f2f..0000000000 --- a/test/disabled/neg/macro-invalidshape-d.flags +++ /dev/null @@ -1 +0,0 @@ --language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-invalidshape-d/Impls_1.scala b/test/disabled/neg/macro-invalidshape-d/Impls_1.scala deleted file mode 100644 index 7b1620d117..0000000000 --- a/test/disabled/neg/macro-invalidshape-d/Impls_1.scala +++ /dev/null @@ -1,5 +0,0 @@ -import scala.reflect.makro.{Context => Ctx} - -object Impls { - def foo(c: Ctx)(x: c.Expr[Any]) = ??? -} diff --git a/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala b/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala deleted file mode 100644 index bacd9a6e7c..0000000000 --- a/test/disabled/neg/macro-invalidshape-d/Macros_Test_2.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Macros { - def foo(x: Any) = {2; macro Impls.foo} -} - -object Test extends App { - import Macros._ - foo(42) -}
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-bind.flags b/test/disabled/neg/macro-keyword-bind.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-bind.flags +++ b/test/disabled/neg/macro-keyword-bind.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-class1.flags b/test/disabled/neg/macro-keyword-class1.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-class1.flags +++ b/test/disabled/neg/macro-keyword-class1.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-class2.flags b/test/disabled/neg/macro-keyword-class2.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-class2.flags +++ b/test/disabled/neg/macro-keyword-class2.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-object1.flags b/test/disabled/neg/macro-keyword-object1.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-object1.flags +++ b/test/disabled/neg/macro-keyword-object1.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-object2.flags b/test/disabled/neg/macro-keyword-object2.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-object2.flags +++ b/test/disabled/neg/macro-keyword-object2.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-package1.flags b/test/disabled/neg/macro-keyword-package1.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-package1.flags +++ b/test/disabled/neg/macro-keyword-package1.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-package2.flags b/test/disabled/neg/macro-keyword-package2.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-package2.flags +++ b/test/disabled/neg/macro-keyword-package2.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-trait1.flags b/test/disabled/neg/macro-keyword-trait1.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-trait1.flags +++ b/test/disabled/neg/macro-keyword-trait1.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-trait2.flags b/test/disabled/neg/macro-keyword-trait2.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-trait2.flags +++ b/test/disabled/neg/macro-keyword-trait2.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-type.flags b/test/disabled/neg/macro-keyword-type.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-type.flags +++ b/test/disabled/neg/macro-keyword-type.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-keyword-val.flags b/test/disabled/neg/macro-keyword-val.flags index 7fea2ff901..cd66464f2f 100644 --- a/test/disabled/neg/macro-keyword-val.flags +++ b/test/disabled/neg/macro-keyword-val.flags @@ -1 +1 @@ --Xmacros
\ No newline at end of file +-language:experimental.macros
\ No newline at end of file diff --git a/test/disabled/neg/macro-without-xmacros-a.check b/test/disabled/neg/macro-without-xmacros-a.check deleted file mode 100644 index a3ca081f04..0000000000 --- a/test/disabled/neg/macro-without-xmacros-a.check +++ /dev/null @@ -1,10 +0,0 @@ -Macros_2.scala:5: error: not found: value macro
- def foo(x: Int): Int = macro foo_impl
- ^
-Macros_2.scala:7: error: not found: value macro
- def bar(x: Int): Int = macro bar_impl
- ^
-Macros_2.scala:11: error: not found: value macro
- def quux(x: Int): Int = macro quux_impl
- ^
-three errors found
diff --git a/test/disabled/neg/macro-without-xmacros-a/Impls_1.scala b/test/disabled/neg/macro-without-xmacros-a/Impls_1.scala deleted file mode 100644 index 2493c81c95..0000000000 --- a/test/disabled/neg/macro-without-xmacros-a/Impls_1.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.reflect.makro.{Context => Ctx} - -object Impls { - def foo_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))) - } - - def bar_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))) - } - - def quux_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))) - } -} diff --git a/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala b/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala deleted file mode 100644 index 62f9dcf505..0000000000 --- a/test/disabled/neg/macro-without-xmacros-a/Macros_2.scala +++ /dev/null @@ -1,12 +0,0 @@ -import Impls._ - -object Macros { - object Shmacros { - def foo(x: Int): Int = macro foo_impl - } - def bar(x: Int): Int = macro bar_impl -} - -class Macros { - def quux(x: Int): Int = macro quux_impl -}
\ No newline at end of file diff --git a/test/disabled/neg/macro-without-xmacros-a/Test_3.scala b/test/disabled/neg/macro-without-xmacros-a/Test_3.scala deleted file mode 100644 index e9a10e20c9..0000000000 --- a/test/disabled/neg/macro-without-xmacros-a/Test_3.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - import Macros.Shmacros._ - println(foo(2) + Macros.bar(2) * new Macros().quux(4)) -}
\ No newline at end of file diff --git a/test/disabled/neg/macro-without-xmacros-b.check b/test/disabled/neg/macro-without-xmacros-b.check deleted file mode 100644 index dce4a084c9..0000000000 --- a/test/disabled/neg/macro-without-xmacros-b.check +++ /dev/null @@ -1,10 +0,0 @@ -Macros_2.scala:3: error: ';' expected but '.' found.
- def foo(x: Int): Int = macro Impls.foo_impl
- ^
-Macros_2.scala:5: error: ';' expected but '.' found.
- def bar(x: Int): Int = macro Impls.bar_impl
- ^
-Macros_2.scala:9: error: ';' expected but '.' found.
- def quux(x: Int): Int = macro Impls.quux_impl
- ^
-three errors found
diff --git a/test/disabled/neg/macro-without-xmacros-b/Impls_1.scala b/test/disabled/neg/macro-without-xmacros-b/Impls_1.scala deleted file mode 100644 index 2493c81c95..0000000000 --- a/test/disabled/neg/macro-without-xmacros-b/Impls_1.scala +++ /dev/null @@ -1,18 +0,0 @@ -import scala.reflect.makro.{Context => Ctx} - -object Impls { - def foo_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))) - } - - def bar_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(2)))) - } - - def quux_impl(c: Ctx)(x: c.Expr[Int]): c.mirror.Tree = { - import c.mirror._ - Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(3)))) - } -} diff --git a/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala b/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala deleted file mode 100644 index de7080c7e8..0000000000 --- a/test/disabled/neg/macro-without-xmacros-b/Macros_2.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Macros { - object Shmacros { - def foo(x: Int): Int = macro Impls.foo_impl - } - def bar(x: Int): Int = macro Impls.bar_impl -} - -class Macros { - def quux(x: Int): Int = macro Impls.quux_impl -}
\ No newline at end of file diff --git a/test/disabled/neg/macro-without-xmacros-b/Test_3.scala b/test/disabled/neg/macro-without-xmacros-b/Test_3.scala deleted file mode 100644 index e9a10e20c9..0000000000 --- a/test/disabled/neg/macro-without-xmacros-b/Test_3.scala +++ /dev/null @@ -1,4 +0,0 @@ -object Test extends App { - import Macros.Shmacros._ - println(foo(2) + Macros.bar(2) * new Macros().quux(4)) -}
\ No newline at end of file diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi.check b/test/disabled/run/macro-reflective-mamd-normal-mi.check deleted file mode 100644 index e69de29bb2..0000000000 --- a/test/disabled/run/macro-reflective-mamd-normal-mi.check +++ /dev/null diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi.flags b/test/disabled/run/macro-reflective-mamd-normal-mi.flags deleted file mode 100644 index e69de29bb2..0000000000 --- a/test/disabled/run/macro-reflective-mamd-normal-mi.flags +++ /dev/null diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala b/test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala deleted file mode 100644 index dc7d42d23e..0000000000 --- a/test/disabled/run/macro-reflective-mamd-normal-mi/Impls_1.scala +++ /dev/null @@ -1,9 +0,0 @@ -import scala.reflect.makro.{Context => Ctx} - -object Impls { - def foo(c: Ctx)(x: c.Expr[Int]) = { - import c.mirror._ - val body = Apply(Select(x.tree, newTermName("$plus")), List(Literal(Constant(1)))) - Expr[Int](body) - } -} diff --git a/test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala b/test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala deleted file mode 100644 index 7cbe425fc8..0000000000 --- a/test/disabled/run/macro-reflective-mamd-normal-mi/Macros_Test_2.scala +++ /dev/null @@ -1,16 +0,0 @@ -//object Macros { -// def foo(x: Int) = macro Impls.foo -//} - -object Test extends App { - import scala.reflect.mirror._ - - val macrobody = Select(Ident(newTermName("Impls")), newTermName("foo")) - val macroparam = ValDef(NoMods, newTermName("x"), TypeTree(definitions.IntClass.asType), EmptyTree) - val macrodef = DefDef(Modifiers(Set(scala.reflect.api.Modifier.`macro`)), newTermName("foo"), Nil, List(List(macroparam)), TypeTree(), macrobody) - val modulector = DefDef(NoMods, nme.CONSTRUCTOR, Nil, List(List()), TypeTree(), Block(Apply(Select(Super(This(EmptyTypeName), EmptyTypeName), nme.CONSTRUCTOR), List()))) - val module = ModuleDef(NoMods, newTermName("Macros"), Template(Nil, emptyValDef, List(modulector, macrodef))) - val macroapp = Apply(Select(Ident("Macros"), newTermName("foo")), List(Literal(Constant(42)))) - val tree = Block(macrodef, module, macroapp) - println(tree.eval) -} |