aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/ast
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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.
* Merge pull request #1996 from dotty-staging/fix-#1990odersky2017-02-211-1/+1
|\ | | | | Fix #1990: Handle inlining where this proxies change types
| * Harden outer proxy computation of inlined codeMartin Odersky2017-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | It turns out that we simply cannot do reliable outer path computation that fills in the right hand sides of this-proxies from the types of these proxies. As-seen-from logic can mangle the types of proxies enough to scramble the necessary information. What we now do instead is simply count: We record the number of outer accesses to an outer this in inlineable code, and do the same number of outer accesses when computing the proxy.
* | Merge pull request #1972 from dotty-staging/fix/inline-errorsodersky2017-02-182-6/+10
|\ \ | |/ |/| TreeMap/TreeAccumulator: proper context for inlined trees
| * TreeMap/TreeAccumulator: proper context for inlined treesGuillaume Martres2017-02-132-6/+10
| | | | | | | | | | | | This was already be done in TreeTraverser but should also be done in TreeMap and TreeAccumulator for ctx.error(..., tree.pos) to not use completely incorrect positions inside inlined trees.
* | 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.
* Merge pull request #1931 from dotty-staging/fix-#1501Guillaume Martres2017-02-131-1/+1
|\ | | | | Fix #1501 - Check trait inheritance condition
| * Refine AnonClass generationMartin Odersky2017-02-081-1/+1
| | | | | | | | | | | | | | | | | | The leading class should be the superclass of the first trait (which is not always Object). We could think of a more refined condition, (i.e. taking the least common superclass of all extended traits), but I think it's not worth it, as one can always spell out the right superclass manually.
* | fix #1484: position of while incorrect in debugliu fengyun2017-02-101-2/+2
| |
* | Merge pull request #1941 from dotty-staging/fix/infix-posodersky2017-02-083-22/+29
|\ \ | | | | | | Better positions for infix operations
| * | 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-053-22/+27
| |/ | | | | | | | | | | | | | | 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.
* | Merge pull request #1943 from dotty-staging/fix/lambda-positionodersky2017-02-081-0/+2
|\ \ | | | | | | Positioned#initialPos: Union the position of every children
| * | Positioned#initialPos: Union the position of every childrenGuillaume Martres2017-02-051-0/+2
| |/ | | | | | | | | | | Previously we missed some children, one consequence of this is that the position of the typed tree corresponding to the lambda "z => 1" did not contain the position of "z".
* / Trees#namePos: Correct position for objectsGuillaume Martres2017-02-061-2/+2
|/
* Fix #1568 - avoid transforming error treesMartin Odersky2017-02-022-87/+94
| | | | | If a tree has type error, subtrees may not have an assigned type. Therefore we should avoid transforming such trees.
* Merge pull request #1881 from dotty-staging/add-structural-selectodersky2017-02-011-0/+22
|\ | | | | Implement structural type member access
| * Generalize test whether access is to a refinementMartin Odersky2017-01-281-1/+1
| | | | | | | | | | | | A previous type comparison was wrong because it did not map refined-this types. I believe it was also redundant, so the easiest fix is to drop it.
| * Implement structural type member accessMartin Odersky2017-01-051-0/+22
| | | | | | | | New scheme for implementing structural type member access.
* | fix incorrect flatten of thicket inside interpolated string in UntpdTreeMapliu fengyun2017-01-301-1/+1
| |
* | 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-185-12/+41
|\ | | | | Add implicit function types
| * Fix rebase breakageMartin Odersky2016-12-171-1/+1
| |
| * Fix toString in ImplicitFunction treeMartin Odersky2016-12-171-1/+1
| |
| * Ref copier that works for Idents and SelectsMartin Odersky2016-12-172-1/+7
| | | | | | | | | | The Ref copier copies Idents and Selects, changing the name of either.
| * Create implicit closures to math expected implicit functionsMartin Odersky2016-12-173-12/+29
| | | | | | | | | | When the expected type is an implicit function, create an implicit closure to match it.
| * Cleanup of implicit modifiers schemeMartin Odersky2016-12-171-1/+1
| | | | | | | | | | Implicit modifiers were quite irregular compared to the other ones. This commit does a cleanup.
| * Refactor function operations in DefinitionsMartin Odersky2016-12-171-1/+3
| | | | | | | | | | | | | | | | | | Also: show implicit function types correctly. Also: refine applications of implicit funcitons - don't do it for closure trees - don't do it after typer.
| * Add syntax for implicit functionsMartin Odersky2016-12-171-0/+4
| |
* | Merge pull request #1817 from dotty-staging/fix-#1802odersky2016-12-181-1/+1
|\ \ | | | | | | Fix #1802: Make sure errors are not swept under the carpet
| * | Make errors are not swept under the carpetMartin Odersky2016-12-171-1/+1
| |/ | | | | | | | | | | | | | | | | Typer#ensureReported's comment outlines an example where errors could go unreported, resulting in error trees after typer without any reported error messages. This commit makes sure that at least one error is reported if a tree node has an error type. Fixes #1802.
* | 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.
* | Merge pull request #1801 from dotty-staging/fix-#1790Dmitry Petrashko2016-12-161-3/+1
|\ \ | |/ |/| Fix #1790: Change by-name pattern matching.
| * Implement new rules for name-based pattern matchingMartin Odersky2016-12-151-3/+1
| | | | | | | | This implements the rules laid down in #1805.
* | Drop explicit types for local implicit valsMartin Odersky2016-12-121-4/+4
|/ | | | | Drop explicit types for local implicit vals of type Context and Position. Exercises the functionality and shortens the code.
* 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
|/
* Clean up importsMartin Odersky2016-12-011-1/+1
| | | | | Honor the new scheme where any explicit import of a root import will disable the root import.
* fix #1748: desugaring with StringContext in PatDefliu fengyun2016-11-271-0/+2
|
* TypedTreeCopier#Select: don't use unstable prefixesGuillaume Martres2016-11-221-1/+1
| | | | | | | | | This manifested itself as a pickling difference in tasty_tools Note that there are probably more issues in this method, in particular the old type is reused when `qualifier.tpe eq tree.qualifier.tpe` even if the `name` is different. But I'm only trying to get the tests to pass for now.
* 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-2210-0/+5476