aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run/t5923d
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-12 18:30:53 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-12 18:30:53 +0200
commit89bacb9c25a58454ff1878e67f7ea07ffc8c269f (patch)
tree51f1ff6c66aebe1b6109b1cffcc2bb8e4cf760a3 /tests/pending/run/t5923d
parenta0fa33deafbea1bf53edc068c5ed9db5592822f9 (diff)
downloaddotty-89bacb9c25a58454ff1878e67f7ea07ffc8c269f.tar.gz
dotty-89bacb9c25a58454ff1878e67f7ea07ffc8c269f.tar.bz2
dotty-89bacb9c25a58454ff1878e67f7ea07ffc8c269f.zip
Run tests as they were in scala.
Diffstat (limited to 'tests/pending/run/t5923d')
-rw-r--r--tests/pending/run/t5923d/Macros_1.scala9
-rw-r--r--tests/pending/run/t5923d/Test_2.scala7
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/pending/run/t5923d/Macros_1.scala b/tests/pending/run/t5923d/Macros_1.scala
new file mode 100644
index 000000000..1400674d4
--- /dev/null
+++ b/tests/pending/run/t5923d/Macros_1.scala
@@ -0,0 +1,9 @@
+import scala.language.experimental.macros
+import scala.reflect.macros.blackbox.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
diff --git a/tests/pending/run/t5923d/Test_2.scala b/tests/pending/run/t5923d/Test_2.scala
new file mode 100644
index 000000000..6be10227c
--- /dev/null
+++ b/tests/pending/run/t5923d/Test_2.scala
@@ -0,0 +1,7 @@
+class RowA extends MappedRow
+class RowB extends MappedRow
+
+object Test extends App {
+ implicitly[RowMapper[RowA]]
+ implicitly[RowMapper[RowB]]
+} \ No newline at end of file