summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t1591_pos.scala7
-rw-r--r--test/files/pos/t1591b.scala13
2 files changed, 20 insertions, 0 deletions
diff --git a/test/files/pos/t1591_pos.scala b/test/files/pos/t1591_pos.scala
new file mode 100644
index 0000000000..4f55d7ce19
--- /dev/null
+++ b/test/files/pos/t1591_pos.scala
@@ -0,0 +1,7 @@
+trait A
+
+object Test {
+ lazy val a = new A {
+ object Zenek
+ }
+}
diff --git a/test/files/pos/t1591b.scala b/test/files/pos/t1591b.scala
new file mode 100644
index 0000000000..c671ad6472
--- /dev/null
+++ b/test/files/pos/t1591b.scala
@@ -0,0 +1,13 @@
+import scala.tools.nsc._
+
+class SemanticTokens(val compiler: Global) {
+ import compiler._
+
+ def build() = ErrorType
+
+ class Process {
+ def f() = analyzer
+ // or to crash the compiler instead of a nice message,
+ // def f() = analyzer underlying _
+ }
+}