diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-12-13 00:46:06 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-01-31 11:53:24 +0100 |
commit | ced74110348d550c3870ac76ef067b151e97b237 (patch) | |
tree | f917e1ef3d90b32e477f16223de2ef924791d797 /test/files/neg/macro-false-deprecation-warning | |
parent | 2fa859e1b3eb2ac57058feaba87d96adfbac9209 (diff) | |
download | scala-ced74110348d550c3870ac76ef067b151e97b237.tar.gz scala-ced74110348d550c3870ac76ef067b151e97b237.tar.bz2 scala-ced74110348d550c3870ac76ef067b151e97b237.zip |
the scanner is now less eager about deprecations
When healing braces it isn't very useful to report deprecation warnings,
especially since this process is just simple context-free skimming, which
can't know about what positions can accept what identifiers.
Backport from https://github.com/scala/scala/pull/1807.
Original commit is https://github.com/scala/scala/commit/e5d34d70499504e085ddf957c1c818ffb63f4e8d.
Diffstat (limited to 'test/files/neg/macro-false-deprecation-warning')
-rw-r--r-- | test/files/neg/macro-false-deprecation-warning/Impls_Macros_1.scala | 15 |
1 files changed, 15 insertions, 0 deletions
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] + } +} |