From 72597908f803fbf709bf8af8379ca10c7cfd7639 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Tue, 3 Jul 2007 15:55:20 +0000 Subject: Fixed lazy vals to allow for patterns. --- test/files/run/lazy-exprs.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/files/run/lazy-exprs.scala') 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 } } -- cgit v1.2.3