summaryrefslogtreecommitdiff
path: root/test/files/run/t9223b.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-9223 By-name constructor params should not be aliasedJason Zaugg2015-03-171-0/+8
Usually, the compiler tries avoids creating a field in a subclass for a constructor parameter that is known to be stored in a field in one of its superclasses. However, in the enclosed test `run/t9223.scala`, this mechanism confuses `=> A` with `A`, which results in a runtime `ClassCastException`. This commit avoids using param aliases for by-name parameters. I have also added a test for something close the opposite case, where the subclass has a strict parameter and the superclass has a by-name parameter. This was working correctly before this patch.