diff options
author | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-12 22:44:33 +0100 |
---|---|---|
committer | Samuel Gruetter <samuel.gruetter@epfl.ch> | 2014-03-12 22:44:33 +0100 |
commit | 9ef5f6817688f814a3450126aa7383b0928e80a0 (patch) | |
tree | 5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/neg/macro-invalidret.check | |
parent | 194be919664447631ba55446eb4874979c908d27 (diff) | |
download | dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2 dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip |
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/neg/macro-invalidret.check')
-rw-r--r-- | tests/untried/neg/macro-invalidret.check | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/untried/neg/macro-invalidret.check b/tests/untried/neg/macro-invalidret.check new file mode 100644 index 000000000..568cc7c57 --- /dev/null +++ b/tests/untried/neg/macro-invalidret.check @@ -0,0 +1,35 @@ +Macros_Test_2.scala:2: error: macro implementation has incompatible shape: + required: (c: scala.reflect.macros.blackbox.Context): c.Expr[Any] + or : (c: scala.reflect.macros.blackbox.Context): c.Tree + found : (c: scala.reflect.macros.blackbox.Context): Int +type mismatch for return type: Int does not conform to c.Expr[Any] + def foo1 = macro Impls.foo1 + ^ +Macros_Test_2.scala:3: error: macro implementation has incompatible shape: + required: (c: scala.reflect.macros.blackbox.Context): c.Expr[Any] + or : (c: scala.reflect.macros.blackbox.Context): c.Tree + found : (c: scala.reflect.macros.blackbox.Context): reflect.runtime.universe.Literal +type mismatch for return type: reflect.runtime.universe.Literal does not conform to c.Expr[Any] + def foo2 = macro Impls.foo2 + ^ +Macros_Test_2.scala:6: error: macro defs must have explicitly specified return types + def foo5 = macro Impls.foo5 + ^ +Macros_Test_2.scala:7: warning: macro defs must have explicitly specified return types (inference of Int from macro impl's c.Expr[Int] is deprecated and is going to stop working in 2.12) + def foo6 = macro Impls.foo6 + ^ +Macros_Test_2.scala:14: error: exception during macro expansion: +scala.NotImplementedError: an implementation is missing + at scala.Predef$.$qmark$qmark$qmark(Predef.scala:225) + at Impls$.foo3(Impls_1.scala:7) + + foo3 + ^ +Macros_Test_2.scala:15: error: macro implementation is missing + foo4 + ^ +Macros_Test_2.scala:17: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses + foo6 + ^ +two warnings found +5 errors found |