summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/files/run/t8196.scala25
1 files changed, 23 insertions, 2 deletions
diff --git a/test/files/run/t8196.scala b/test/files/run/t8196.scala
index d526eafbb3..e219ac166b 100644
--- a/test/files/run/t8196.scala
+++ b/test/files/run/t8196.scala
@@ -1,7 +1,8 @@
+import scala.reflect.runtime.{ universe => ru }
+
object Test extends App {
trait FormTrait {
- import scala.reflect.runtime.{ universe => ru }
val runtimeMirror = ru.runtimeMirror(this.getClass.getClassLoader)
val instanceMirror = runtimeMirror.reflect(this)
@@ -26,5 +27,25 @@ object Test extends App {
()
}
- f()
+ val g = () => {
+ // Reported as SI-8195, same root cause
+ trait Form {
+
+ private val runtimeMirror = ru.runtimeMirror(this.getClass.getClassLoader)
+ private val instanceMirror = runtimeMirror.reflect(this)
+ private val members = instanceMirror.symbol.typeSignature.members
+
+ }
+
+ val f1 = new Form {
+ val a = 1
+ }
+
+ val f2 = new Form {
+ val b = f1.a
+ }
+ }
+
+ f()
+ g()
}