| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The phase width in a period was bumped from 6 to 7 in
https://github.com/lampepfl/dotty/commit/16671a00371df2bdbaf6ae7f51b0ec7191ce94f3
but the comment wasn't updated.
Update the comment (and another unrelated comment).
Tested:
No
|
|\ \ \
| |_|/
|/| | |
Fix #2054
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Due to way how we desugar lambdas, we can decide to make a lambda static
Static methods could refer to those lambdas and we need to make
them public
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Alternative fix for #2099: avoid loading a private member when recomputing a NamedType denot
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This was introduced in the previous commit and caused unpickling
failures, we are now more conservative and only check the Private flag
on SymDenotations so we don't have to load any other denotation.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ParamForwarding creates the following forwarder in B:
private[this] def member: Int = super.member
Where the type for `super.member` is `TermRef(SubA, member)` and the
symbol is the `val member` in `A`.
So far this is correct, but in later phases we might call `loadDenot` on
this `TermRef` which will end up calling `asMemberOf`, which before this
commit just did:
prefix.member(name)
This is incorrect in our case because `SubA` also happens to have a
private `def member`, which means that our forwarder in B now forwards
to a private method in a superclass, this subsequently crashes in
`ExpandPrivate`.
(Note: in the bytecode, a private method cannot have the same name as an
overriden method, but this is already worked around in EnsurePrivate.)
The fix is simple: when we recompute a member, we should only look at
private members if the previous denotation was private.
|
|/ / |
|
|\ \
| | |
| | | |
Fix #2051: allow override T with => T or ()T
|
| | | |
|
|\ \ \
| | | |
| | | | |
Tailrec for derivesFrom/lookupRefined/classSymbol/classSymbols
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Allow inter-parameter dependencies
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
All PolyTypes get variances passed, so isTypeLambda is always true
and the deleted assert is never triggered.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The dropped method takes direct parameter types but a result type expression.
Since parameter types are now in general dependent as well, that method is
mostly redundant.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Take parameter dependencies into account when typechecking arguments.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Also: check validity of method types, so that no
forward references occur.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
To allow for dependencies between method type parameters, construct MethodTypes
from a closure that maps the currently constructed MethodType to its parameter types.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
Fix #2077: Optimization of constant conditionals
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
Move fixed logic to FirstTransform, where the other constant
folding operations are also done.
|
|\ \ \ \
| | | | |
| | | | | |
Fix #2089: Error when compiling ParSetLike, ParSet, SetLike, in this order
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
This fix is inspired by 6c91684, but I couldn't tell you why it works
exactly, it's just something I tried.
|
|\ \ \ \
| | | | |
| | | | | |
Fix Symbol#sourceFile not working after Flatten
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The SourceFile annotation is only present on the non-flattened top-level
class.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix #2071: handle HKApply in SAMType
|
| | |/ / /
| |/| | | |
|
|/ / / / |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
Before this commit, ParSetLike compiled fine as part of compileStdLib
but crashed when compiled by itself because we tried to force a LazyRef
while forcing the same LazyRef. This commit fixes this by being slightly
more lazy where it matters.
|
|\ \ \
| | | |
| | | | |
Fix #2066: Don't qualify private members in SelectionProto's...
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Now we never match `? { name: T }` with types that
have only a private `name` member. This is what scalac does, too.
|
| | | |
| | | |
| | | |
| | | | |
... unless they would be accessible in the given context.
|
| | | |
| | | |
| | | |
| | | | |
You can still have positions printed by explictly passing -Yprintpos
|
|\ \ \ \
| | | | |
| | | | | |
Fix #360: Improve avoidance algorithm
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
No more try-again business necessary.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
The essential change is that we do not throw away more
precise info of the avoided type if the expected type
is fully defined.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This was a mistake introduced in the previous commit, installAfter is
only safe to use in `IdentityDenotTransformer` phases, otherwise it
means that the phase denotation transformer is not run at all for this
particular denotation, this caused Ycheck to fail.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If A method like:
override def foo(x: Object*)
overrides a Java method, it needs to be rewritten as:
def foo(x: Seq[Object])
override def foo(x: Array[Object]): Object = foo(Predef.wrapRefArray(x))
This should be handled by ElimRepeated but there were two bugs:
- `addVarArgsBridge` was called at phase `thisTransformer.next`, this is
too late to create the bridge since `T*` has already been rewritten as
`Seq[T]`
- The original method symbol needs to have the `override` flag dropped,
since it doesn't override anything.
Furthermore, RefChecks had to be moved after ElimRepeated, otherwise the
testcase would fail the overriding checks.
|
|\ \ \
| | | |
| | | | |
Fix bug in erasedLub leading to incorrect signatures
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Before this commit, the added testcase failed in a strange way:
14 | def bla(foo: Foo) = orElse2(identity).apply(foo)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|value of type <nonsensical><notype></nonsensical> does not take parameters
This happened because the TermRef for the apply method had an incorrect
signature, therefore its underlying type was NoType.
According to the documentation of `erasedLub`, the erasure should be:
"a common superclass or trait S of the argument classes, with the
following two properties:
S is minimal: no other common superclass or trait derives from S]
S is last : in the linearization of the first argument type `tp1`
there are no minimal common superclasses or traits that
come after S.
(the reason to pick last is that we prefer classes over traits that way)."
I'm not convinced that the implementation satisfies either of these two
properties, but this commit at least makes S closer to being minimal by
making sure that the last best candidate never derives from it.
|
|\ \ \ \
| | | | |
| | | | | |
Fix #2064: Avoid illegal types in OrDominator
|
| | | | | |
|