| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix #2218: Add fullyDefinedType for class parent types
|
| |
| |
| |
| |
| |
| | |
If we do not do that, any type variables in the parent type get interpolated
later, when the whole primary constructor is typed. But by then we miss the
context of what their variance was.
|
|\ \
| |/
|/| |
fix #2163: don't narrow liftedOwner if symbol is InSuperCall
|
| | |
|
| |
| |
| |
| |
| |
| | |
The previous fix was too coarse. We need to move an anonymous function
in a supercall towards the call, we just have to make sure it's not
in the directly enclosing class.
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
Previously we just returned the unapplied WildcardType which is
incorrect if the WildcardType is bounded. The proper thing to do is to
do the type application on the bounds of the WildcardType and wrap the
result in a WildcardType.
|
|\
| |
| | |
Change case class desugaring and decouple Products and name-based-pattern-matching
|
| |
| |
| |
| |
| |
| | |
- t7296 & case-class-23 are moved out of pending
- 1938 tests productElement > 23
|
|\ \
| | |
| | | |
Fix #2142: Skolemize arguments of dependent methods if necessary
|
| | |
| | |
| | |
| | | |
This was missing before, led to errors not being detected.
|
|\ \ \
| | | |
| | | | |
Add enum exhaustivity checking
|
| | | | |
|
| | | | |
|
| | |/
| |/|
| | |
| | |
| | | |
A new kind of child annotation that points to the term symbol representing an
enum value.
|
|\ \ \
| |_|/
|/| | |
Fix #2198: Don't widen module singletons
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since module classes are a compiler-generated construct that's not directly
visible to programmers, it seems better not to automatically widen a module
singleton to its underlying class.
Fixes #2198.
|
|\ \ \
| | | |
| | | | |
Fix #2188: Do cbn transform also on Selects
|
| |/ /
| | |
| | |
| | | |
These can arise as a result of an explicit outer transform.
|
|\ \ \
| | | |
| | | | |
Fix #2192: Follow supertypes when determining whether an expect type …
|
| |/ /
| | |
| | |
| | | |
function type
|
|\ \ \
| |/ /
|/| | |
Fix #2220: Change handling of package objects and tweak hk type inference
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we believed that reducing type applications did not affect
type inference as long as the reduced type constructor had the same
arity as the unreduced one, for example reducing `Foo[X, Y]` is fine
when `Foo` is defined as:
type Foo[A, B] = Bar[A, B]
but not when it's defined as:
type Foo[A] = Bar[A, A]
But this is not a sufficient condition: the bounds of the type
constructor arguments also matter for type inference, so we need to be
more strict and disallow reductions in cases like:
type Foo[A, B] = Bar[B, A]
and:
type Foo[A, B] = Bar[A, Int]
|
|\ \
| |/
|/| |
fix #2166: unpickling of shared CaseDef
|
| | |
|
|\ \
| | |
| | | |
Add "enum" construct
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
- rename utility methods
- generate utility methods also for object cases
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Infer type arguments for enum paraments from corresponding type
parameter bounds. This only works if the type parameter in question
is variant and its bound is ground.
|
| | |
| | |
| | |
| | |
| | | |
Previous expansion caused 3 spurious follow-on errors which are now
avoided.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support cases with type parameters that implicitly extend a non-parameterized base
without needing their own extends clause. The proposal has been updated to make clear
that this is supported.
Also address other reviewers comments.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Based on the discussion in #1970, enumeration objects now
have three public members:
- valueOf: Map[Int, E]
- withName: Map[String, E]
- values: Iterable[E]
Also, the variance of case type parameters is now
the same as in the corresponding type parameter of
the enum class.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In an enum case like
case C() extends P1 with ... with Pn ...
apply now returns `P1 & ... & Pn`, where before
it was just P1.
Also, add to Option test.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Flags like Trait are in fact not always defined when a symbol
is created. For symbols loaded from class files, this flag, and
some other is defined only once the classfile has been loaded.
But this happens in general before the symbol is completed.
We model this distinction by separating from the `FromStartFlags` set
a new set `AfterLoadFlags` and distinguishing between the two sets
in `SymDenotations#is`.
Test case is enum-Option.scala. This erroneously complained before
that `Enum` was not a trait.
|
| | | |
|
| | |
| | |
| | |
| | | |
These are now implemented in scala.runtime.
|
| | | |
|
| | | |
|
| |/ |
|
|\ \
| | |
| | | |
Fix #2024: TypeApply can be a final apply of a recursive method.
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`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.
|