aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Cyclicity checking independent of positions.Martin Odersky2014-11-241-1/+5
| | | | More robust cyclicity check which does not depend on source positions.
* Updated refinement checking.Martin Odersky2014-11-242-8/+50
| | | | Toucher checks, but only deprecated warnings instead of errors.
* Better printing of variant types with wildcard arguments.Martin Odersky2014-11-242-6/+20
| | | | | We used to approximate these by their bounds, but this is confusing. See comment in printbounds.scala.
* checkBounds refactoringMartin Odersky2014-11-244-30/+44
| | | | | | Move core logic to TypeOps, only leave error reporting in Checking. That way, we have the option of re-using the code as a simple test elsewhere.
* Take off the training wheels for refined type comparisons.Martin Odersky2014-11-241-19/+2
|
* Fix to checkBoundsMartin Odersky2014-11-242-4/+8
| | | | | Need to account for the fact that some argument types may be TypeBoudns themselves. The change makes Jason's latest example work.
* Fixes in TypeComparer for RefinedTypes.Martin Odersky2014-11-243-46/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous scheme did not propagate bounds correctly. More generally, given a comparison T { X <: A } <: U { X <: B } it would errenously decompose this to T <: U, A <: B But we really need to check whether the total constraint for X in T { X <: A } subsumes the total constraint for X in T { X <: B } The new scheme propagates only if the binding in the lower type is an alias. E.g. T { X = A } <: Y { X <: B } decomposes to T { A = A } <: U, A <: B The change uncovered another bug, where in the slow path we too a member relative to a refined type; We need to "narrow" the type to a RefinedThis instead. (See use of "narrow" in TypeComparer). That change uncovered a third bug concerning the underlying type of a RefinedThis. The last bug was fixed in a previous commit (84f32cd814f2e07725b6ad1f6bff23d4ee38c397). Two tests (1048, 1843) which were pos tests for scalac but failed compling in dotc have changed their status and location. They typecheck now, but fail later. They have been moved to pending. There's a lot of diagnostic code in TypeComparer to figure out the various problems. I left it in to be able to come back to the commit in case there are more problems. The checks and diagnostics will be removed in a subsequent commit.
* Changed underlying type of RefinedThisMartin Odersky2014-11-241-1/+1
| | | | | | | Now: The underlying refined type. Was: The parent of the type. We need the change because RefinedThis is used as a narrowed version of the underlying refinedType (e.g. in TypeComparer rebase), and the old scheme would lose a binding of that type.
* More robust isSetter test.Martin Odersky2014-11-241-1/+1
| | | | Avoids cyclic references caused by forcing info too early.
* More robust TypeVar printing.Martin Odersky2014-11-241-3/+7
| | | | | Avoid the crash if origin is not associated with a bound in the current constraint.
* Fixed type adaptation problem in checkBoundsMartin Odersky2014-11-241-1/+3
| | | | | | | We need to adapt type parameter bounds with an as-ssen-from to the prefix of the type constructor. Makes pos/boundspropagation pass.
* Make reduceProjection use lookupRefinedMartin Odersky2014-11-241-69/+48
| | | | | | | | | | | Needed some fixes to lookup refined. The potential alias type is now calculated by taking the member of the original refined type, instead of by simply following the refined info. This takes into account refinements that were defined after the refinement type that contains the alias. The change amde another test (transform) hit the deep subtype limit, which is now disabled.
* Improve simplifications of type projections.Martin Odersky2014-11-242-1/+40
| | | | | | | | | | An example where this helps: Previously, the private value `mnemonics` in Coder.scala was fof the form Lambda$IP { ... } # Apply It now simplifies to a Map[...] type.
* Do not skip packages in FirstTransformDmitry Petrashko2014-11-221-1/+2
| | | | Packages also get a JavaDefined flag, but they shouldn't be removed by FirstTransform.
* Drop java-defined trees in FirstTransformDmitry Petrashko2014-11-221-1/+5
|
* Address reviewer feedback: restructure applyOverloaded.Dmitry Petrashko2014-11-221-7/+14
|
* Fixing memoize transforming java fields.Dmitry Petrashko2014-11-221-1/+1
|
* Adapting branch to absence of modifiers in trees.Dmitry Petrashko2014-11-224-56/+29
|
* Add handling of parsed annotations to applyOverloaded.Dmitry Petrashko2014-11-222-4/+24
| | | | see annot.scala for examples
* Annotations have JavaSeqLiterals inside.Dmitry Petrashko2014-11-221-1/+1
|
* Extracting ApplyOverloaded to be reused in UnPickler and ClassfileParserDmitry Petrashko2014-11-224-16/+37
|
* AnnotationTransformer now also transforms typesDmitry Petrashko2014-11-222-4/+32
| | | | | | | Required as gettersAndSetters ignores modifiers in tree and uses ones in the type instead. This means that gettersAndSetters carries over modifiers from type to tree and this one violates postconditions.
* Extract AnnotationTransformer functionality from ElimRepeated to a traitDmitry Petrashko2014-11-222-37/+40
| | | | to be reused by FirstTransform
* don't try to make a body for a setter of a Java fieldOndrej Lhotak2014-11-221-1/+1
| | | | | | | | transformSym explicitly checks that a field is JavaDefined and does not create a symbol for it. Creation of a setter body looks for the symbol and fails because it does not find it. We do not need setter bodies for Java fields because we are not generating bytecode for them.
* create dummy first constructor for Java classesOndrej Lhotak2014-11-221-21/+26
| | | | | | The dummy constructor is needed so that the real constructors see the import of the companion object. The constructor has a parameter of type Unit so that no Java code can call it.
* For Java constructors, do not move out to ctx.outerOndrej Lhotak2014-11-221-1/+4
| | | | A Java constructor needs to see the import of the companion object of the class. It is not necessary to move to an outer context because a Java constructor does not have an implementation. scalac also does it this way: see Namers.Namer.createNamer.isConstrParam.
* make annotation classes abstract (since they are interfaces)Ondrej Lhotak2014-11-221-1/+1
|
* fix calls to tree copier that now requires multiple parameter listsOndrej Lhotak2014-11-221-2/+2
|
* Flags.Static renamed to JavaStaticOndrej Lhotak2014-11-221-8/+8
|
* remove debugging printlnOndrej Lhotak2014-11-221-3/+1
|
* add comment to explain why refctx passed explicitly to selectionTypeOndrej Lhotak2014-11-221-0/+2
|
* add comment explaining why checkValue skips Java compilation unitsOndrej Lhotak2014-11-221-0/+2
|
* add mapping ENUM -> Enum to PickleBufferOndrej Lhotak2014-11-221-1/+2
|
* make elimrepeated addVarArgsBridge at thisTransformer instead of ↵Ondrej Lhotak2014-11-221-1/+0
| | | | thisTransformer.next
* Java Select: try typing as both SelectFromTypeTree and SelectOndrej Lhotak2014-11-221-5/+36
|
* desugar Java repeated parms into an Array instead of SeqOndrej Lhotak2014-11-224-12/+14
|
* Initial implementation of Java scanner and parserOndrej Lhotak2014-11-229-204/+1794
| | | | | | | | | | | | | Ported from scalac 2.11.x branch SHA 9753f23f9362b25a9f481b11dd8d51187187882a This is mostly a direct port, with few significant dotty-specific changes needed. The two more significant changes are: In dotty, the first constructor of a class is pulled out separately from the other stats in the Template. The keyword detection code (buildKeywordArray) was moved into Tokens so that it can more cleanly be shared by the Scala and Java scanners.
* Show full name of doubly defined symbolsDmitry Petrashko2014-11-221-2/+2
|
* Allow checking that trees and their defined symbols have modifiers in sync.Dmitry Petrashko2014-11-222-2/+14
|
* #204 check for global uniqueness of definitions.Dmitry Petrashko2014-11-221-10/+19
| | | | | Check now fails after erasure. Should become error after fixed.
* Rename PolyType.copy method. It clashes with generated one.Dmitry Petrashko2014-11-222-3/+3
| | | | See #209 for explanation.
* Fix ElimRepeated not transforming modifiers in tree.Dmitry Petrashko2014-11-222-3/+6
|
* Dotty typer deviation triggered in UnpicklerDmitry Petrashko2014-11-221-1/+2
|
* Infer if overloading resolution should trigger implicit search.Dmitry Petrashko2014-11-222-35/+30
| | | | This doesn't require additional argument. Decision can be made solely from the phaseId.
* Fix StackOveflow due to implicit resolution in readAnnotationContentsDmitry Petrashko2014-11-221-1/+1
|
* Allow resolving overloads without inferring views.Dmitry Petrashko2014-11-221-2/+21
|
* readAnnotationContents that should be able to resolve overloaded constructors.Dmitry Petrashko2014-11-221-12/+36
|
* FunProtoTyped to be used when args are known to be typedDmitry Petrashko2014-11-221-0/+10
|
* Fix underlyingIfRepeated always assuming Scala repeated.Dmitry Petrashko2014-11-222-5/+9
|
* Fix TypeErasure.sigName erasing java repeated params to SeqDmitry Petrashko2014-11-221-1/+3
|