| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Change case class desugaring and decouple Products and name-based-pattern-matching
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Drop Seq implementation of name. This implementation
was always problematic because it entailed potentially
very costly conversions to toSimpleName. We now have
better control over when we convert a name to a simple
name.
|
| |
| |
| |
| |
| |
| |
| | |
Start scheme where unmangling is done by NameKinds instead of
in NameOps.
Also add namekinds for protected accessors.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
Deterministically randomises test compilation order
|
| |
| |
| |
| | |
The previous implementation would compile tests in different orders from machine to machine, depending on the order in which *.scala files are listed by the operating system.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
MethodTypes have paramTypes whereas PolyTypes have paramBounds.
We now harmonize by alling both paramInfos, and parameterizing
types that will become common to both.
|
| |
| |
| |
| |
| | |
It was a red herring. Symbolic names are expanded anyway to $plus / $minus,
so they can't be confused with a variance prefix.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This leads to a slight overall simplification, harmonizes pickle
format with internal representation, and makes MethodTypes and
PolyTypes more similar to each other.
I believe the change is useful as it is, but in particular it is
a useful step for an eventual unification of MethodTypes and
PolyTypes.
|
|\ \
| |/
|/| |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
`copy` should always return the type of it's rhs. The discussion of
#1970 concluded that no special treatment for enums is needed.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
The same type needs to be used as a result type for
the copy method, and the function type implemented by
the companion module.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
The previous scheme did not work because desugaring cannot deal with
repeated expansions. We now sidestep the issue by doing the expansion in the parser. Luckily,
positions work out perfectly, so that one can reconstruct the source precisely from the parsed untyped
trees.
|
| |
| |
| |
| | |
`enum' only allowed as a prefix of classes, dropped from traits and objects.
|
| |
| |
| |
| | |
Modify syntax.md and Tokens/Parser/untpd to support enums.
|
|\ \
| |/
|/| |
Fixes `@unchecked` warnings
|
| | |
|
|\ \
| | |
| | | |
Fix #1959: infix type operators in the REPL
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Infix type operators were broken in the REPL.
The REPL uses fold methods from the untpd package,
but those were skipping the operator subtree when folding
over an InfixOp.
Fix the issue by taking the operator into account.
Tested:
1) Verified that only the REPL code uses the modified
fold method.
2) Added repl test.
|
|/ |
|
|
|
|
|
| |
This was especially bad for incremental compilation since the temporary
variable name is unstable.
|
|\
| |
| | |
Tailrec for derivesFrom/lookupRefined/classSymbol/classSymbols
|
| | |
|
| |
| |
| |
| |
| | |
To allow for dependencies between method type parameters, construct MethodTypes
from a closure that maps the currently constructed MethodType to its parameter types.
|
|\ \
| | |
| | | |
support merging companion objects in expanded trees
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
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.
|
|\
| |
| | |
Add overloading support for case-closures
|
| | |
|