diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2015-07-02 16:11:50 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2015-07-02 16:21:28 +0200 |
commit | c42428d76652cbf3ffda1204b8f2e7bb5654f119 (patch) | |
tree | a6f02d584cf1e032bcb4fe69d9699e5b149e5c68 /test/files/run/reify_newimpl_52.scala | |
parent | 743b7297566e9a431e361388c85475deecb71c5e (diff) | |
download | scala-c42428d76652cbf3ffda1204b8f2e7bb5654f119.tar.gz scala-c42428d76652cbf3ffda1204b8f2e7bb5654f119.tar.bz2 scala-c42428d76652cbf3ffda1204b8f2e7bb5654f119.zip |
Fix superclass for Java interface symbols created in JavaMirrors
According to the spec [1] the superclass of an interface is always
Object.
Restores the tests that were moved to pending in bf951ec1,
fixex part of SI-9374.
[1] https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.1
Diffstat (limited to 'test/files/run/reify_newimpl_52.scala')
-rw-r--r-- | test/files/run/reify_newimpl_52.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/files/run/reify_newimpl_52.scala b/test/files/run/reify_newimpl_52.scala new file mode 100644 index 0000000000..f01199e830 --- /dev/null +++ b/test/files/run/reify_newimpl_52.scala @@ -0,0 +1,18 @@ +import scala.reflect.runtime.universe._ +import scala.tools.reflect.Eval + +object Test extends App { + { + var counter = 0 + lazy val x = { counter += 1; counter } + lazy val y = { counter += 1; counter } + val code = reify { + def foo = y // ensures that y is the first freevar we find + val bar = reify { println(y * x) } + bar.eval + println(x) + println(y) + } + code.eval + } +}
\ No newline at end of file |