aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/ast
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-112-2/+2
| | | | | | | | | | | | | | | | 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-112-2/+2
| |
* | Make freshName semanticMartin Odersky2017-04-112-6/+7
| |
* | Get rid of ExpandedName flagMartin Odersky2017-04-111-1/+1
| |
* | Handle expansion and flatteningMartin Odersky2017-04-111-1/+1
| |
* | Merge pull request #2193 from dotty-staging/deterministic-testsFelix Mulder2017-04-061-1/+1
|\ \ | |/ |/| Deterministically randomises test compilation order
| * Deterministically randomises test compilation orderOlivier Blanvillain2017-04-051-1/+1
| | | | | | | | 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.
* | PolishingsMartin Odersky2017-04-061-1/+1
| |
* | Rename PolyTypeTree -> LambdaTypeTreeMartin Odersky2017-04-065-16/+16
| |
* | Harmonize paramTypes and paramBoundsMartin Odersky2017-04-061-5/+5
| | | | | | | | | | | | MethodTypes have paramTypes whereas PolyTypes have paramBounds. We now harmonize by alling both paramInfos, and parameterizing types that will become common to both.
* | 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.
* | Merge pull request #1958 from dotty-staging/add-enumodersky2017-04-063-40/+298
|\ \ | |/ |/| Add "enum" construct
| * Emit enum utility methods only if enum class is not genericMartin Odersky2017-04-061-6/+8
| |
| * Implementation of proposal changesMartin Odersky2017-04-052-45/+76
| | | | | | | | | | - rename utility methods - generate utility methods also for object cases
| * Infer enum type args from type parameter boundsMartin Odersky2017-04-041-11/+45
| | | | | | | | | | | | 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 extend a non-parameterized baseMartin Odersky2017-04-042-16/+24
| | | | | | | | | | | | | | | | 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-042-19/+34
| |
| * Change enumeration members.Martin Odersky2017-04-041-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * 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-042-35/+179
| |
| * Change handling of enum defs.Martin Odersky2017-04-041-3/+5
| | | | | | | | | | | | | | 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.
| * Simplify syntaxMartin Odersky2017-04-041-2/+1
| | | | | | | | `enum' only allowed as a prefix of classes, dropped from traits and objects.
| * Add enum syntaxMartin Odersky2017-04-041-0/+7
| | | | | | | | Modify syntax.md and Tokens/Parser/untpd to support enums.
* | Merge pull request #2168 from allanrenucci/warningsGuillaume Martres2017-04-041-1/+1
|\ \ | |/ |/| Fixes `@unchecked` warnings
| * Use `mapConserve` in `UntypedTreeMap`Allan Renucci2017-04-031-1/+1
| |
* | Merge pull request #2162 from abeln/infix-opDmitry Petrashko2017-04-041-3/+3
|\ \ | | | | | | Fix #1959: infix type operators in the REPL
| * | Fix #1959: infix type operators in the REPLAbel Nieto2017-04-021-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / fix copy of flags for ModuleDef and refactor codeliu fengyun2017-04-031-19/+19
|/
* 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.
* Merge pull request #2043 from dotty-staging/tailrec-derivesFromDmitry Petrashko2017-03-151-1/+1
|\ | | | | Tailrec for derivesFrom/lookupRefined/classSymbol/classSymbols
| * Add @tailrec to avoid regressions.Nicolas Stucki2017-03-011-1/+1
| |
* | Construct MethodTypes from parameter closureMartin Odersky2017-03-141-2/+2
| | | | | | | | | | To allow for dependencies between method type parameters, construct MethodTypes from a closure that maps the currently constructed MethodType to its parameter types.
* | Merge pull request #2057 from dotty-staging/merge-companionodersky2017-03-091-0/+1
|\ \ | | | | | | support merging companion objects in expanded trees
| * | address review feedbackliu fengyun2017-03-071-0/+1
| |/
* | Fix #2067: Compute defKind at Typer, not NamerMartin Odersky2017-03-081-17/+10
| | | | | | | | | | | | | | 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.
* | Don't set PureInterface when a default param is presentGuillaume Martres2017-03-081-5/+10
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix #2056: Backend crash when inlined method contains tryGuillaume Martres2017-03-071-2/+5
|/ | | | | | 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.
* Merge pull request #2015 from dotty-staging/add-pf-overloadingodersky2017-02-231-0/+2
|\ | | | | Add overloading support for case-closures
| * Extend argument pretyping to case-closuresMartin Odersky2017-02-211-0/+2
| |