summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-11-23 02:33:56 -0800
committerEugene Burmako <xeno.by@gmail.com>2012-11-23 02:33:56 -0800
commit5b498a2612f967c944fa1ed4f63a09d6acc41791 (patch)
treeb19851d1264adea4a6cff3dbfd117cd89383d1a8 /test
parenta0e642b7fe608b869071b690e7907b934b10db5a (diff)
parent548a54d708d8aaceea6abe0931aabaa70b2cd925 (diff)
downloadscala-5b498a2612f967c944fa1ed4f63a09d6acc41791.tar.gz
scala-5b498a2612f967c944fa1ed4f63a09d6acc41791.tar.bz2
scala-5b498a2612f967c944fa1ed4f63a09d6acc41791.zip
Merge pull request #1660 from scalamacros/topic/6023
SI-6023 reify abstract vals
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t6023.check12
-rw-r--r--test/files/run/t6023.scala17
2 files changed, 29 insertions, 0 deletions
diff --git a/test/files/run/t6023.check b/test/files/run/t6023.check
new file mode 100644
index 0000000000..ee93565234
--- /dev/null
+++ b/test/files/run/t6023.check
@@ -0,0 +1,12 @@
+{
+ abstract trait Foo extends AnyRef {
+ <stable> <accessor> def a: Int
+ };
+ ()
+}
+{
+ abstract trait Foo extends AnyRef {
+ <stable> <accessor> def a: Int
+ };
+ ()
+}
diff --git a/test/files/run/t6023.scala b/test/files/run/t6023.scala
new file mode 100644
index 0000000000..07af3685a5
--- /dev/null
+++ b/test/files/run/t6023.scala
@@ -0,0 +1,17 @@
+import scala.reflect.runtime.universe._
+import scala.reflect.runtime.{currentMirror => cm}
+import scala.tools.reflect.ToolBox
+
+object Test extends App {
+ // test 1: reify
+ val tree = reify{ trait Foo { val a: Int } }.tree
+ println(tree.toString)
+
+ // test 2: import and typecheck
+ val toolbox = cm.mkToolBox()
+ val ttree = toolbox.typeCheck(tree)
+ println(ttree.toString)
+
+ // test 3: import and compile
+ toolbox.eval(tree)
+}