aboutsummaryrefslogtreecommitdiff
path: root/test/test/DeSugarTest.scala
Commit message (Collapse)AuthorAgeFilesLines
* Clean up parameterized typedefsMartin Odersky2016-11-111-1/+1
| | | | | | | | Express them in terms PolyTypeTrees rather than having an irregular, untyped only tparams field. This is necessary if we want to pickle type trees instead of types, because now the rhs of a typedef tells the whole story, so we are not required any longer to use the info of the symbol.
* Move Mode to coreMartin Odersky2016-04-011-1/+1
| | | | | Mode is used from a lot of low-level code, does not just reflect Typer info. So it makes more sense top to place it in the core package.
* Add second field to SeqLiteralMartin Odersky2016-03-101-2/+2
| | | | | | | The field keeps track of the element type. This is necessary because JavaSeqLiteral is nonvariant and the elements might be empty, so we cannot always compute the type from the element types.
* Replace withMode by addModeMartin Odersky2015-10-011-1/+1
| | | | | | withMode sets the whole mode, nit an individual bits. This was used wrongly in several places. Make this less of a trap by renaming withMode -> withModeBits.
* Add spaces around + in dotty source.Dmitry Petrashko2015-04-091-2/+2
|
* Make some tree fields lazyMartin Odersky2015-03-181-6/+6
| | | | | | | | | | | | | | | | Lazy fields are - the rhs field of a ValDef or DefDef - the body field of a Template These can be instantiated with Lazy instances. The scheme is such that lazy fields are completely transparent for users of the Trees API. The only downside is that the parameter used to initialize a potentially lazy field has a weak type (now it's Any, with Dotty it would be a union type of the form `T | Lazy[T]`. Therefore, the parameter cannot be recovered through pattern matching.
* Drop modifiers as separate data from MemberDef treesMartin Odersky2014-11-101-8/+8
| | | | Typed MemberDef trees now take the modifiers from their symbol's data.
* Changes to tree copyingMartin Odersky2014-08-131-12/+12
| | | | | | | | 1) Add copiers with default arguments, to avoid boilerplate 2) All copiers are now curried wrt first argument (which is the original tree). We already make use of the new features in cpy.DefDef, but not yet elsewhere.
* Renamings TreeTransformer -> TreeMap, TreeMapper -> TreeTypeMapMartin Odersky2014-03-181-1/+1
| | | | | | | This makes naming uniform between trees and types, and also avoids the clash with transform.TreeTransformer. The idea is that transformers are parts of phases, and have logic that is phase-specific. In particular, a context is passed around when transforming a tree. Maps are simpler, they only have a T -> T apply method.
* Handling implicit unapply arguments.Martin Odersky2013-12-201-2/+2
| | | | Changed format of UnApply nodes to also take implicit parameters. See doc comment in class Trees.UnApply
* Redesign of trees.Martin Odersky2013-07-271-18/+18
| | | | | | 1) Trees are now contravariant. 2) All creation ops, transformers, copiers are pushed into Instance. 3) Still to do: integrate TreeMappers and tpd.TreeTransformers.
* SeqLiteral refactoringMartin Odersky2013-07-221-2/+2
| | | | SeqLiterals no longer have an elemtpt subtree. Their type is now no longer a RepeatedParamType, but instead an instance of SeqType or ArrayType.
* Added code for adapt and more.Martin Odersky2013-07-211-2/+4
| | | | | | | - Pushed mode into context - Elimintaed scope nesting level - Fixed a desugar bug - Added constant folding
* Added typer.ModeMartin Odersky2013-06-171-4/+5
| | | | Replaces desugar.Mode. Is now a value class representing a set.
* Removed ClassDef as a Tree node class.Martin Odersky2013-06-151-3/+1
| | | | ClassDefs are now TypeDefs that have a Template as rhs.
* Dropping type parameters from typed TypeDefs.Martin Odersky2013-06-131-7/+5
| | | | | | Typed TypeDefs no longer carry tparams. Untyped ones still do, but there is a special PolyTypeDef node for them in untpd. Also, fixed flatten and DeSugarTest to deal with new tree desugarings which are not idempotent (e.g. desugar.classDef, or desugar.valDef).
* Refactoring: breaking out desugaring into its own object.Martin Odersky2013-06-041-3/+5
| | | | | Also, changing the maps in Namer. More commenting needs to be done. Pushing now to get off this machine and back to the new one, which just came back form repair.
* Added tests for desugaring.Martin Odersky2013-05-241-0/+95