diff options
Diffstat (limited to 'test/files/run/lazy-exprs.scala')
-rw-r--r-- | test/files/run/lazy-exprs.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/lazy-exprs.scala b/test/files/run/lazy-exprs.scala index 307915bcac..8a80423646 100644 --- a/test/files/run/lazy-exprs.scala +++ b/test/files/run/lazy-exprs.scala @@ -68,12 +68,23 @@ object TestExpressions { } } + lazy val (x, y) = ({print("x"); "x"}, {print("y"); "y"}) + def testPatLazyVal { + println("lazy val with patterns:") + print("x and y: ") + println("(" + x + ", " + y + ")") + lazy val (x1, y1) = ({print("x1"); "x1"}, {print("y1"); "y1"}) + print("x1 and y1: ") + println("(" + x1 + ", " + y1 + ")") + } + def test { patmatchScrut patmatchCase patmatchPat ifcond testPatMatchField + testPatLazyVal } } |