From 1dba0583fabb55757ba141d399bb3e492e358c17 Mon Sep 17 00:00:00 2001 From: Eugene Burmako Date: Sat, 21 Apr 2012 19:29:53 +0200 Subject: fixes SI-5689 --- test/files/neg/t5689.check | 7 +++++++ test/files/neg/t5689.flags | 1 + test/files/neg/t5689.scala | 6 ++++++ 3 files changed, 14 insertions(+) create mode 100644 test/files/neg/t5689.check create mode 100644 test/files/neg/t5689.flags create mode 100644 test/files/neg/t5689.scala (limited to 'test') diff --git a/test/files/neg/t5689.check b/test/files/neg/t5689.check new file mode 100644 index 0000000000..f286d08cfa --- /dev/null +++ b/test/files/neg/t5689.check @@ -0,0 +1,7 @@ +t5689.scala:4: error: macro implementation has wrong shape: + required: (c: scala.reflect.makro.Context)(i: c.Expr[Double]): c.Expr[String] + found : (c: scala.reflect.makro.Context)(i: c.Expr[Double]): c.Expr[Int] +type mismatch for return type : c.Expr[String] does not conform to c.Expr[Int] + def returnsString(i: Double): String = macro returnsIntImpl + ^ +one error found diff --git a/test/files/neg/t5689.flags b/test/files/neg/t5689.flags new file mode 100644 index 0000000000..cd66464f2f --- /dev/null +++ b/test/files/neg/t5689.flags @@ -0,0 +1 @@ +-language:experimental.macros \ No newline at end of file diff --git a/test/files/neg/t5689.scala b/test/files/neg/t5689.scala new file mode 100644 index 0000000000..ef7a45b364 --- /dev/null +++ b/test/files/neg/t5689.scala @@ -0,0 +1,6 @@ +import scala.reflect.makro.Context + +object Macros { + def returnsString(i: Double): String = macro returnsIntImpl + def returnsIntImpl(c: Context)(i: c.Expr[Double]): c.Expr[Int] = ??? +} -- cgit v1.2.3