diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-03-03 22:30:39 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-03-04 13:26:05 +1000 |
commit | f08282946647ec4049af965024b4638a4a55f5fd (patch) | |
tree | 9f34715e57f643184cf987fbb871f92eee66f391 /test/files/run/t9546e.scala | |
parent | fe5bd09861994734bc394813d069ea40c89d39de (diff) | |
download | scala-f08282946647ec4049af965024b4638a4a55f5fd.tar.gz scala-f08282946647ec4049af965024b4638a4a55f5fd.tar.bz2 scala-f08282946647ec4049af965024b4638a4a55f5fd.zip |
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.
Diffstat (limited to 'test/files/run/t9546e.scala')
-rw-r--r-- | test/files/run/t9546e.scala | 15 |
1 files changed, 15 insertions, 0 deletions
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 + } + +} |