From 40e7cab7a22a8531bdd310bfb57fda51b798c690 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Fri, 11 May 2012 16:00:54 +0200 Subject: Fix SI-5009: case-class copy method now eta-expands over higher parameter lists. Example: Given case class C(a: Int)(b: Int) if you call (new C(1)(2)).copy(a = 10)), you get a function (f: Int => C) such that (f.apply(20)) yields a (new C(10)(20)). --- test/files/pos/t5720-ownerous.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/files/pos') diff --git a/test/files/pos/t5720-ownerous.scala b/test/files/pos/t5720-ownerous.scala index 3a12499612..ad4d4c171d 100644 --- a/test/files/pos/t5720-ownerous.scala +++ b/test/files/pos/t5720-ownerous.scala @@ -28,10 +28,10 @@ class C { //def model = Option(M("foo")()).getOrElse(M("bar")()).copy(currentUser = "")() // the bug - def model = Option(m).getOrElse(M("bar")()).copy("baz")() + def model = Option(m).getOrElse(M("bar")()).copy("baz")("empty") // style points for this version - def modish = ((null: Option[M]) getOrElse new M()()).copy()() + def modish = ((null: Option[M]) getOrElse new M()()).copy()("empty") // various simplifications are too simple case class N(currentUser: String = "anon") -- cgit v1.2.3