aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/TypeUtils.scala
Commit message (Collapse)AuthorAgeFilesLines
* Make ensureMethodic work after erasure.Martin Odersky2015-06-011-1/+1
| | | | | Previously it didn't, because it created an ExprType, which is illegal after erasure.
* Remove trailing whitespaceMartin Odersky2015-04-231-1/+1
| | | | | I have figured out how to make this the default in Eclipse, so hopefully we won't see many repeats of this.
* New utility method in TypeUtils: ensureMethodicMartin Odersky2015-04-221-0/+5
| | | | Used in at least two places, so it's of general use.
* move caseAccessors from TypeUtilsDmitry Petrashko2014-10-121-3/+1
| | | | They are in SymUtils
* Remaining definitions for patmat.Dmitry Petrashko2014-09-171-2/+4
|
* renaming: core.transform.Erasure -> core.TypeErasureMartin Odersky2014-08-241-1/+1
| | | | | | | The name duplications transform.Erasure / core.transform.Erasure caused irregularities in the imports and the smae name was confusing. Besides Erasure was the only class in core.transform, so it seemed better to eliminate the package alltogether.
* Split Nullarify functionality to ElimByName, ErasureMartin Odersky2014-08-171-4/+3
| | | | | | | | | | | | | New phase ElimByName elimintaes by-name parameters. All other occurrences of parameterless methods and ExprTypes are eliminated in erasure. The reason for the split like this is that it is very hard for Nullarify to determine when to insert ()'s. The logic for this is fragile because we need to look at previous denotations which might not exist (before splitter) or might result from a merge between parameterless and nullary methods. In Erasure the same is much simpler to achieve.
* Add varargs bridge methodsMartin Odersky2014-08-031-4/+16
| | | | | Distinguish translations between Java and Scala varargs methods and add bridges where needed.
* Create RetypingTreeMap that propagates typesDmitry Petrashko2014-07-221-9/+4
| | | | | | | | | | If some node in tree is transformed changing the type, the outer node could potentially also change type. This patch implements a RetypingTreeMap that propagates those changes until types converge. Propagation is done for tree nodes that are able to compute their type based on their children: Pair, Block, If, Match, CaseDef, Try, SeqLiteral, Annotated, Select.
* Refactored reusable full parameterization code into base trait.Martin Odersky2014-07-171-73/+1
| | | | | | Methods dealing with fully parameterized versions of classes were pulled from `TypeUtils` and `ExtensionMethods` into `FullyParameterization`. `TypeUtils` is left for possible future use, but is empty right now.
* Fix problem with dynamicSignature.Martin Odersky2014-07-171-2/+3
| | | | | | | Pattern match needs to compare against list of names, not single name. Universal equality bites again... Also fix comment for ElimRepeated.
* Simplification: dynamicSignature instead of toDynamicMartin Odersky2014-07-171-37/+10
| | | | | When figuring out which of a number of static methods corresponds to an overloaded dynamic method, we only need to compare signatures. No need to resconstruct the full dynamic type.
* Fixes to TypeUtilsMartin Odersky2014-07-171-1/+7
| | | | Some fixes to toStatic. Also added a method that transforms a RepeatedType to the corresponding Seq type.
* ExtensionMethods phase and TypeUtilsMartin Odersky2014-07-171-0/+115
New phase for extension methods. Also, split off some type handling functionality that can be used elsewhere in new TypeUtils decorator. The idea is that TypeUtils should contain methods on Type that make sense specifically for transformations. That way, we can keep Types from growing. Might make sense to do similar decorators for Denotations as well. There's a bug fix in MacroTransform: Need to treat selfInfo varDels specially, since they have no symbol.