summaryrefslogtreecommitdiff
path: root/test/files/run/t5923d/Macros_1.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2013-04-30 21:14:06 +0200
committerEugene Burmako <xeno.by@gmail.com>2014-07-02 14:22:00 +0200
commit0c5dd9e02f03143372237018c55e12a07c13f8c1 (patch)
treee1295c82ff27e3191c17f090b135903103b05f2a /test/files/run/t5923d/Macros_1.scala
parent300db2a1e3eefc2a6ed379c870bc7da42a26e69a (diff)
downloadscala-0c5dd9e02f03143372237018c55e12a07c13f8c1.tar.gz
scala-0c5dd9e02f03143372237018c55e12a07c13f8c1.tar.bz2
scala-0c5dd9e02f03143372237018c55e12a07c13f8c1.zip
[backport] SI-7470 implements fundep materialization
Backports 21a8c6c from the 2.11.x branch under -Xfundep-materialization as per Miles Sabin's request. Thanks Miles!
Diffstat (limited to 'test/files/run/t5923d/Macros_1.scala')
-rw-r--r--test/files/run/t5923d/Macros_1.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t5923d/Macros_1.scala b/test/files/run/t5923d/Macros_1.scala
new file mode 100644
index 0000000000..f32d1af704
--- /dev/null
+++ b/test/files/run/t5923d/Macros_1.scala
@@ -0,0 +1,9 @@
+import scala.language.experimental.macros
+import scala.reflect.macros.Context
+
+trait MappedRow
+trait RowMapper[T <: MappedRow]
+object RowMapper {
+ implicit def mapper[T <: MappedRow]: RowMapper[T] = macro impl[T]
+ def impl[T <: MappedRow : c.WeakTypeTag](c: Context) = c.universe.reify(new RowMapper[T]{})
+} \ No newline at end of file