aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/ast/Desugar.scala
Commit message (Collapse)AuthorAgeFilesLines
* Fix master compilationOlivier Blanvillain2017-04-111-1/+1
|
* Merge pull request #1938 from dotty-staging/named-based-patmatFelix Mulder2017-04-111-28/+55
|\ | | | | Change case class desugaring and decouple Products and name-based-pattern-matching
| * Generate synthetic productElement/productArity methods above 22Olivier Blanvillain2017-04-061-28/+55
| |
* | Names are no longer SeqsMartin Odersky2017-04-111-1/+1
| | | | | | | | | | | | | | | | 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.
* | Decentralize unmangling, add new nameKindsMartin Odersky2017-04-111-2/+2
| | | | | | | | | | | | | | Start scheme where unmangling is done by NameKinds instead of in NameOps. Also add namekinds for protected accessors.
* | Fix rebase breakageMartin Odersky2017-04-111-0/+1
| |
* | Rename NameExtractor -> NameKindMartin Odersky2017-04-111-1/+1
| |
* | Make freshName semanticMartin Odersky2017-04-111-5/+5
| |
* | Get rid of ExpandedName flagMartin Odersky2017-04-111-1/+1
|/
* PolishingsMartin Odersky2017-04-061-1/+1
|
* Rename PolyTypeTree -> LambdaTypeTreeMartin Odersky2017-04-061-2/+2
|
* Drop name checking scheme for type parametersMartin Odersky2017-04-061-9/+3
| | | | | It was a red herring. Symbolic names are expanded anyway to $plus / $minus, so they can't be confused with a variance prefix.
* Don't let illegal parameter names propagate into typesMartin Odersky2017-04-061-4/+4
|
* Encode variances in parameter namesMartin Odersky2017-04-061-0/+6
| | | | | | | | | | 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.
* Implementation of proposal changesMartin Odersky2017-04-051-1/+1
| | | | | - rename utility methods - generate utility methods also for object cases
* Support cases with type parameters that extend a non-parameterized baseMartin Odersky2017-04-041-8/+12
| | | | | | | | 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.
* Support comma-separated enum constantsMartin Odersky2017-04-041-3/+15
|
* Change return type of `apply`.Martin Odersky2017-04-041-7/+7
| | | | | | | | | | | 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.
* Don't change the return type of the `copy` methodMartin Odersky2017-04-041-1/+1
| | | | | `copy` should always return the type of it's rhs. The discussion of #1970 concluded that no special treatment for enums is needed.
* Check that cases with type parameters also have an extends clauseMartin Odersky2017-04-041-1/+5
|
* Fix typoMartin Odersky2017-04-041-1/+1
|
* Be more systematic about result of apply methodMartin Odersky2017-04-041-8/+18
| | | | | | The same type needs to be used as a result type for the copy method, and the function type implemented by the companion module.
* Implement enum desugaringMartin Odersky2017-04-041-35/+55
|
* Simplify syntaxMartin Odersky2017-04-041-2/+1
| | | | `enum' only allowed as a prefix of classes, dropped from traits and objects.
* Fix desugaring of variable pattern leaking into APIGuillaume Martres2017-03-211-2/+3
| | | | | This was especially bad for incremental compilation since the temporary variable name is unstable.
* Fix #2020: Only the first parameters of a case class are caseaccessorsMartin Odersky2017-02-221-1/+7
| | | | | Only the parameters in the first parameter list of a case class should get the `CaseAccessor` flag. Fixes #2020.
* Fix #1975: Align valdefs and for expressions for patternsMartin Odersky2017-02-141-5/+7
| | | | | | | | 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.
* fix #1484: position of while incorrect in debugliu fengyun2017-02-101-2/+2
|
* Better positions for infix term operations.Guillaume Martres2017-02-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Represent untyped operators as Ident instead of NameGuillaume Martres2017-02-051-12/+12
| | | | | | | | 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.
* Fix #1908: give synthetic default params correct flagsFelix Mulder2017-01-251-1/+3
|
* Tweak the way annotations are represented in desugaringMartin Odersky2016-12-211-6/+24
| | | | | Need to be careful not to read a classfile before a compilation unit defining the annotation is entered.
* Fix-#1824 Logic fix in desugarMartin Odersky2016-12-181-2/+1
| | | | An operation was performed quadratically before.
* Merge pull request #1775 from dotty-staging/add-implicit-funtypesodersky2016-12-181-7/+16
|\ | | | | Add implicit function types
| * Fix rebase breakageMartin Odersky2016-12-171-1/+1
| |
| * Create implicit closures to math expected implicit functionsMartin Odersky2016-12-171-7/+16
| | | | | | | | | | When the expected type is an implicit function, create an implicit closure to match it.
* | Merge pull request #1815 from dotty-staging/fix-#1797Nicolas Stucki2016-12-171-2/+3
|\ \ | |/ |/| Fix #1797: Allow case class params with names _1, _2, ...
| * Fix #1797: Allow case class params with names _1, _2, ...Martin Odersky2016-12-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Implement new rules for name-based pattern matchingMartin Odersky2016-12-151-3/+1
|/ | | | This implements the rules laid down in #1805.
* Merge pull request #1768 from dotty-staging/fix-#1765odersky2016-12-101-5/+10
|\ | | | | Fix #1765: Context bounds and denotation handling
| * Handle hk types with context bounds in desugarMartin Odersky2016-12-021-5/+10
| | | | | | | | | | | | 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.
* | fix #1773: handle patterns in interpolated stringliu fengyun2016-12-081-0/+6
|/
* fix #1748: desugaring with StringContext in PatDefliu fengyun2016-11-271-0/+2
|
* Fix flags for default getters of constructorsGuillaume Martres2016-11-221-1/+1
| | | | This manifested itself as a pickling difference in tasty_tools
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-0/+1089