New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScalaTest check using <:< either throws an exception or deadlocks #8196
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8196?orig=1
|
@adriaanm said: |
@xeno-by said: |
@adriaanm said: |
@xeno-by said: |
@retronym said: object Test extends App {
trait FormTrait {
import scala.reflect.runtime.{ universe => ru }
val runtimeMirror = ru.runtimeMirror(this.getClass.getClassLoader)
val instanceMirror = runtimeMirror.reflect(this)
val members = instanceMirror.symbol.typeSignature.members
def fields = members.filter(_.typeSignature <:< ru.typeOf[Int])
}
val f = () => {
class Form1 extends FormTrait {
val f1 = 5
}
val form1 = new Form1
println(form1.fields)
val form2 = new FormTrait {
val g1 = new Form1
}
form2.g1 // comment this line in order to make the test pass
()
}
f()
} I haven't minimized it further, but note that the "remove this line and it passes" comment is accurate, and that this is single threaded. This doesn't crash in 2.11.0-M6, but only because |
@retronym said: |
@xeno-by said: |
@retronym said: |
@retronym said: |
@adriaanm said: |
When the following ScalaTest is executed from within Intellij then an exception is throws (stacktrace see below) or it deadlocks if executed from within sbt (jstack output is attached).
The really strange thing is that the check passes if the last line, i.e. the val x = ... assignment is commented.
Stacktrace when executing test using Intellij:
The text was updated successfully, but these errors were encountered: