diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2012-03-06 22:43:15 +0100 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2012-03-06 22:43:15 +0100 |
commit | c5f68c11d3d8b9f12fe8608d7cea5d33c260c793 (patch) | |
tree | 05493e3b7dbf6eb50abee2d9e41f0827e39ce8b6 /test | |
parent | 35252961db5da65307b3ba43ea9db76da73ee902 (diff) | |
download | scala-c5f68c11d3d8b9f12fe8608d7cea5d33c260c793.tar.gz scala-c5f68c11d3d8b9f12fe8608d7cea5d33c260c793.tar.bz2 scala-c5f68c11d3d8b9f12fe8608d7cea5d33c260c793.zip |
Force .info before creating new synthetic syms
Closes SI-5545. In the long run this should be generalized, as other
phases might suffer from the same problem. Full explanation here:
https://issues.scala-lang.org/browse/SI-5545
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t5545.check | 0 | ||||
-rw-r--r-- | test/files/run/t5545.scala | 27 |
2 files changed, 27 insertions, 0 deletions
diff --git a/test/files/run/t5545.check b/test/files/run/t5545.check new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/files/run/t5545.check diff --git a/test/files/run/t5545.scala b/test/files/run/t5545.scala new file mode 100644 index 0000000000..7efa6d84f1 --- /dev/null +++ b/test/files/run/t5545.scala @@ -0,0 +1,27 @@ +import scala.tools.partest._ +import java.io._ + +object Test extends DirectTest { + + override def extraSettings: String = "-usejavacp -d " + testOutput.path + " -cp " + testOutput.path + + override def code = """ + // SI-5545 + trait F[@specialized(Int) T1, R] { + def f(v1: T1): R + def g = v1 => f(v1) + } + """.trim + + override def show(): Unit = { + // redirect err to out, for logging + val prevErr = System.err + System.setErr(System.out) + compile() + // the bug manifests at the second compilation, when the bytecode is already there + compile() + System.setErr(prevErr) + } + + override def isDebug = false // so we don't get the newSettings warning +} |