| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Need to use fresh PolyParams instead of WildcardTypes
if constraint is committable.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We previously tried to force S1 and S2 be the same type
when encountering a lub like `T1 { A = S1 } & T2 { A = S2 }`.
The comments in this commit explain why this is unsound, so
this rewrite is now made subject to a new config option, which
is off by default.
I verified that the new behavior does not affect the performance of
the junit tests.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We approximate dependencies to parameters by Wildcards. This was already
done in one place, is now done in other places as well, instead of doing nothing for
dependent methods.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
No reason why we should not - normalize handles implicit
methods just fine. This fixes type errors in test HLists.scala.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If an applied type has a refinement, it was
printed before as one large refinement type
including the type parameter bindings.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Change "recursive/cyclic definitions needs type" errors to Message
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Fall-back to reporting "overloaded or recursive needs type".
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Split error messages for recursive method and overloaded method needs type into two (but
did not solve the analysis which to show).
Make CyclicReference type error construct corresponding error message.
|
| | | | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
ennru_RecursiveNeedsType
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
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.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
I introduced an error in the refactoring two commits ago.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | |_|_|_|/ /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
support merging companion objects in expanded trees
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Previous implementation is problematic when there are multiple
transforms before typer:
1. There might be objects needing merging that only exist in the
expanded trees, which cannot be handled by the previous algorithm.
2. There may be companion object and class defined only in the
expanded trees, the previous algorithm doesn't create links for them.
This PR simplifies the companion object merging logic and
fixes the problems above.
In fact, this PR supports multiple pre-typer transform during expansion.
The protocol is that the expansion of a MemberDef is either a flattened
thicket or a non-thicket tree.
|
|\ \ \ \ \ \ \ \
| |_|/ / / / / /
|/| | | | | | | |
Fix #2067: Compute defKind at Typer, not Namer
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
Remove most uses of scala-reflect jar
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This avoids a dependency on the scala-reflect jar
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix incremental overcompilation due to instabilities
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The output of ExtractAPI should be stable, otherwise sbt might
incorrectly conclude that some API changed because its hash is
different, even though the source hasn't changed. This commit fixes two
cases where this might happen:
- package prefixes in NamedTypes are unstable, we already worked around this by
normalizing them, but only for classes, we now always do it.
- We use a simplified representation for `_ >: Nothing <: Any`, this is
now checked using `isDirectRef` instead of referential equality on types
since there is more than one way to represent `Nothing` and `Any`.
Both of these issues were found while compiling dotty with
`dotty-compiler-bootstrapped/compile` and making small changes.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
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.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
fixed PatternSyntaxException on Windows
|
| | |_|/ / /
| |/| | | | |
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Drop named type parameters in classes
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
(1) Drop unused error message
(2) Drop test which is now illegal
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|