summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/run/names-defaults.scala5
-rw-r--r--test/files/run/t3648.check1
-rw-r--r--test/files/run/t3648.scala10
3 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala
index f197d2ff11..8ddfcd950d 100644
--- a/test/files/run/names-defaults.scala
+++ b/test/files/run/names-defaults.scala
@@ -345,6 +345,11 @@ object Test extends Application {
(new t3338.Test).a
+ // subclassing and defaults in both class constructors
+ class CBLAH(val x: Int = 1)
+ class DBLAH(val y: String = "2") extends CBLAH()
+ (new DBLAH())
+
// DEFINITIONS
def test1(a: Int, b: String) = println(a +": "+ b)
diff --git a/test/files/run/t3648.check b/test/files/run/t3648.check
new file mode 100644
index 0000000000..5f7559f647
--- /dev/null
+++ b/test/files/run/t3648.check
@@ -0,0 +1 @@
+kult
diff --git a/test/files/run/t3648.scala b/test/files/run/t3648.scala
new file mode 100644
index 0000000000..91927d6d6d
--- /dev/null
+++ b/test/files/run/t3648.scala
@@ -0,0 +1,10 @@
+object Test {
+ class C(val s: String = "")
+ object C extends C() {
+ override def toString() = "kult"
+ }
+
+ def main(args: Array[String]) {
+ println(C)
+ }
+}