diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-05-11 12:14:19 -0700 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-05-11 12:14:19 -0700 |
commit | aa7568e8161552952ae16e0a5a79ce3ea517abe3 (patch) | |
tree | 679819f1381ec39b79169c2c21ca5d6acca72b63 /test/files/run/t7047/Impls_Macros_1.scala | |
parent | 0ae7e55209129dc3d76d56887e88b2c817e6b904 (diff) | |
parent | 4e64a2731d6e4c27e2fd4c75559e118708e79ad5 (diff) | |
download | scala-aa7568e8161552952ae16e0a5a79ce3ea517abe3.tar.gz scala-aa7568e8161552952ae16e0a5a79ce3ea517abe3.tar.bz2 scala-aa7568e8161552952ae16e0a5a79ce3ea517abe3.zip |
Merge pull request #2494 from scalamacros/ticket/5923
makes sense of implicit macros!
Diffstat (limited to 'test/files/run/t7047/Impls_Macros_1.scala')
-rw-r--r-- | test/files/run/t7047/Impls_Macros_1.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t7047/Impls_Macros_1.scala b/test/files/run/t7047/Impls_Macros_1.scala new file mode 100644 index 0000000000..2992e3efe4 --- /dev/null +++ b/test/files/run/t7047/Impls_Macros_1.scala @@ -0,0 +1,19 @@ +import scala.reflect.macros.Context +import language.experimental.macros + +class Foo + +object Macros { + def impl(c: Context) = { + import c.universe._ + try { + c.inferImplicitValue(typeOf[Foo], silent = false) + c.abort(c.enclosingPosition, "silent=false is not working") + } catch { + case _: Exception => + } + c.literalNull + } + + def foo = macro impl +}
\ No newline at end of file |