| 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.
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
- rename utility methods
- generate utility methods also for object cases
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
`enum' only allowed as a prefix of classes, dropped from traits and objects.
|
|
|
|
|
| |
This was especially bad for incremental compilation since the temporary
variable name is unstable.
|
|
|
|
|
| |
Only the parameters in the first parameter list of a case class should get
the `CaseAccessor` flag. Fixes #2020.
|
|
|
|
|
|
|
|
| |
val definitions and for expressions both distinguish whether
something is a pattern or a variable binding. They no do it
the same way: `ident` or an `ident: type` is a variable binding,
everything else is a pattern. Previously, capitalized idents
were considered as bindings in valdefs but as pattern in fors.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Preserving the position of infix operators is useful for IDEs'
type-at-point. We also preserve the position of the untyped lhs of
right-associative operators, this is useful both for IDEs and for error
messages, before:
4 |val x: List[Int] = "foo" :: List(1)
| ^
| found: String($1$)
| required: Int
|
After:
scala> val x: List[Int] = "foo" :: List(1)
-- [E007] Type Mismatch Error: <console> ---------------------------------------
4 |val x: List[Int] = "foo" :: List(1)
| ^^^^^
| found: String($1$)
| required: Int
|
Note: It would be even nicer if we displayed "String" instead of
"String($1$)" since $1$ is synthetic, this commit does not address this.
|
|
|
|
|
|
|
|
| |
This has two advantages:
- We can distinguish BackquotedIdent from Ident, allowing the user to
use a defined "type `&`", see testcase.
- We get better positions for the operators. This is useful in IDEs, for
example to get the type at point.
|
| |
|
|
|
|
|
| |
Need to be careful not to read a classfile before a compilation unit
defining the annotation is entered.
|
|
|
|
| |
An operation was performed quadratically before.
|
|\
| |
| | |
Add implicit function types
|
| | |
|
| |
| |
| |
| |
| | |
When the expected type is an implicit function, create an
implicit closure to match it.
|
|\ \
| |/
|/| |
Fix #1797: Allow case class params with names _1, _2, ...
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This was not possible before because it clashed with the automatically
generated name of the accessor. We now allow it, by simply taking the
parameter(accessor) itself as the case class accessor if it already has
that name. But you still cannot write
case class C(_2: Int, _1: String)
nor should you be able to do this.
|
|/
|
|
| |
This implements the rules laid down in #1805.
|
|\
| |
| | |
Fix #1765: Context bounds and denotation handling
|
| |
| |
| |
| |
| |
| | |
With the change to the representation of higher-kinded type definitions,
context bounds could be hidden in the body of a type lambda. Need to
compensate for that.
|
|/ |
|
| |
|
|
|
|
| |
This manifested itself as a pickling difference in tasty_tools
|
|
|