From 8d96aea0a2d626e78a2f6477cb739447a17be153 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Thu, 23 Aug 2007 09:55:45 +0000 Subject: Fixed bug #1287, lazy vals in trait methods. --- test/files/run/lazy-traits.scala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/files/run/lazy-traits.scala b/test/files/run/lazy-traits.scala index f91da7ed1a..6238813e8d 100644 --- a/test/files/run/lazy-traits.scala +++ b/test/files/run/lazy-traits.scala @@ -116,6 +116,13 @@ trait PrivateLazy { /** Test successful compilation. */ class InheritPrivateLazy extends AnyRef with PrivateLazy {} +/** Test successful compilation, see bug #1287. */ +trait LocalLazyVal { + def foo = { + lazy val next = 10 + 1 + next + } +} object Test extends Application { -- cgit v1.2.3