aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix problem with duplicate companion objects for classes with default ↵Martin Odersky2014-01-172-10/+12
| | | | parameters in constructors.
* Made findDecl more forgivingMartin Odersky2014-01-171-1/+3
| | | | Will return NoDenotation for types that do not have decls, analogous to findMember.
* Handle cases AndType and OrType in WildApproxMartin Odersky2014-01-171-2/+26
| | | | Need to special case WildcardTypes, so that they absorb the other alternative (And/Or types need to have value types as arguments; wildcard types are not allowed).
* Make typedAhead adapt to prototype.Martin Odersky2014-01-173-2/+4
| | | | Not sure why it was different before. We need it at least to add implicit parameters in typedAheadExpr.
* Making UniqueMessagePositions Dotty compliantMartin Odersky2014-01-161-1/+1
|
* Refactoring to avoid multiple overloaded traceIndent methods.Martin Odersky2014-01-166-21/+22
|
* Flag multiple overloaded variants with default arguments as an error.Martin Odersky2014-01-161-0/+4
|
* Avoiding a crash in the face of multiple overloaded variants with default ↵Martin Odersky2014-01-161-1/+5
| | | | arguments.
* Generalize implicit scope of ThisTypeMartin Odersky2014-01-162-30/+45
| | | | The implicit scope of a ThisType is now always the implicit scope of the self type. This caused cycles which necessitated cycle detectors in namedParts and computeImplicitScope.
* Make RefinedPrinter Dotty compliant.Martin Odersky2014-01-152-7/+10
|
* Tweak to typing of function values.Martin Odersky2014-01-153-12/+30
| | | | We now propagte the expected function result type (if it exists) into the function body even if it not fully defined.
* Relax type checking rule for pattern matching.Martin Odersky2014-01-151-12/+20
| | | | | | | | | | | | Previously, if S is the selector type and P is the type of the unapply argument, we demanded either S <: P or P <: S We now also admit P <: S' where S' can be obtained from S by dropping refinements. This lets some patterns in RefinedPrinters typecheck which did not typecheck before. It seems we can afford to be a little bit more liberal here, and thereby approximate the weaker "isPopulated" criterion of Scala2x.
* Allow views when matching the result type of a selection prototype.Martin Odersky2014-01-155-19/+23
| | | | More generally, a refactoring of the Compatibility trait to use value passing instead of inheritance.
* Avoid stale symbol errors for package objectsMartin Odersky2014-01-153-2/+6
| | | | Happened (albeit non-deterministally) when compiling parsing/*.scala
* Fix for constant foldingMartin Odersky2014-01-154-31/+30
|
* Make Parsers Dotty-compliant.Martin Odersky2014-01-151-5/+5
|
* Fix typing of unapplySeq extractor arguments.Martin Odersky2014-01-152-2/+18
| | | | Needed a special case for them.
* Treat "this" specially when it appears in a parent constructorMartin Odersky2014-01-153-6/+17
| | | | In this case its owner is the next outer class, not the currently defined one.
* Avoid procedure syntaxMartin Odersky2014-01-145-11/+12
|
* Allow ExprType as the type of a view argument.Martin Odersky2014-01-141-1/+2
|
* Do ot search for implicit members in packages.Martin Odersky2014-01-141-3/+6
|
* Making files in pickling dotty-compliant.Martin Odersky2014-01-145-32/+40
|
* Avoiding typing a () tree without position when typing returnMartin Odersky2014-01-141-1/+1
|
* Avoiding cyclic references involving module vals and imports.Martin Odersky2014-01-144-26/+19
| | | | Previousely, compiling all of dotc/core caused a cyclic reference. The cyclic reference was caused by evaluating a module val, which caused it to evaluate its type, which caused the evaluation of all preceding imports, which led via some hops back to the same module val. We now break the cycle by computing the signature of a module val without going through its type.
* Better error message for double definitions.Martin Odersky2014-01-141-5/+9
| | | | If one of the conflicting definitions is synthetic, it will now point to the code position of the other.
* Make SelfName (and ImplClass) flags that are valid from startMartin Odersky2014-01-141-1/+3
|
* Renaming to make program Scala2x and Dotty compatible.Martin Odersky2014-01-142-5/+10
|
* Refined handling of importsMartin Odersky2014-01-131-5/+11
| | | | | | | | | Three changes: 1) Named imports beat wildcard imports in same scope, no matter what the relative order is 2) Named/named imports and wildcard/wildcard imports in the same scope of the same name but different symbols give an error 3) An error is not reported if two imported termRefs or typeRefs are equal wrt =:=.
* Fix parsing implicit function literals.Martin Odersky2014-01-131-1/+1
|
* More refined handling of avoidable aliases.Martin Odersky2014-01-133-5/+15
|
* Better handling of assignment.Martin Odersky2014-01-131-4/+4
| | | | | | | | Problem: lhs = expr where the lhs takes an implicit. An implicit argument might not be available at the assignment site, but the epxression should typecheck anyway. Test case in SymDenotations.NoDenotation.
* Fix to typedFunctionMartin Odersky2014-01-131-2/+2
| | | | We now assume protoFormals and protoResultType as given in an expected function type, and check post-hoc that parameter lists have the right length.
* Survive searching viers oper exprTypesMartin Odersky2014-01-131-1/+1
|
* Improved avoidance of local symbolsMartin Odersky2014-01-132-3/+32
| | | | If the refinement in a refined type refers to a local symbol, drop it and return only the parent.
* Make sure constructors have at least one non-empty parameter listsMartin Odersky2014-01-131-1/+5
| | | | (might want to change this later, but that's how Scala2 does things)
* Making some traces conditional on printers being enabled.Martin Odersky2014-01-135-9/+23
|
* Follow through multople layers of instantiation when printing a typevarMartin Odersky2014-01-131-1/+1
|
* When typing a function value (xs) => T with a function type as exp[ected type,Martin Odersky2014-01-131-0/+3
| | | | check that argument lists have same length.
* When instantiating a type var, need to map back from polyparams to typevars.Martin Odersky2014-01-132-2/+14
|
* Extend type maps and type accumulators to prototypesMartin Odersky2014-01-132-0/+39
|
* Redo isFullyDefinedAccumulatorMartin Odersky2014-01-131-22/+43
| | | | The new scheme is robust even when following freshky instantiated type variables. These did not show up in the old varianceMap scheme.
* fix for comparing or-types.Martin Odersky2014-01-111-1/+1
|
* Avoid cyclic references using imports.Martin Odersky2014-01-111-1/+1
| | | | The example is the current dotctest. import Symbols._ comes well before the definition of Symbols. Without the fix, it caused a cyclic reference error. But it seems reasonable to wait with the import until the class is fully elaborated.
* Handling refined types.Martin Odersky2014-01-112-15/+23
| | | | | | | | A refined type P { refinement } is expanded to a class class <refined> extends P { refinement } for type-checking. The problem is that the parent P does not always have a constructor. So we need to leave the parent as a type and add a special case to classDefSig that handles it.
* Handles setters where the getter takes implicit or other parameters.Martin Odersky2014-01-111-16/+20
| | | | | | | | | | | Now legal: def foo(implicit ...) = ... def foo_=(x: T): Unit = .... foo = ... And it works even without the implicit (need to clarify the spec on this count).
* Better reporting of cyclic references involving imports.Martin Odersky2014-01-114-263/+468
| | | | Used to be "cyclic reference involving val <import>". Now prints import statement that caused the error.
* Strip implicit parameters when deciding specifity of methods.Martin Odersky2014-01-112-10/+16
|
* Type comparison tweak.Martin Odersky2014-01-102-0/+2
| | | | We assume that two types A.this.C and B.this.C where C is the same class symbol, yet A and B are unrelated, are equal (i.e. mutually subtypes of each other). Such types comes up in situations where the self type of a type is different from the enclosing class.
* Removing conforms from StdNames because it shadows Predef.conforms, which is ↵Martin Odersky2014-01-102-5/+5
| | | | | | needed a lot for implicit search. We need to use a less common name for Predef.conforms!
* Mover termRef/typeRef and friends up to Denotation.Martin Odersky2014-01-103-21/+35
| | | | Needed for implicit search, because some implicits might be UniqueRefs, not SymDenotations