| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
In an enum case like
case C() extends P1 with ... with Pn ...
apply now returns `P1 & ... & Pn`, where before
it was just P1.
Also, add to Option test.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flags like Trait are in fact not always defined when a symbol
is created. For symbols loaded from class files, this flag, and
some other is defined only once the classfile has been loaded.
But this happens in general before the symbol is completed.
We model this distinction by separating from the `FromStartFlags` set
a new set `AfterLoadFlags` and distinguishing between the two sets
in `SymDenotations#is`.
Test case is enum-Option.scala. This erroneously complained before
that `Enum` was not a trait.
|
| |
|
|
|
|
| |
These are now implemented in scala.runtime.
|
| |
|
| |
|
| |
|
|\
| |
| | |
Make case class hashCode take class into account
|
| |\ |
|
| | |
| | |
| | |
| | | |
Also, update check file.
|
| |/
|/| |
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
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.
|