diff options
author | Paul Phillips <paulp@improving.org> | 2012-04-12 15:23:51 +0100 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-04-12 15:23:51 +0100 |
commit | e4976678fa7479c2a44f19b00cb691dc5b881609 (patch) | |
tree | 5b6749880f8662548979f5e57509258971854500 /test/files/run/macro-invalidret-nontypeable | |
parent | f9e8a8c13ff6f75f330766ae6e0febe431fc4b12 (diff) | |
parent | 46d0d73f66111d5d31b9fd593972970d7e9056bb (diff) | |
download | scala-e4976678fa7479c2a44f19b00cb691dc5b881609.tar.gz scala-e4976678fa7479c2a44f19b00cb691dc5b881609.tar.bz2 scala-e4976678fa7479c2a44f19b00cb691dc5b881609.zip |
Merge commit 'refs/pull/375/head' into develop
Diffstat (limited to 'test/files/run/macro-invalidret-nontypeable')
-rw-r--r-- | test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala | 13 | ||||
-rw-r--r-- | test/files/run/macro-invalidret-nontypeable/Test_2.scala | 6 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala b/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala new file mode 100644 index 0000000000..f3a0476a35 --- /dev/null +++ b/test/files/run/macro-invalidret-nontypeable/Impls_Macros_1.scala @@ -0,0 +1,13 @@ +import scala.reflect.makro.{Context => Ctx} + +object Impls { + def foo(c: Ctx) = { + import c.mirror._ + val body = Ident("IDoNotExist") + Expr[Int](body) + } +} + +object Macros { + def foo = macro Impls.foo +} diff --git a/test/files/run/macro-invalidret-nontypeable/Test_2.scala b/test/files/run/macro-invalidret-nontypeable/Test_2.scala new file mode 100644 index 0000000000..f389231ca6 --- /dev/null +++ b/test/files/run/macro-invalidret-nontypeable/Test_2.scala @@ -0,0 +1,6 @@ +object Test extends App { + import scala.reflect.mirror._ + val tree = Select(Ident("Macros"), newTermName("foo")) + try tree.eval + catch { case ex: Throwable => println(ex.getMessage) } +}
\ No newline at end of file |