From f08282946647ec4049af965024b4638a4a55f5fd Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Thu, 3 Mar 2016 22:30:39 +1000 Subject: SI-9425 Fix a residual bug with multi-param-list case classes During code review for the fix for SI-9546, we found a corner case in the SI-9425 that remained broken. Using `finalResultType` peels off all the constructor param lists, and solves that problem. --- test/files/run/t9546e.scala | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/files/run/t9546e.scala (limited to 'test/files') diff --git a/test/files/run/t9546e.scala b/test/files/run/t9546e.scala new file mode 100644 index 0000000000..b19d0871aa --- /dev/null +++ b/test/files/run/t9546e.scala @@ -0,0 +1,15 @@ +case class A private (x: Int) +case class B private (x: Int)(y: Int) + +class C { + def f = A(1) + def g = B(1)(2) // was: constructor B in class B cannot be accessed in class C +} + +object Test { + def main(args: Array[String]): Unit = { + new C().f + new C().g + } + +} -- cgit v1.2.3