diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-12-30 18:31:41 -0800 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-12-30 18:31:41 -0800 |
commit | 2b3c6606a637746c14785f4de0829d9a9598e899 (patch) | |
tree | 9ba95786cac5be5e92cdce667eb69c50e1327027 /test | |
parent | 93f3d63d67b0b1e81322b67488b80ee0a34d74e6 (diff) | |
parent | 2015ad3ebd833225e93ed19604760a6da2522bb1 (diff) | |
download | scala-2b3c6606a637746c14785f4de0829d9a9598e899.tar.gz scala-2b3c6606a637746c14785f4de0829d9a9598e899.tar.bz2 scala-2b3c6606a637746c14785f4de0829d9a9598e899.zip |
Merge pull request #1807 from scalamacros/topic/ident-deprecation-warnings
the scanner is now less eager about deprecations
Diffstat (limited to 'test')
3 files changed, 20 insertions, 0 deletions
diff --git a/test/files/neg/macro-false-deprecation-warning.check b/test/files/neg/macro-false-deprecation-warning.check new file mode 100644 index 0000000000..7d56505ec4 --- /dev/null +++ b/test/files/neg/macro-false-deprecation-warning.check @@ -0,0 +1,4 @@ +Impls_Macros_1.scala:5: error: illegal start of simple expression +} +^ +one error found diff --git a/test/files/neg/macro-false-deprecation-warning.flags b/test/files/neg/macro-false-deprecation-warning.flags new file mode 100644 index 0000000000..59af162db6 --- /dev/null +++ b/test/files/neg/macro-false-deprecation-warning.flags @@ -0,0 +1 @@ +-language:experimental.macros -deprecation
\ No newline at end of file diff --git a/test/files/neg/macro-false-deprecation-warning/Impls_Macros_1.scala b/test/files/neg/macro-false-deprecation-warning/Impls_Macros_1.scala new file mode 100644 index 0000000000..6dc2ea114b --- /dev/null +++ b/test/files/neg/macro-false-deprecation-warning/Impls_Macros_1.scala @@ -0,0 +1,15 @@ +import scala.reflect.macros.Context + +object Helper { + def unapplySeq[T](x: List[T]): Option[Seq[T]] = +} + +object Macros { + def impl[T: c.WeakTypeTag](c: Context)(x: c.Expr[List[T]]) = { + c.universe.reify(Helper.unapplySeq(x.splice)) + } + + object UnapplyMacro { + def unapplySeq[T](x: List[T]): Option[Seq[T]] = macro impl[T] + } +} |