| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
... and likewise for taking a signature. The previous case worked
in all cases except when faced with an alias like `type Id[T] = T`.
In that case, it would disregard the argument and erase to Object.
|
|
|
|
|
| |
It's too surprising to leave it as a type proxy. In all circumstances except
erasure, it is not true that a PolyType is somehow the same as its result type.
|
| |
|
| |
|
|
|
|
|
|
| |
MethodTypes have paramTypes whereas PolyTypes have paramBounds.
We now harmonize by alling both paramInfos, and parameterizing
types that will become common to both.
|
|\
| |
| | |
Tailrec for derivesFrom/lookupRefined/classSymbol/classSymbols
|
| | |
|
| |
| |
| |
| | |
... unless they would be accessible in the given context.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* Add `isSyntheticFunction` checks for synthetic functions such as FuntionN
for N > 22 and ImplicitFunctionN for N >= 0.
* Add `erasedFunctionClass` to get the erased verion of synthetic functions.
* Change the semantics of `isFunctionClass` to return true if it is any kind of
FunctionN or ImplicitFunctionN.
|
|
|
|
| |
This commit extends the fix done in #1920 to implicit closures.
|
|\
| |
| | |
Add implicit function types
|
| |
| |
| |
| | |
and check at runtime that it works
|
| | |
|
|/
|
|
|
|
|
|
|
| |
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
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Functions with more than 22 parameters are now
automatically converted to functions taking
a single object array parameter.
This has been achieved by tweaking erasure.
Other things I have tried that did ot work out well:
- Use a single function type in typer. The problem with this
one which could not be circumvented was that existing higher-kinded
code with e.g. Funcor assumes that Functon1 is a binary type constructor.
- Have a late phase that converts to FunctonXXL instead of
doing it in erasure. The problem with that one was that
potentially every type could be affected, which was ill-suited
to the architecture of a miniphase.
|
|
|