diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t6539.check | 18 | ||||
-rw-r--r-- | test/files/neg/t6539/Macro_1.scala | 8 | ||||
-rw-r--r-- | test/files/neg/t6539/Test_2.scala | 10 |
3 files changed, 18 insertions, 18 deletions
diff --git a/test/files/neg/t6539.check b/test/files/neg/t6539.check index a5d5a7244d..b647636338 100644 --- a/test/files/neg/t6539.check +++ b/test/files/neg/t6539.check @@ -1,10 +1,10 @@ -Test_2.scala:2: error: reference to method cto in object M should not survive typechecking: cto may only be used as an argument to m - M.cto // error - ^ -Test_2.scala:3: error: reference to method cto in object M should not survive typechecking: cto may only be used as an argument to m - M.m(M.cto, ()) // error - ^ -Test_2.scala:5: error: reference to method cto in object M should not survive typechecking: cto may only be used as an argument to m - M.cto // error - ^ +Test_2.scala:2: error: cto may only be used as an argument to m + M.cto // error + ^ +Test_2.scala:3: error: cto may only be used as an argument to m + M.m(M.cto, ()) // error + ^ +Test_2.scala:5: error: cto may only be used as an argument to m + M.cto // error + ^ three errors found diff --git a/test/files/neg/t6539/Macro_1.scala b/test/files/neg/t6539/Macro_1.scala index 69bd53fe07..ed52776d95 100644 --- a/test/files/neg/t6539/Macro_1.scala +++ b/test/files/neg/t6539/Macro_1.scala @@ -2,9 +2,9 @@ import language.experimental.macros import reflect.macros.Context object M { - def m(a: Any, b: Any): Any = macro mImpl - def mImpl(c: Context)(a: c.Expr[Any], b: c.Expr[Any]) = a + def m(a: Any, b: Any): Any = macro mImpl + def mImpl(c: Context)(a: c.Expr[Any], b: c.Expr[Any]) = a - @reflect.macros.compileTimeOnly("cto may only be used as an argument to m") - def cto = 0 + @reflect.macros.compileTimeOnly("cto may only be used as an argument to " + "m") + def cto = 0 } diff --git a/test/files/neg/t6539/Test_2.scala b/test/files/neg/t6539/Test_2.scala index 1569c79788..5a602879ec 100644 --- a/test/files/neg/t6539/Test_2.scala +++ b/test/files/neg/t6539/Test_2.scala @@ -1,6 +1,6 @@ object Test { - M.cto // error - M.m(M.cto, ()) // error - M.m((), M.cto) // okay - M.cto // error -}
\ No newline at end of file + M.cto // error + M.m(M.cto, ()) // error + M.m((), M.cto) // okay + M.cto // error +} |