aboutsummaryrefslogtreecommitdiff
path: root/compiler/src
Commit message (Collapse)AuthorAgeFilesLines
* Comment FlexTypeMartin Odersky2016-12-171-0/+3
|
* Make errors are not swept under the carpetMartin Odersky2016-12-1718-55/+78
| | | | | | | | | 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 #1763 from dotty-staging/fix/annotationsDmitry Petrashko2016-12-163-22/+41
|\ | | | | Fix emission of annotations
| * Fix #1741: sbt.ExtractAPI: extract annotationsGuillaume Martres2016-12-021-6/+24
| | | | | | | | | | | | | | | | | | This is necessary for correct incremental recompilation but is also used by sbt to find tests to run (for junit they should be annotated @org.junit.Test). I added an sbt scripted test to verify that JUnit now works, to run it: $ sbt > scripted discovery/test-discovery
| * Fix transformation of inline body annotationsGuillaume Martres2016-11-301-3/+7
| | | | | | | | | | Previously we replaced them by ConcreteAnnotation so they became regular annotations and could be emitted in some cases. They need to keep being BodyAnnotation.
| * Fix visibility of annotationsGuillaume Martres2016-11-301-11/+9
| | | | | | | | | | | | `isRuntimeVisible` and `retentionPolicyOf` had two different ways to get the retention policy of an annotation and they were both wrong. Fix retentionPolicyOf` and use it in `isRuntimeVisible`
| * Fix annotations never being emittedGuillaume Martres2016-11-301-2/+1
| |
* | Merge pull request #1813 from dotty-staging/fix-#1806Dmitry Petrashko2016-12-162-1/+5
|\ \ | | | | | | Fix #1806: Define outer accessors at the right phase
| * | Fix #1806: Define outer accessors at the right phaseMartin Odersky2016-12-162-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some outer accessors were defined at phase explicitOuter, but were entered into the scope of their enclosing class only at phase explicitOuter + 1. This turned them to stale symbols when trying to access them at a later run, because at their initially valid phase they were not found as members of their owner.
* | | Merge pull request #1801 from dotty-staging/fix-#1790Dmitry Petrashko2016-12-165-56/+92
|\| | | | | | | | Fix #1790: Change by-name pattern matching.
| * | Implement new rules for name-based pattern matchingMartin Odersky2016-12-155-26/+42
| | | | | | | | | | | | This implements the rules laid down in #1805.
| * | Change by-name pattern matching.Martin Odersky2016-12-143-53/+73
| | | | | | | | | | | | New implementation following the scheme outlined in #1790.
* | | Merge pull request #1785 from dotty-staging/fix-#1784odersky2016-12-1514-22/+33
|\ \ \ | | | | | | | | Fix #1784: allow to omit types for local implicit vals
| * | | Add CyclicImplicitVal error to messages (reverted from commit ↵Martin Odersky2016-12-152-13/+4
| | | | | | | | | | | | | | | | 559e49317912ce52c51e295346cebcafbb69462d)
| * | | Add CyclicImplicitVal error to messagesFelix Mulder2016-12-132-4/+13
| | | |
| * | | Drop "Dotty deviation" messages that are no longer applicable.Martin Odersky2016-12-123-3/+3
| | | |
| * | | Better diagnosis for cyclic references caused by implicit searchMartin Odersky2016-12-122-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we now allow to drop the explicit type of a local implicit val it can happen that this causes a cyclic reference, namely when the typechecking of the right-hand side involves an implicit search. It's unpractical and fragile to avoid this. Instead we give now a nice error message explaining the problem and how to fix it in source code.
| * | | Drop explicit types for local implicit valsMartin Odersky2016-12-1212-17/+17
| | | | | | | | | | | | | | | | | | | | Drop explicit types for local implicit vals of type Context and Position. Exercises the functionality and shortens the code.
| * | | Fix #1784: allow to omit types for local implicit valsMartin Odersky2016-12-121-3/+9
| | | |
* | | | Merge pull request #1682 from dotty-staging/vclassodersky2016-12-157-48/+65
|\ \ \ \ | | | | | | | | | | Fix checks related to value classes
| * | | | renable checking for TreeCheckerliu fengyun2016-11-241-1/+4
| | | | |
| * | | | don't recheck in -Ycheckliu fengyun2016-11-244-42/+48
| | | | |
| * | | | fix #1642: disallow value classe wrapping value classliu fengyun2016-11-245-12/+16
| | | | |
| * | | | fix #1670: move the check of value class to typerliu fengyun2016-11-242-2/+6
| | | | |
* | | | | Merge pull request #1780 from dotty-staging/fix-i1779odersky2016-12-152-6/+10
|\ \ \ \ \ | |_|_|/ / |/| | | | fix #1779: support $_ and $_id in interpolated string
| * | | | only allow $_ in patternsliu fengyun2016-12-121-6/+6
| | | | |
| * | | | fix #1779: support $_ and $_id in interpolated stringliu fengyun2016-12-082-1/+5
| | | | |
* | | | | Merge pull request #1761 from dotty-staging/topic/product-showFelix Mulder2016-12-141-3/+32
|\ \ \ \ \ | | | | | | | | | | | | [REPL] Add show capability to common types
| * | | | | Add comment regarding prettificationFelix Mulder2016-12-011-0/+17
| | | | | |
| * | | | | Fix literal type printingFelix Mulder2016-12-011-0/+3
| | | | | |
| * | | | | Get rid of nesting implicitsFelix Mulder2016-11-301-12/+1
| | | | | |
| * | | | | Print List and Map abbreviatedFelix Mulder2016-11-301-1/+8
| | | | | |
| * | | | | Make repl use show instances where possibleFelix Mulder2016-11-301-2/+15
| | | | | |
* | | | | | Fix #1786: support use package object in fun callliu fengyun2016-12-131-1/+1
| | | | | |
* | | | | | Merge pull request #1781 from dotty-staging/fix-#1776Dmitry Petrashko2016-12-121-1/+3
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | Fix #1776: Avoid interaction between parameter forwarding and elimByName
| * | | | | Fix #1776: Avoid interaction between parameter forwarding and elimByNameMartin Odersky2016-12-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parameter forwarding is not geared to handle parameters of by-name types correctly and consequently elimByName generates wrong code. Since it's a corner case it's easiest by not applying the parameter forwarding optimization to by-name parameters.
* | | | | | Merge pull request #1764 from dotty-staging/fix-#1757odersky2016-12-105-14/+46
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix #1757: Be more careful about positions of type variable binders
| * | | | | | Add explanationMartin Odersky2016-12-021-0/+22
| | | | | | |
| * | | | | | Fix #1757: Be more careful about positions of type variable bindersMartin Odersky2016-12-015-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We interpolate a type variable if the current tree contains the type variables binding tree. Previously, this was the application owning the variable. However, sometimes this tree is transformed so that the containment test fails, and type variables are instantiated too late (in the case of #1757 this was never). We fix this by - setting the binding tree to the type tree that first contains the type variable - making sure that tree is never copied literally anywhere else. It's a tricky dance, but I believe we got it right now.
* | | | | | | Merge pull request #1766 from dotty-staging/fix-#1756odersky2016-12-102-3/+3
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | Fix #1756: Use lexically enclosing class as start of outer path.
| * | | | | | Fix-1756: Use lexically enclosing class as start of outer path.Martin Odersky2016-12-022-3/+3
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We confused the enclosing class (which skips the current class in super call contexts) and the lexically enclosing class in three locations that all had to do with the start of an outer path.
* | | | | | Merge pull request #1768 from dotty-staging/fix-#1765odersky2016-12-104-12/+35
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix #1765: Context bounds and denotation handling
| * | | | | | Fix insertAfterMartin Odersky2016-12-021-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once the context-bounds desugaring of i1765.scala was fixed, another problem came up: We hit an invalid denotation due to some interaction between mixin and memoize. It turned out that `insertInsteadOf` did not do what its doc comment claimed: it did not store a forwarding pointer `nextInRun` in the overwritten denotation. Once that was fixed we also needed to fix a follow-on erorr that now we could have chains of invalid denotations linked by `nextInRun`.
| * | | | | | Fine-tune post-conditions.Martin Odersky2016-12-021-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous post-condition failed if a Ycheck was introduced between memoize and constructors.
| * | | | | | 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.
| * | | | | | Go to 7 bits for phase numbersMartin Odersky2016-12-021-1/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | We were pushing the limit of 64 phases before.
* | | | | | Merge pull request #1769 from dotty-staging/fix-#1751odersky2016-12-101-0/+3
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Fix #1751: Make dominator work after erasure
| * | | | | Fix #1751: Make dominator work after erasureMartin Odersky2016-12-021-0/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | i1751.scala shows a case where we need to compute the approximation of an or-type during erasure. This can lead to an empty set of common classes because Any does not exist anymore after erasure.
* | | | | Merge pull request #1778 from dotty-staging/fix-i1773liu fengyun2016-12-081-0/+6
|\ \ \ \ \ | | | | | | | | | | | | Fix #1773: handle patterns in interpolated string
| * | | | | fix #1773: handle patterns in interpolated stringliu fengyun2016-12-081-0/+6
| | | | | |