| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix #2051: allow override T with => T or ()T
|
| | |
|
|\ \
| | |
| | | |
Allow inter-parameter dependencies
|
| |/ |
|
|/
|
|
| |
The bug is already fixed in PR #1724 while fixing another issue
|
|\
| |
| | |
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.
|
|/
|
|
|
|
| |
The essential change is that we do not throw away more
precise info of the avoided type if the expected type
is fully defined.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 #2000: Make implicit and non-implicit functions incomparable
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Implicit and non-implicit functions are incomparable with <:<, but are
treated as equivalent with `matches`. This means implicit and non-implicit
functions of the same types override each other, but RefChecks will
give an error because their types are not subtypes.
Also contains a test for #2002.
|
|\ \
| | |
| | | |
Fix off-by-one error in forward reference checking
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix #1747: Improve error message for Scala/Java type mismatch
|
| | | | |
|
| | | | |
|
| |/ /
| | |
| | |
| | | |
Omit the `=>' if a PolyType has a MethodType as result type.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
Inlining is only well-defined if the body to inline does not
have any errors. We therefore check for errors before we
perform any transformation of trees related to inlining.
The error check is global, i.e. we stop on any error
not just on errors in the code to be inlined. This is a safe
approximation, of course.
|
|\ \
| | |
| | | |
Remove unused flags
|
| |/ |
|
|/
|
|
| |
This is necessary if we ever want to get rid of our dependency on scala-compiler
|
|\
| |
| | |
Fix #1501 - Check trait inheritance condition
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
We need to check a coherence condition between the superclass
of a trait and the superclass of an inheriting class or trait.
|
|\ \
| |/
|/| |
Fix #1907: Improve error message
|
| |
| |
| |
| | |
Updated with SI issues reported by Jason
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
If a tree has type error, subtrees may not have an assigned type.
Therefore we should avoid transforming such trees.
|
|\ \
| | |
| | | |
Fix #1644: Disallow inner classes in value classes
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Implement structural type member access
|
| | |
| | |
| | |
| | | |
We can't handle them with the proposed scheme. I made a note in #1886.
|
| | |
| | |
| | |
| | | |
New scheme for implementing structural type member access.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|\
| |
| | |
Fix #1845: Survive illegal this-type prefixes
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
Typer#ensureReported's comment outlines an example where errors
could go unreported, resulting in error trees after typer without
any reported error messages. This commit makes sure that at least
one error is reported if a tree node has an error type.
Fixes #1802.
|