aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Move failing test to pending.Martin Odersky2015-09-181-3/+3
| | | | | | The original IterableSelfRec is not syntactically legal after the hk changes. I attempted to fix, but there's still a type error. Need to investigate whether this is a true error or a bug.
* Avoid orphan RefinedThis types in glb/lub.Martin Odersky2015-09-182-3/+3
|
* Keep track of parameter bounds in LambdaAbstract and EtaReduceMartin Odersky2015-09-181-11/+66
| | | | | | 1) Lambda abstract now records bounds of abstracted type parameters in TypeLambda 2) Eta-reduce likewise keeps the bounds it finds in the TypeLambda 3) Eta-reduce now also translates hk$i references to type parameters of the reduced type.
* Disallow wildcard arguments to higher-kinded types...Martin Odersky2015-09-184-2/+74
| | | | ...unless the HK type can be eta-reduced to a class type.
* Generalize eta reduction to partially applied types.Martin Odersky2015-09-182-2/+13
| | | | | | | | | | Now also allows to reduce something like ([T] => Map[T, String]) to Map[_, String]
* Fix problem in typeParamsMartin Odersky2015-09-182-13/+8
| | | | | Accidentally forwarded to rawTypeParams. This solved the problem with mismatching type params in appliedTo that was caught in testLifted.
* Rewrite compareHK to be kind-correctMartin Odersky2015-09-182-9/+13
|
* Replace isLambda with ifHKMartin Odersky2015-09-185-52/+21
| | | | | Replace occurrences of isLambda with isHK, because isHK is a bit faster and simplier.
* Remove magic from derivedRefinedType.Martin Odersky2015-09-181-17/+3
| | | | It's no longer needed with new hk scheme.
* Rename of hk args HK$x -> hk$xMartin Odersky2015-09-185-82/+27
| | | | | | | | These are not user-accessible types, so no need to follow type convention and write in upper case. Also, rename occurrences of lambda to Lambda, to make clear we mean a type lambda.
* Simplify EtaReduceMartin Odersky2015-09-181-4/+1
| | | | by removing dead case.
* Rename Apply -> hkApplyMartin Odersky2015-09-189-22/+27
| | | | Want to have a unique name for Apply, so that tests for higher-kinded types become cheaper.
* Add missing position to errorMartin Odersky2015-09-181-1/+1
|
* Adapt type arguments in typedAppliedTypeTreeMartin Odersky2015-09-181-11/+13
| | | | | | Previously, only pattern bound arguments were adapated. This was an oversight. Also, change logix so that we survive empty type parameter lists. This was also an oversight before.
* Better error reporting in TreePicklerMartin Odersky2015-09-181-1/+3
| | | | | | Turn a possible NPE into an AssertionError. The latter are caught in pickleTree, so an error leaves a trace about what was pickled.
* Project all high-kinded types with #ApplyMartin Odersky2015-09-182-4/+13
| | | | | | Used to be just instantiated lambdas. With the new scheme every type with a kind higher than * needs to be projected with #Apply.
* Try to eta reduce type applications.Martin Odersky2015-09-181-1/+3
| | | | | | | | Rewrite a type application like ([HK$0] => C[HK$0])(T) to C[T] Avoids application cahins to become unnecessarly large.
* Follow alias types when computing type params.Martin Odersky2015-09-181-2/+3
| | | | This aligns typeParams and rawTypeParams. It's not strictly to necessary, though.
* Temporary fix to testLiftedMartin Odersky2015-09-181-3/+9
| | | | | | | | Discrepancies between numbers of formal and actual type arguments were observed when typing partialFunctions.scala under new scheme. Should come back to this when subtyping is rewrittem/simplified to work with new hk-scheme. Maybe testLifted is no longer needed at all.
* Don't lambda abstract derived typesMartin Odersky2015-09-181-1/+1
| | | | | Derived types already contain the lambda abstractoion; lambda abstracting them again would cause a double lambda.
* Avoid cycles when eliminating existentials in unpicklingMartin Odersky2015-09-181-4/+23
| | | | | New hk-scheme caused cycles in elimExistentials which are fixed by this patch.
* Use EtaExpand instead of LambdaAbstract when unpickling typerefsMartin Odersky2015-09-181-5/+1
| | | | | | When unpickling from Scala2 TypeRefs with arguments which do not refer to classes, use EtaExpand instead of LambdaAbstract. Lambda Abstrct is wrong since it drops type arguments.
* Allow to use safe substitution in LambdaAbstractMartin Odersky2015-09-184-4/+39
| | | | | Needed to avoid cycles involving F-boundes hk-types when reading Scala2 collection classes with new hk-scheme.
* Drop parameterizeWithMartin Odersky2015-09-182-6/+6
| | | | | parameterizeWith picked between simple hk types and lambda abstraction. No longer needed because now we always lambda abstract.
* A non-class typeref has type parameters only if subtype of a lambda class.Martin Odersky2015-09-181-2/+5
|
* Lambda abstract all TypeRefs when unpickling.Martin Odersky2015-09-181-0/+5
|
* Always lambda abstract TempPolyTypes representing types.Martin Odersky2015-09-181-12/+3
|
* Don't eta expand in appliedToMartin Odersky2015-09-181-1/+1
|
* Add a test that logs the classpath to pinpoint setup failures.Martin Odersky2015-09-181-0/+2
|
* Add comment.Martin Odersky2015-09-181-1/+4
|
* Add EtaReduce method.Martin Odersky2015-09-181-0/+33
| | | | EtaReduce will be used to keep applications on eta expanded methods small.
* Avoid generating companion-methods for non-class types.Martin Odersky2015-09-181-3/+5
| | | | | | | This would lead to a crash. Example is in Predef: object Pair type Pair
* Adapt arguments in all type applicationsMartin Odersky2015-09-182-8/+8
| | | | | Previously, we did this only in applications in rhs of type definitions. Need to do it everywhere.
* Strenghten condition in EtaExpandIfLambdaMartin Odersky2015-09-181-1/+3
| | | | | Without the additional `typeParams.nonEmpty` condition we got a crash in t1439.scala
* Fix argument eta expansionMartin Odersky2015-09-182-4/+4
| | | | | ... and move to TypeApplications. isLambda test was the wrong way before.
* Turn assertion into a test in etaExpandArgs.Martin Odersky2015-09-181-13/+15
| | | | | | Erreneous programs could have a difference in lengths between type parameters and type args, but this is tested anyway in Typer.
* Black hole detection for LazyRefsMartin Odersky2015-09-181-1/+10
| | | | | Now catches attempts to recursively force a LazyRef type that's in train of being evaluated.
* Better diagnostics for failed sigName calls.Martin Odersky2015-09-181-1/+5
| | | | | | It used to be "assertion error: NoType" whenever sigName git a projection of a missing member. Now we find out about what type was projected.
* Check argument lengths in typedAppliedTypeTreeMartin Odersky2015-09-181-2/+12
| | | | | With the hk-types schem changed, we need to make sure that actual and formal argument lists of parameterized types have the same length.
* Eta expand type arguments corresponding to lambdasMartin Odersky2015-09-182-3/+27
| | | | | In Namer, eta expand any type argument that corresponds to a higher-kinded type parameter. Also, check that all type parameter lists are fully applied.
* Avoid cyclic references in containsRefinedThisMartin Odersky2015-09-181-2/+3
| | | | | | Avoid forcing info if the reference goes to a class. This avoided a CyclicReference when reading Scala's standard library form pos/collections when fiddling with the hk logic.
* Clean up of logic in typeDefSigMartin Odersky2015-09-181-3/+3
|
* Merge pull request #798 from dotty-staging/fix-791Dmitry Petrashko2015-09-183-2/+17
|\ | | | | Fix 791
| * Harmaonize numeric arguments only during typer.Martin Odersky2015-09-171-1/+1
| | | | | | | | | | Afterwards, implicit conversions are no longer available. Fixes #791.
| * Fix #791 erasedLub of two AnyVals is Object.Dmitry Petrashko2015-09-172-1/+16
| |
* | Merge pull request #796 from dotty-staging/fix-#789-problems-in-erasureDmitry Petrashko2015-09-185-1/+63
|\| | | | | Fix #789 problems in erasure
| * New phase: ExplicitSelfMartin Odersky2015-09-175-1/+63
| | | | | | | | | | Makes self types explicit, if this is needed to identify a member in a select. Fixes #789.
* | Merge pull request #795 from dotty-staging/fix-weaker-access-errorsDmitry Petrashko2015-09-182-2/+4
|\| | | | | Fix weaker access errors
| * Fix weaker access error when generating bridgesMartin Odersky2015-09-161-1/+3
| | | | | | | | | | A bridge cannot have weaker access than the symbol it overrides. This triggered an assertion error on "clone" for pos/t2183.scala.
| * Better diagnostic for weaker access errorsMartin Odersky2015-09-161-1/+1
| | | | | | | | Fix typo, and print infos alongside fully qualified names.