diff options
author | Paul Phillips <paulp@improving.org> | 2013-01-31 20:04:29 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2013-01-31 20:04:29 -0800 |
commit | 08596af059edd3f2343764ba6cd022d65ace5921 (patch) | |
tree | 7e3ed722e634a5b518ca13de6adf3701b36fabdf /test/files | |
parent | 644eb7078a11613a06dcaaefb807cbcc44f65ea7 (diff) | |
parent | 4b39be4b9ce9f93f210994906da814219a64fce1 (diff) | |
download | scala-08596af059edd3f2343764ba6cd022d65ace5921.tar.gz scala-08596af059edd3f2343764ba6cd022d65ace5921.tar.bz2 scala-08596af059edd3f2343764ba6cd022d65ace5921.zip |
Merge pull request #2036 from scalamacros/ticket/5716
[backport] the scanner is now less eager about deprecations
Diffstat (limited to 'test/files')
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] + } +} |