diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/junit/scala/reflect/internal/PrintersTest.scala | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/test/junit/scala/reflect/internal/PrintersTest.scala b/test/junit/scala/reflect/internal/PrintersTest.scala index 0e93e30dcc..4c9dfaf038 100644 --- a/test/junit/scala/reflect/internal/PrintersTest.scala +++ b/test/junit/scala/reflect/internal/PrintersTest.scala @@ -976,6 +976,29 @@ trait ValAndDefPrintTests { @Test def testDef9 = assertPrintedCode("def a(x: scala.Int)(implicit z: scala.Double, y: scala.Float): scala.Unit = ()") + @Test def testDefWithLazyVal1 = assertResultCode( + code = "def a = { lazy val test: Int = 42 }")( + parsedCode = sm""" + |def a = { + | lazy val test: Int = 42; + | () + |} + """, + typedCode = sm""" + |def a = { + | lazy val test: scala.Int = 42; + | () + |}""") + + @Test def testDefWithLazyVal2 = assertPrintedCode(sm""" + |def a = { + | lazy val test = { + | scala.Predef.println(); + | scala.Predef.println() + | }; + | () + |}""") + @Test def testDefWithParams1 = assertPrintedCode("def foo(x: scala.Int*) = ()") @Test def testDefWithParams2 = assertPrintedCode(sm""" @@ -1140,4 +1163,4 @@ trait QuasiTreesPrintTests { | def y = "test" |}""") } -*/
\ No newline at end of file +*/ |