| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\
| |
| | |
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.
|
|\ \
| | |
| | | |
Fix #360: Improve avoidance algorithm
|
| | | |
|
| |/
| |
| |
| |
| |
| | |
The essential change is that we do not throw away more
precise info of the avoided type if the expected type
is fully defined.
|
|\ \
| | |
| | | |
Fix overriding a Java method with varargs
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
These two directories were tested using the same flags, but tests/tasty
compiled all of its files at once which is usually not what is intended.
|
|\
| |
| | |
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
|
| | |
| | |
| | |
| | |
| | | |
Need to skip type bounds in `underlying` chain, since
TypeBounds is not a legal operand type for OrType.
|
|\ \ \
| | | |
| | | | |
Fix type inference for HLists and HMaps
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
and a typo fixed
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I believe this worked only accidentally because we matched
more things with wildcards which turned out to be flawed. The test
errors show some funky _#_ types, so not sure whether the tests
are still valid or not. Moved back to pending awaiting further
resolution.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Variance changes quite a few things for type inference, so
it's good to check a non-variant version as well.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
These now compile with the changes to dependent methods, except
for one which is invalid under dotty.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The HLists test brought out the unsoundness of alias
rewriting in glbs which is tackled in the last commit.
|
|\ \ \ \
| | | | |
| | | | | |
Disallow subtypes of Function1 acting as implicit conversions
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
It's hard to predict for defKind all the desugarings that can be
applied to a definition. Better to do it once the desugarings have been
applied. NoInit and PureInterface are both tested only after Typer,
so it's OK to delay their initialization until regular Typer.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The default param will be desugared into a method with a body, so
setting PureInterface would be wrong. The enclosed test previously
failed with a pickling difference, because the unpickler correctly
decided to not set the PureInterface flag since it saw the default param
method.
This fixes the tasty_dotc_util which failed since the last commit
because FreshNameCreator was now incorrectly recognized as a PureInterface.
|
| |/
|/| |
|
|\ \
| | |
| | | |
Fix #2056: Backend crash when inlined method contains try
|
| | |
| | |
| | |
| | |
| | |
| | | |
In various places we do "case EmptyTree =>", since Tree#equals uses
reference equality this means that EmptyTree should never be copied,
otherwise some other code path will be taken.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Deleting an error message changes all subsequent error message umbers,
which means that REPL tests were invalidated. This is a bit unfortunate
from a testing standpoint.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Drop the [type T] syntax, and what's associated to make it work.
Motivation: It's an alternative way of doing things for which there seems
to be little need. The implementation was provisional and bitrotted during
the various iterations to introduce higher-kinded types. So in the end the
complxity-cost for language and compiler was not worth the added benefit
that [type T] parameters provide.
Noe that we still accept _named arguments_ [A = T] in expressions; these are useful
for specifying some parameters and letting others be inferred.
|
|\ \
| | |
| | | |
Fix #2030: Don't chain implicit conversions
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When inferring a view, we are not allowed to use another
implicit conversion to adapt its result. Fixing this revealed
another problem where we have to re-enable implicit conversions
when pre-typing arguments in overloading resolution.
|
| |/
|/| |
|
|\ \
| | |
| | | |
Fix #2033: Improve handling of unresolved overloaded arguments
|
| |/ |
|
|\ \
| |/
|/| |
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.
|
|\ \ \
| | | |
| | | | |
Better error messages for missing type of recursive definitions
|
| | | | |
|