| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Previously a refinement could only apply to a type bound in
the parent. This restriction needs to be dropped for the new
encoding of hk type parameters.
|
|\
| |
| | |
Fix #1366: constant adaptation
|
| |
| |
| |
| |
| | |
Fix: #1366. Constant adaptation did not work if the
expected type was an as yet uninstantiated type variable.
|
| | |
|
| |
| |
| |
| | |
This reverts commit 8a39160e8375dd1707f686e13a2a796aed310ef7.
|
|/ |
|
| |
|
|\
| |
| | |
Fix #856: Handle try/catch cases as catch cases if possible.
|
| |
| |
| |
| |
| |
| |
| | |
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
|
|\ \
| |/
|/| |
Check non-deferred declarations are implemented
|
| | |
|
|\ \
| | |
| | | |
Multiple fixes to @static
|
| | |
| | |
| | |
| | |
| | | |
GenBCode checks if class already has static initialiser,
the check is fooled if class inherited a static initialisers.
|
| | |
| | |
| | |
| | | |
This broke lazy vals, as unsafe offsets were not initialised.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Nicely spotted by Ycheck.
|
| | |
| | |
| | |
| | |
| | | |
This method is only used to find static initialisers.
Previously, it was always wrong, but we didn't care as we never had them.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now moveStatics can correctly create static constructors for objects.
Those static constructors would later be merged with synthetic module
initialisers by GenBCode. This is a bit of magic, it would be good
to move all this into this phase.
|
| | | |
|
| | |
| | |
| | |
| | | |
Helps to spot usage of unsafe that would lead to undefined behaviour.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Unlink the static from the old scope,
and don't drop top-level trees that are not TypeDefs.
|
| | |
| | |
| | |
| | |
| | |
| | | |
There used to be a rare test when companion class and companion
object would have gotten the very same offset,
causing undefined behaviour in runtime.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
It's not clear how they should be implemented.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As a funny side-effect this allows to execute arbitrary code in static
initialisers:
@static val a: Unit = {println("loaded")}
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
They aren't inherited and can be entered into frozen owners.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix issue with GADT not typechecking without bind in match
|
| | | | |
|
| | | | |
|
| |_|/
|/| | |
|
| |/
|/| |
|
|\ \
| |/
|/| |
Properly report errors when cli flags are malformed
|
| |
| |
| |
| |
| | |
Previously we returned an empty Reporter with no errors so partest
reported the test as a success.
|
|\ \
| | |
| | | |
Implicit scope caching: bug fixes and performance improvements
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If directly applicable alternatives exists, do not try other
alternatives. The original motivation for this change was to reduce the
number of searches for implicit views we do since some overloaded
methods like `Int#+` are used a lot, but it turns out that this also
makes more code compile (see `overload_directly_applicable.scala` for an
example), this change does not seem to match what the specification
says (it does not define a notion of "directly applicable") but it does
match the behavior of scalac, and it seems useful in general.
|
| | | |
|
| | |
| | |
| | |
| | | |
This reduces the number of implicit scopes we cache.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Many intermediate `OfTypeImplicits` are created during a call to
`implicitScope`, but they won't all be used so there is no need to
compute `OfTypeImplicits#refs` unless it's actually used.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
According to SLS ยง 7.2, self types are not a named part of a type,
so they're not part of the implicit scope. Before this commit, this was
usually the case because we normally refer to a class using a TypeRef,
but in some cases a class might appear as a ThisType, and
ThisType#underlying returns the self type, we now use ThisType#tref
instead which just returns a TypeRef corresponding to the class.
|
| | |
| | |
| | |
| | |
| | | |
This did not work before because we incorrectly looked for their value
in the prefix of the type instead of the type itself.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The issue is subtle: the `tp` in scope in `def ofTypeImplicits` is the
`tp` passed to the top-level `implicitScope` method, not the `tp` passed
to the recursively called `iscope`, this means that before this commit,
all intermediate `OfTypeImplicit` scopes cached while computing an
implicit scope had their `tp` field incorrectly set, which means that we
could miss implicits in later implicit searches.
Note that the `implicit_cache.scala` test worked before this commit
because of the restrictions on caching that exist since
b8b0f381ef2cbcb7bad66fd3e7a9ae929baa45f6, it is included anyway because
our caching strategy might change in the future.
|
| | | |
|