| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
If all else fails, force all type variables with fullyDefinedType. This can avoid references to locals. Example in file dotctest: SourceFile.scala, method calculateLineIndices.
|
|
|
|
| |
We now propagte the expected function result type (if it exists) into the function body even if it not fully defined.
|
|
|
|
| |
Needed a special case for them.
|
| |
|
|
|
|
| |
Used to be "cyclic reference involving val <import>". Now prints import statement that caused the error.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Objective: Avoid cycles by detecting all cases where
A <: B and B <: A
and removing those cases by unifuing A and B.
Cycles need to be avoided because they lead to deep subtype recursions.
|
|
|
|
| |
If one alternative is a non-method yet the other is a method (of type PolyType or MethodType), the first alternative is "as specific as" the second.
|
|
|
|
|
| |
We need to take type arguments + value arguments into account when there are several overloaded
alternatives that are all polymorphic and can be instantiated with the type arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
oarameter bounds.
Otherwise we would get into situations like the following (experienced in typers.Arrays):
Constraint:
B >: String
T >: B
Add B >: T to this constraint. You get:
B >: String | T,
but because T >: B >: String, the rhs reduces to
B >: T
Simplified this gives
B = T
and the String lower bound has vanished!
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This version expands a method ref p.m to the untyped tree
p.m(_, ..., _)
(after lifting impure expressions from p). Afterwards the usual application mechanisms kick in. This fixes problems also present in Scala 2.x, where an eta-expanded function was not as flexible as an explicitly expanded one (for instance, eta expansion did not honor default parameters).
|
|
|
|
| |
Previously, it wasn't.
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) Accessibility check was broken because it looked at symbol's owner, where it should have looked at context owner.
2) Refined treatement if members. Previously, nonPrivate member returned a subset of member, i.e. those denotations returned by member that were not private. This is not correct. In a situation like
class A { def x: Int = 1 }
class B { private def x: String = "" } extends A
(new B).x
the non-private member returned should be A#x. Changed membersNamed and friends as well as checkAccessible to account for that.
|
|
|
|
| |
Changed format of UnApply nodes to also take implicit parameters. See doc comment in class Trees.UnApply
|
| |
|
|
|
|
|
| |
The previous treatment would force all members, causing cyclic reference errors.
We fix it by filtering early in computeMemberNames itself for implicits.
|
|
|
|
| |
Previously, we did not strip off the => when comparing against expected type.
|
|
|
|
| |
Plus some small tweaks in Typer
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Also fixes to typedReturn.
Adapted tests accordingly.
|
| |
|
|
|
|
|
|
|
| |
1. Changes to SAMType extractor
2. Self names are no longer members of enclosing class
3. SAM-Type closures now print with their result type.
4. refactoring newSkolemSingleon ==> narrow
|
|
|
|
|
|
|
|
|
| |
1. We forgot to mark declaration symbols Deferred.
2. Types with NoPrefix and the same name got identified. Fixed by adding a new category WithNoPrefix to named types, and changing the way named types get generated.
3. Self types lacked parameters. (Question: Do we need to also track type members?)
4. Printers caused cyclic reference errors. Now some print operations are more careful with forcing.
5. Namedparts accumulator has to be more careful with ThisTypes. Because self types now contain parameters, which might lead back to this, we only add the class name (or the source module, if it's a module class).
6. toBounds in TypeApplications needs to use Co/Contra aliases for expanded name parameters, not just local ones.
|
|
|
|
|
|
| |
1. Got rid if InSuperInit mode bit.
2. Fixes to typing assignments
3. Import qualifiers need to be stable
|
|
|
|
| |
Fixed a problem where an import and a definition in same scope were erroneously regarded as a conflict (L20 in typedIdents.scala)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also: Standardized on selectorName; Translate $init$ to <init> when unpickling.
|
| |
|
|
|
|
| |
Plus more commenting of Desugar
|
|
|
|
| |
Now come with test cases.
|
| |
|
| |
|
|
|
|
|
|
|
| |
1. Needed to interpolate aftyer implicit parameyters are added.
2. Also needed to avoid constraining typevars if compared against selection proto.
Original coder example now typechecks.
|
| |
|
|
|
|
| |
Caching, plus whether we want to match on signatures or types.
|
|
|
|
| |
We need to dealias any bounds before adding it to the constraint because otherwise we might have added a constraint X <: X in disguise.
|
| |
|
|
|
|
|
|
| |
1. Typing blocks: forgot to create new scope. Now fixed.
2. The decitsion whether to interpolate a type variable was made based on the type variable's position and the current tree's position. This is too imprecise, because we might have auto-generated trees where all important parts have the same position. We now check for actual tree containment: A type variable can be interpolated for the type of a tree T if T contains the tree which introduced the type variable.
|
|
|
|
| |
For interoperability we will keep for the time being the traditional treatment of tuples as instances of Tuple 2… Tuple 22. The new hlist-like treatment will be done in a future step. The flip is controlled by variable "unboxedPairs".
|