aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t2910.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/pos/t2910.scala')
-rw-r--r--tests/untried/pos/t2910.scala33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/untried/pos/t2910.scala b/tests/untried/pos/t2910.scala
new file mode 100644
index 000000000..f9f2c87a9
--- /dev/null
+++ b/tests/untried/pos/t2910.scala
@@ -0,0 +1,33 @@
+object Test {
+ def test1: Unit = {
+ C
+ object C
+ }
+
+ def test2: Unit = {
+ println(s.length)
+ lazy val s = "abc"
+ }
+
+ def test3: Unit = {
+ lazy val lazyBar = bar
+ object bar {
+ val foo = 12
+ }
+ lazy val lazyBar2 = bar
+ }
+
+ def test4: Unit = {
+ lazy val x = {
+ x
+ lazy val x = 12
+ 0
+ }
+ }
+
+ def test5: Unit = {
+ lazy val f: Int = g
+ Console.println("foo")
+ lazy val g: Int = f
+ }
+}