aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/templateParents.scala
Commit message (Collapse)AuthorAgeFilesLines
* Make all dotty tests end in newlineDmitry Petrashko2015-04-091-1/+1
|
* Check that inferred parent classes are feasible.Martin Odersky2014-03-011-0/+7
|
* Reorganization of template parents.Martin Odersky2014-03-011-0/+9
Template parents always were constructor calls before. This is not correct because in a situation like the one elaborated in templateParents, the trait D has the class C as supertype, but it does not call its constructor (in fact, if we added a () parameter list to make it into a constructor this would be wrong because C takes parameters. Now parents can be either types or constructor calls. The logic in Namer and Typer that deals with parents is cleaned up. In particular, we now construct any synthetic class parent as a full type, before calling normalizeToClassRefs. This obviates the forwardRefs logic that needed to be done in a cleanup of Namers. Also added two more checks: (1) All parents except the first one must point to traits. (2) A trait may not call a parent class constructor.