aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/PostTyper.scala
Commit message (Collapse)AuthorAgeFilesLines
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-286/+0
|
* Pickle and unpickle type treesMartin Odersky2016-11-161-1/+1
| | | | | | | Lots of other changes to make positions work out everywhere. One important change is that now trees can be shared, just as types can. This change improves memory requirements (a bit) and also makes positions in shared trees more robust.
* Merge pull request #1587 from dotty-staging/change-tasty-posGuillaume Martres2016-11-041-65/+51
|\ | | | | Fix Tasty positions
| * Keep rhs of TypeDefs until picklingMartin Odersky2016-10-311-18/+15
| | | | | | | | | | Don't convert to a TypeTree in PostTyper, because that loses internal positions.
| * Roll normalizedTree into main PostTyper transformMartin Odersky2016-10-311-29/+14
| | | | | | | | | | Since we now transform all type trees, no need to have a separate traversal for checking.
| * Don't convert to literals before picklingMartin Odersky2016-10-311-36/+9
| | | | | | | | | | | | | | | | | | We need to keep the original expressions around for accurate linking with the source file. That holds also if the expression has a constant type, so it should not be converted to a literal before pickling. Instead it will be converted in FirstTransform.
| * Don't convert to TypeTrees before picklingMartin Odersky2016-10-311-16/+31
| | | | | | | | | | | | If we want to pickle types with positions we should not converyt to TypeTrees before pickling. Instead, type trees are now converted to TypeTrees in FirstTransform.
| * Mention Inlined transformation in docsMartin Odersky2016-10-181-0/+3
| |
| * Minimize inline call info in PostTyperMartin Odersky2016-10-171-0/+13
| |
* | Fix #1286: Error on inexistent imports that are not used.Nicolas Stucki2016-10-211-0/+13
|/ | | | This commit also fixes #1583.
* First version of inline schemeMartin Odersky2016-10-021-0/+4
| | | | | To be done: outer accessors To be done: error positions
* Swap order of elements in AnnotatedMartin Odersky2016-09-241-2/+2
| | | | | | | | | Now it's annotated first, annotation second. This is in line with AnnotatedType and in line with the principle that tree arguments should come in the order they are written. The reason why the order was swapped before is historical - Scala2 did it that way.
* Merge pull request #1534 from OlivierBlanvillain/clean-up-printersFelix Mulder2016-09-231-1/+1
|\ | | | | Clean up config.Printers imports
| * Clean up config.Printers importsOlivier Blanvillain2016-09-231-1/+1
| | | | | | | | And remove the not used Printer#echo
* | Fix corner case w types ALL passed by name & out of orderOlivier Blanvillain2016-09-161-5/+2
|/ | | | | | | | This commit removes a problematic duplicated `checkBounds` call on `TypeApply`. To verify correctness of this change on has to check that `normalizeTree` used only once [1], and the function using `normalizeTree` already takes care of calling `checkBounds`. [1]: https://github.com/lampepfl/dotty/blob/0e8f05d88bfef95fac59f522fd9d06792126bd11/src/dotty/tools/dotc/transform/PostTyper.scala#L205
* implementation of exhaustivity and redundancy checkliu fengyun2016-08-241-0/+9
|
* Drop Config.checkKindsMartin Odersky2016-07-111-1/+2
| | | | | Allows us to drop also the involved knownHK method. Lots of other cleanups.
* Handle signatures over uninstantiated type variablesMartin Odersky2016-07-111-2/+13
| | | | | | | | | | | | | Taking the signature over a type with uninstantiated type variables means that the signature can change later, once we instantiate the type variable. We handle this by recording uninstantiated positions of signatures and fixing them in PostTyper, when type variables are instantiated. - This allows to drop the kludge of "normalizing" in derivedRefinedType Dropping this initially revealed the problems with under-determined signatures. Now that these problems are fixed, we can drop for good.
* Refactoring of PolyType and TypeLambdaMartin Odersky2016-07-111-2/+2
| | | | | | | Make them each inherit from common BaseType GenericType. That way we avoid inheriting accidentally stuff from PolyType in TypeLambda. Also, Fix adaptation of type lambdas. Don't confuse them with PolyTypes.
* Avoid creating a SourceFile annotation for SourceFile itselfMartin Odersky2016-04-091-1/+3
| | | | | | | | This leads to an infinite cycle when trying to unpickling, because the modifiers and annotations of a symbol are read before the symbol itself is created. See #1212 for the general case.
* Simplify handling of sourcefiles in Tasty infoMartin Odersky2016-04-091-1/+7
| | | | | | | Instead of separate source file sections, pickle SourceFile as an annotation of all toplevel classes. We represent it like this anyway when reading back Tasty-defined classes.
* Have checkNotPrivate skip over private aliases.Martin Odersky2016-03-121-2/+7
| | | | | | | | | CheckNotPrivate now avoids private aliases, so that types sat prepresentable in transformation phases. This does not solve the problem that private classes or abstract types might leak coming from Scala 2, but there is not really a good cure for that. We can reject them outright or allow them under language:Scala2 and hope for the best.
* Merge pull request #1066 from dotty-staging/fix-#997odersky2016-02-191-4/+6
|\ | | | | Fix #997
| * Move leak detection to CheckingMartin Odersky2016-02-191-34/+2
| | | | | | | | Also: include a test that private aliases are transparent.
| * Add checking for leaking private definitionsMartin Odersky2016-02-191-5/+39
| | | | | | | | First version. Fixes #997.
* | Allow Named Arguments in TypeArgsMartin Odersky2016-02-191-3/+39
| | | | | | | | Lets one also pass named arguments to methods.
* | Make some operations surivive partial named parameter listsMartin Odersky2016-02-191-1/+4
|/ | | | | Types#underlyingClassRef and PostTyper#normalizeTree need to be changed so they can deal with partial named parameter lists.
* Big realizability refactoringMartin Odersky2016-02-091-2/+2
| | | | | | | Move logic from TypeOps to new file CheckRealizable.scala. Also check realizable fields under strict mode. Check at phase PostTyper rather than Typer to avoid cycles. New tests for imports and deep paths.
* Check bounds everywhereMartin Odersky2016-01-181-28/+23
| | | | | | | | Previously, bounds of a TypeDef tree were not checked. We now make sure bounds are checked everywhere in PostTyper. The previous partial check in Applications gets removed (it was not complete even for TypeApplications because sometimes bounds were not yet known when the test was performed.)
* Keep rhs of TypeDef in typed treeMartin Odersky2016-01-181-0/+9
| | | | | This is important for IDEs who want to see the full tree. The tree now gets replaced by a TypeTree in PostTyper.
* Fix sleeper bug in ParamForwardingMartin Odersky2015-12-141-6/+7
| | | | | | | | | ParamForwarding converts some parameters to nullary methods, yet it does not update the references to these parameters. Their signature is still NotAMethod, which is wrong. Causes subtle differences in peckle tests: a param accessor get type T before pickling (which is wrong), gets => T when reading back (which is right). Test case in pickling/selfSym.scala.
* Swap order of arguments in annotationsMartin Odersky2015-11-221-1/+1
| | | | | | | | | The fact that the annotation comes first is weird, because when I write an annotated type it's <type> @<annotation>. Also, annotated types are like RefinedTypes in that they derive from a parent type. And in RefinedTypes the parent comes first. So swapping the arguments improves consistency.
* Check bounds of inferred typevars in PostTyper.Martin Odersky2015-11-051-1/+4
|
* Allow existential types in hk typesMartin Odersky2015-10-241-1/+1
|
* Move literalize functionality to PostTyperMartin Odersky2015-09-141-3/+38
| | | | | | | | | Now, PostTyper replaces constant expressions with literals. If we wait any longer then any tree rewriting of an application node would have to do constant folding again, which is a hassle. With the previous late Literalize phase, constant expressions consisting of operations and arguments lost their constantness in PostTyper.
* As i566 shows, it is possible to have a package as prefix, a packageMartin Odersky2015-05-151-3/+2
| | | | | | | | | | object as owner and be followed by type arguments: reflect.classTag[T] expands to reflect.`package`.classTag[T]
* Remove trailing whitespaceMartin Odersky2015-04-231-21/+21
| | | | | I have figured out how to make this the default in Eclipse, so hopefully we won't see many repeats of this.
* Roll some of FirstTransform functionaility into PostTyperMartin Odersky2015-04-221-33/+57
| | | | | Everything that needs to be done before pickling moves to PostTyper. The idea is that we want to make Pickler come before FirstTransform.
* Roll SyntheticMethods into PostTyperMartin Odersky2015-04-221-5/+9
|
* Roll InstChecks into PostTyperMartin Odersky2015-04-221-13/+76
| | | | | Move InstChecks functionality into PostTyper in order to save a separate traversal.
* Super accessor refactoringMartin Odersky2015-04-221-0/+78
New phase: PostTransform, runs after Typer. SuperAccessors and ParamForwarders (renamed from ForwardParamAccessors) are helper objects of post transform. Next: Add instChecks as well.