aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala
Commit message (Collapse)AuthorAgeFilesLines
* Lazy entering of names with internal $'s in package scopesMartin Odersky2017-04-111-2/+2
| | | | | | | | | | | | | | | | Names with internal $'s are entered in package scopes only if - we look for a name with internal $'s. - we want to know all the members of a package scope This optimization seems to be fairly effective. The typical range of package scopes that need $-names is between 0 and 20%. The optimization seems to improve execution time of all unit tests by about 3%. Also. drop the inheritance from Iterable to Scope. The reason is that we now need a context parameter for toList and other Iterable operations which makes them impossible to fit into the Iterable framework.
* Align safe parameter substitution with other subst methodsMartin Odersky2017-04-101-5/+5
| | | | Change name and align order of parameters.
* Skolemize arguments to dependent methods as necessary.Martin Odersky2017-04-101-1/+19
| | | | This was missing before, led to errors not being detected.
* Split HKTypeLambda from PolyTypeMartin Odersky2017-04-061-1/+1
|
* Eliminate LambdaAbstractMartin Odersky2017-04-061-1/+1
| | | | Use fromParams instead.
* Further refactoringsMartin Odersky2017-04-061-1/+1
| | | | | - Use TypeLambda instead of PolyType. - Further harmonize factory operations
* Rename PolyTypeTree -> LambdaTypeTreeMartin Odersky2017-04-061-1/+1
|
* replace derived{Method,Poly}Type with derivedLambdaTypeMartin Odersky2017-04-061-1/+1
|
* Rename PolyParam --> TypeParamRefMartin Odersky2017-04-061-2/+2
|
* Harmonize paramTypes and paramBoundsMartin Odersky2017-04-061-3/+3
| | | | | | MethodTypes have paramTypes whereas PolyTypes have paramBounds. We now harmonize by alling both paramInfos, and parameterizing types that will become common to both.
* Break out functionality from MethodTypeMartin Odersky2017-04-061-1/+1
| | | | | and generalize MethodParam to ParamRef, and TypeParamInfo to ParamInfo
* Fix bug in typechecking super prefix with invalid enclosing classAbel Nieto2017-03-171-19/+21
| | | | | | | | | | | | | | | | | When typechecking class A { C.super.foo() } If C isn't an enclosing class, the compiler was throwing because of an unguarded pattern match. Fix the issue by checking for ErrorType. Tested: Verified that the example above no longer throws. Added a test.
* Move 'invalid super qualifier' error to new error format.Abel Nieto2017-03-171-1/+1
| | | | | | | | | As part of https://github.com/lampepfl/dotty/issues/1589, use the new error message for static super references where the qualifier isn't a parent of the class. Tested: Added unit test.
* Construct MethodTypes from parameter closureMartin Odersky2017-03-141-3/+3
| | | | | To allow for dependencies between method type parameters, construct MethodTypes from a closure that maps the currently constructed MethodType to its parameter types.
* Drop named type parameters in classesMartin Odersky2017-03-041-19/+3
| | | | | | | | | | | | | Drop the [type T] syntax, and what's associated to make it work. Motivation: It's an alternative way of doing things for which there seems to be little need. The implementation was provisional and bitrotted during the various iterations to introduce higher-kinded types. So in the end the complxity-cost for language and compiler was not worth the added benefit that [type T] parameters provide. Noe that we still accept _named arguments_ [A = T] in expressions; these are useful for specifying some parameters and letting others be inferred.
* Refactoring to make Checking not mutate denotationsMartin Odersky2017-02-021-0/+5
| | | | | avoidPrivateLeaks got moved from Checking to TypeAssigner, where it fits well besides the other avoid methods.
* Fix #1845: Survive illegal this-type prefixesMartin Odersky2016-12-221-1/+3
|
* Merge pull request #1775 from dotty-staging/add-implicit-funtypesodersky2016-12-181-3/+4
|\ | | | | Add implicit function types
| * Fix "wrong number of args" reportingMartin Odersky2016-12-171-3/+4
| | | | | | | | | | | | "Wrong number of args" only works for type arguments but was called also for term arguments. Ideally we should have a WrongNumberOfArgs message that works for both, but this will take some refactoring.
* | Make errors are not swept under the carpetMartin Odersky2016-12-171-6/+5
|/ | | | | | | | | Typer#ensureReported's comment outlines an example where errors could go unreported, resulting in error trees after typer without any reported error messages. This commit makes sure that at least one error is reported if a tree node has an error type. Fixes #1802.
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-0/+524