summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-12-10 14:37:15 +0000
committerMartin Odersky <odersky@gmail.com>2008-12-10 14:37:15 +0000
commit1566ee0c368dadec297858d6ff3c849f70b5f137 (patch)
tree822766986dc7a5f895db263ee64972af0d8b247d /test/files/run
parentf83d8977544ec7fc3eed59e032e3705f30290c00 (diff)
downloadscala-1566ee0c368dadec297858d6ff3c849f70b5f137.tar.gz
scala-1566ee0c368dadec297858d6ff3c849f70b5f137.tar.bz2
scala-1566ee0c368dadec297858d6ff3c849f70b5f137.zip
fixed #1364 (overeriding vals in traits)
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t1368.scala9
1 files changed, 9 insertions, 0 deletions
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
+}
+