summaryrefslogtreecommitdiff
path: root/test/files/run/t5270.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-02-13 22:04:54 +0100
committerEugene Burmako <xeno.by@gmail.com>2012-02-14 00:40:51 +0100
commitadb218d8d230b4713942f5b220d8cd0602995aae (patch)
treeed6db1c13ca3a36098ca54f9a5c46e2e82f0e59f /test/files/run/t5270.scala
parent6548dcf12d83e327df2f90048140fb95346b7e95 (diff)
downloadscala-adb218d8d230b4713942f5b220d8cd0602995aae.tar.gz
scala-adb218d8d230b4713942f5b220d8cd0602995aae.tar.bz2
scala-adb218d8d230b4713942f5b220d8cd0602995aae.zip
Fixes https://issues.scala-lang.org/browse/SI-5229
Diffstat (limited to 'test/files/run/t5270.scala')
-rw-r--r--test/files/run/t5270.scala26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/files/run/t5270.scala b/test/files/run/t5270.scala
new file mode 100644
index 0000000000..10f79790b0
--- /dev/null
+++ b/test/files/run/t5270.scala
@@ -0,0 +1,26 @@
+import scala.tools.nsc.reporters._
+import scala.tools.nsc.Settings
+import reflect.runtime.Mirror.ToolBox
+
+object Test extends App {
+ val code = scala.reflect.Code.lift{
+ class Y {
+ def y = 100
+ }
+
+ trait Z { this: Y =>
+ val z = 2 * y
+ }
+
+ class X extends Y with Z {
+ def println() = Predef.println(z)
+ }
+
+ new X().println()
+ };
+
+ val reporter = new ConsoleReporter(new Settings)
+ val toolbox = new ToolBox(reporter)
+ val ttree = toolbox.typeCheck(code.tree)
+ toolbox.runExpr(ttree)
+}