| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
|\ \
| | |
| | | |
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
|
|\ \
| | |
| | | |
Tailrec for derivesFrom/lookupRefined/classSymbol/classSymbols
|
| |/ |
|
|\ \
| | |
| | | |
Allow inter-parameter dependencies
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
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 #360: Improve avoidance algorithm
|
| | |
| | |
| | |
| | | |
No more try-again business necessary.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ |
|
|\
| |
| | |
Make resolveSuper less slow
|
| |
| |
| |
| |
| | |
By ordering tests in a smarter way.
Add leave a big scary comment.
|
|\ \
| | |
| | | |
Avoid accidental captures of Context
|
| | |
| | |
| | |
| | |
| | |
| | | |
The captured context was passed implicitly to dd.rhs, atGroupEnd is
always run with the same runId as the captured context so this should be okay,
but it's better to avoid using two contexts in the same expression anyway.
|
|\ \ \
| | | |
| | | | |
Fix #1747: Improve error message for Scala/Java type mismatch
|
| | |/
| |/|
| | |
| | |
| | | |
We used to "fill-in" with zeroes if variances were missing. I now
think that;'s too error-prone. Better define all variances explicitly.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It turns out that we simply cannot do reliable outer path
computation that fills in the right hand sides of this-proxies
from the types of these proxies. As-seen-from logic can mangle
the types of proxies enough to scramble the necessary information.
What we now do instead is simply count: We record the number
of outer accesses to an outer this in inlineable code, and do the same number
of outer accesses when computing the proxy.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Interesting that the tests pass even if we always assume outOfContext = true.
So this raises the question why have a flag? It's just that I am not sure the
`outOfContext` behavior is correct in all cases. So I prefer to be conservative
here.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
The new situation in the test was that outer of the inlined method
was `A` but it's as seen from type is a subtype `B`.
We need two fixes:
- Ignore outerSelects in TreeChecker. These are treated as having fixed symbols.
- Adapt the outer-path logic to deal with code that's moved to another context.
|
|/
|
|
|
|
|
|
| |
* Add `isSyntheticFunction` checks for synthetic functions such as FuntionN
for N > 22 and ImplicitFunctionN for N >= 0.
* Add `erasedFunctionClass` to get the erased verion of synthetic functions.
* Change the semantics of `isFunctionClass` to return true if it is any kind of
FunctionN or ImplicitFunctionN.
|
|\
| |
| | |
Fix #1916: fix erasure of implicit xxl closures
|
| |
| |
| |
| | |
This commit extends the fix done in #1920 to implicit closures.
|
|/
|
|
|
|
|
|
| |
This has two advantages:
- We can distinguish BackquotedIdent from Ident, allowing the user to
use a defined "type `&`", see testcase.
- We get better positions for the operators. This is useful in IDEs, for
example to get the type at point.
|
|\
| |
| | |
[doctool] Add markdown support && Static site generation
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix-#1723: Avoid private leaks on completion
|
| | |
| | |
| | |
| | | |
As #1723 demonstrates, doing this at PostTyper is too late.
|
|\ \ \
| |_|/
|/| | |
Fix #1915 Synthetic function traits need NoInits flag
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When compiled from Scala2 that knowledge was lost. Normally that
would be not a problem (e.g. the same thing happens for Function0-22).
But FunctionXXL is special in that it is inherited only after erasure.
Since `augmentScala2Trait` runs before erasure, it is having no effect
on FunctionXXL itself when running on classes that inherit function types of
large arities. Therefore, FunctionXXL is missing an implementation class
at phase Mixin, which means that the supercall logic which rewires
super.<init> to implementation class init cannot work. This leaves us
with a super.<init> to FunctionXXL in `i1915.scala`.
The fix is to always know that `FunctionXXL` has no init method, so
no super.<init> will be generated for it.
|
|/
|
|
|
| |
xxl closures need to get the SAM type FunctionXXL as their explicit
type field after ersure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Illegal class overrides are fundamentally at odds with the way dotty
represents types and therefore can cause lots of low-level problems.
Two measures in this commit
First, we detect direct illegal class overrides on completion instead of
during RefChecks. Break the override by making the previously
overriding type private.
This fixes i1750.scala, but still fails for indirect overrides between
two unrelated outer traits/classes that are inherited by the same class or trait.
We fix this by catching the previously thrown ClassCastException
in both ExtractAPI and RefChecks.
Test case for indirect overrides is in i1750a.scala.
|
|\
| |
| | |
Add sbt-based bootstrap
|
| | |
|
| |
| |
| |
| |
| | |
Using changeOwnerAfter would be more appropriate but currently fails
with an assertion in LambdaLift
|
|/
|
|
|
|
|
|
|
| |
Previous version precomputed everything needed to make the final decision.
This was fast-path for method that will be tail-rec transformed.
Unfortunatelly, in case decision was not to tail-rec optimize it could have
led to exponential number of transformations.
Now, the fast-path is for methods that will not.
|
|\
| |
| | |
Fix #1877: Add forwarders for primitive/generic mixins.
|
| | |
|
| | |
|
| | |
|