| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \
| | |
| | | |
Fix #1915 Synthetic function traits need NoInits flag
|
| |/
| |
| |
| | |
Fixes #1915.
|
|\ \
| | |
| | | |
Implement structural type member access
|
| | |
| | |
| | |
| | |
| | | |
Use base types instead of implicits. This is more robust
in the presence of type abstraction.
|
| | |
| | |
| | |
| | | |
New scheme for implementing structural type member access.
|
| |/
|/|
| |
| |
| | |
xxl closures need to get the SAM type FunctionXXL as their explicit
type field after ersure.
|
| | |
|
|/ |
|
| |
|
| |
|
|\
| |
| | |
Fix #1820: make sure outer of traits implemented
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, we don't generate `outer` for the anonymous class `new Inner2 {}`.
This is incorrect, as `Inner2 {}` extends `A.Inner`, which requires an outer.
trait A {
val a = "a"
trait Inner {
def f = println(a)
def h = 3
}
}
trait B extends A {
trait Inner2 extends Inner
new Inner2 {}
}
|
| | |
|
| |
| |
| |
| | |
Also, integrate Jason's test case with the conditional.
|