| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Fix desugaring of variable pattern leaking into API
|
| |
| |
| |
| |
| | |
This was especially bad for incremental compilation since the temporary
variable name is unstable.
|
| | |
|
|/ |
|
| |
|
|\
| |
| | |
Fix #2054
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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 #1960: add test
|
| | | |
|
|/ /
| |
| |
| |
| | |
Move fixed logic to FirstTransform, where the other constant
folding operations are also done.
|
|\ \
| | |
| | | |
Fix type inference for HLists and HMaps
|
| | |
| | |
| | |
| | |
| | |
| | | |
Type inference tends to take quite different paths for non-variant
and variant data structures. Since, non-variant hmap has already exposed quite
a few problems, it's good to test it also in the covariant case.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Variance changes quite a few things for type inference, so
it's good to check a non-variant version as well.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
The HLists test brought out the unsoundness of alias
rewriting in glbs which is tackled in the last commit.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Now only Scala2 mode treats Function1's as implicit conversions. Instead we introduce
a new subclass ImplicitConverter of Function1, instances of which are turned into
implicit conversions.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new test `falseView.scala` shows the problem. We might create
an implicit value of some type that happens to be a subtype of Function1.
We might now expect that this gives us an implicit conversion, this
is most often unintended and surprising.
See the comment in Implicits#discardForView for a discussion why
we picked the particular scheme implemented here.
|
| |/
|/| |
|
|\ \
| |/
|/| |
Fix #2030: Don't chain implicit conversions
|
| | |
|
|\ \
| |/
|/| |
HMap test case
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Treat implicit by-name arguments as lazy values
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With the previous rules, the two test cases produce a
diverging implicit expansion. We avoid this by creating
for every implicit by-name argument of type T a lazy implicit
value of the same type. The implicit value is visible for all
nested implicit searches of by-name arguments. That way,
we tie the knot and obtain a recursive lazy value instead of
a diverging expansion.
|
| | |
| | |
| | |
| | |
| | | |
Only the parameters in the first parameter list of a case class should get
the `CaseAccessor` flag. Fixes #2020.
|
|\ \ \
| |_|/
|/| | |
Fix #1990: Handle inlining where this proxies change types
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
| |
| |
| |
| | |
This shows that the builder pattern can be expressed
with implicit function types.
|
|\ \
| | |
| | | |
Disable tests that require scala-compiler
|
| |/
| |
| |
| | |
This is necessary if we ever want to get rid of our dependency on scala-compiler
|
| |
| |
| |
| |
| |
| | |
We cannot assume that the untyped rhs of the bind is a `Typed` tree,
with extractors it might be an `Apply` node, and in general it might
also be a `Parens` node.
|
|/ |
|
|\
| |
| | |
Fix #1916: fix erasure of implicit xxl closures
|
| |
| |
| |
| | |
This commit extends the fix done in #1920 to implicit closures.
|
|\ \
| | |
| | | |
Fix #1907: Improve error message
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems in most cases this leads to weird behavior and cause
confusing error messages later.
It also means we cannot create an Array[Nothing], except by
passing the classtag explicitly.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
The test exercises all the improvements made in previous
commits of this branch.
|
|\ \ \
| | | |
| | | | |
Fix to wildapprox
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Prompted by a discussion on the Scala reddit, this one
verified that dotty does not have the problem exhibited
in SI-10170. I piggyback on this PR because this does
not warrant a separate PR>
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | | |
The test exercises all the improvements made in previous
commits of this branch.
|
|/ /
| |
| |
| |
| | |
As #1569 shows, by-name parameters should be treated in the same way
as by-value parameters. If the expression is not pure, install a binding.
|