| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Use fromParams instead.
|
|
|
|
|
| |
- Use TypeLambda instead of PolyType.
- Further harmonize factory operations
|
|
|
|
|
|
| |
MethodTypes have paramTypes whereas PolyTypes have paramBounds.
We now harmonize by alling both paramInfos, and parameterizing
types that will become common to both.
|
|
|
|
|
| |
and generalize MethodParam to ParamRef, and
TypeParamInfo to ParamInfo
|
|\
| |
| | |
Make leak avoidance more robust
|
| |
| |
| |
| |
| |
| | |
If class files are missing, finding an underlying class
reference might give a NoType. This caused an asInstanceOf
to fail. We now handle that case gracefully.
|
|/
|
|
|
|
|
|
|
|
|
| |
`checkNoPrivateLeaks` can force a lot of things, this lead to
hard-to-reproduce issues in unpickling because we called
`checkNoPrivateLeaks` on the type parameters of a class before anything
in the class was indexed. We fix this by making sure that
`checkNoPrivateLeaks` never transforms type symbols, only term symbols,
therefore we can unpickle type parameters without forcing too many
things. tests/neg/leak-type.scala illustrates the new restriction that
this necessitates.
|
| |
|
|
|
|
|
|
|
| |
Before this commit, ParSetLike compiled fine as part of compileStdLib
but crashed when compiled by itself because we tried to force a LazyRef
while forcing the same LazyRef. This commit fixes this by being slightly
more lazy where it matters.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Previously we never used the `pos` argument of `checkNoPrivateLeaks` and
instead used `sym.pos`, this makes a difference for calls to
`avoidPrivateLeaks` coming from `TreeUnpickler` where we should use
`tree.pos` instead.
|
|
|
|
|
| |
Excepted are only Serializable and Comparable. This follows
scalac's behavior.
|
|
|
|
|
|
|
|
| |
Need to take account of situations like
extends Any with java.io.Serializable
which occur in stdlib.
|
|
|
|
|
| |
We need to check a coherence condition between the superclass
of a trait and the superclass of an inheriting class or trait.
|
|\
| |
| | |
Fix #1644: Disallow inner classes in value classes
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Fix checks related to value classes
|
| | |
|
|/ |
|
|
|
|
|
|
| |
The access boundary of a def in a local class is the owner of that
class, previously it was set to the access boundary of the owner of the
class instead.
|
|
|
|
|
|
|
|
|
|
|
| |
Previously Outer2#Inner#foo failed to compile with:
```
non-private method foo refers to private value x in its type signature
```
This should compile because the boundary of `foo` is `class Outer2`
and the boundary of `x` is `object Outer2`. This commit fixes this by
also considering the linked boundary in `checkNoPrivateLeaks`.
|
|
|