diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/names-defaults.check | 3 | ||||
-rw-r--r-- | test/files/run/names-defaults.scala | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/test/files/run/names-defaults.check b/test/files/run/names-defaults.check index 643615368d..3fed6e601a 100644 --- a/test/files/run/names-defaults.check +++ b/test/files/run/names-defaults.check @@ -91,4 +91,5 @@ Fact2(10,blabla) test5 2 test5 -3
\ No newline at end of file +3 +slkdfj1
\ No newline at end of file diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index 38ba317029..482c4f2f7b 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -175,6 +175,12 @@ object Test extends Application { println(argName) // should be 3 + // dependent types and copy method + val a11 = new A2 + val b11 = a11.B2(new a11.C2)(1) + println(b11.copy()()) + + // DEFINITIONS def test1(a: Int, b: String) = println(a +": "+ b) def test2(u: Int, v: Int)(k: String, l: Int) = println(l +": "+ k +", "+ (u + v)) @@ -229,3 +235,12 @@ class MN extends M { case class Factory(x: Int = 1, y: String)(z: String = y) case class Fact2[T, +U](x: T = "ju", y: U = 1)(z: T = 2) + + +// dependent types and copy method +class A2 { + case class B2(x: C2)(y: Int) extends A2 { + override def toString = "slkdfj" + y + } + class C2 +} |