From 1566ee0c368dadec297858d6ff3c849f70b5f137 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 10 Dec 2008 14:37:15 +0000 Subject: fixed #1364 (overeriding vals in traits) --- test/files/run/t1368.scala | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 test/files/run/t1368.scala (limited to 'test/files/run') diff --git a/test/files/run/t1368.scala b/test/files/run/t1368.scala new file mode 100644 index 0000000000..c9b2297203 --- /dev/null +++ b/test/files/run/t1368.scala @@ -0,0 +1,9 @@ +object Test extends Application { + trait Happy { val status = "happy" } + trait Sad { val status = "sad" } + + def go1 = (new AnyRef with Happy with Sad { override val status = "happysad" }).status + def go2 = (new AnyRef with Happy with Sad { val blurp = "happysad" ; override val status = blurp }).status + def go3 = (new AnyRef with Happy with Sad { override val status = blurp ; val blurp = "happysad" }).status +} + -- cgit v1.2.3