summaryrefslogtreecommitdiff
path: root/test/files/pos/fields_widen_trait_var.scala
Commit message (Collapse)AuthorAgeFilesLines
* Ensure trait var accessor type is widenedAdriaan Moors2016-08-291-0/+4
If we don't widen, we'll fail to find the setter when typing `x = 42`, because `x` is constant-folded to `0`, as its type is `=> Int(0)`. After widening, `x` is type checked to `x` and its symbol is the getter in the trait, which can then be rewritten to the setter. Regression spotted and test case by szeiger.