aboutsummaryrefslogtreecommitdiff
path: root/compiler/src
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge pull request #2061 from dotty-staging/fix/overcompilation-apiGuillaume Martres2017-03-071-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Fix incremental overcompilation due to instabilities
| * | | | | Fix incremental overcompilation due to instabilitiesGuillaume Martres2017-03-071-2/+2
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output of ExtractAPI should be stable, otherwise sbt might incorrectly conclude that some API changed because its hash is different, even though the source hasn't changed. This commit fixes two cases where this might happen: - package prefixes in NamedTypes are unstable, we already worked around this by normalizing them, but only for classes, we now always do it. - We use a simplified representation for `_ >: Nothing <: Any`, this is now checked using `isDirectRef` instead of referential equality on types since there is more than one way to represent `Nothing` and `Any`. Both of these issues were found while compiling dotty with `dotty-compiler-bootstrapped/compile` and making small changes.
* | | | | Merge pull request #2059 from dotty-staging/fix/inline-EmptyTreeodersky2017-03-071-2/+5
|\ \ \ \ \ | |/ / / / |/| | | | Fix #2056: Backend crash when inlined method contains try
| * | | | 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 #2053 from niktrop/splitOnCharFelix Mulder2017-03-061-1/+3
|\ \ \ \ \ | | | | | | | | | | | | fixed PatternSyntaxException on Windows
| * | | | | fixed PatternSyntaxException on WindowsNikolay.Tropin2017-03-061-1/+3
| | |_|/ / | |/| | |
* | | | | FixesMartin Odersky2017-03-052-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | (1) Drop unused error message (2) Drop test which is now illegal
* | | | | Drop named type parameters in classesMartin Odersky2017-03-0412-223/+42
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the [type T] syntax, and what's associated to make it work. Motivation: It's an alternative way of doing things for which there seems to be little need. The implementation was provisional and bitrotted during the various iterations to introduce higher-kinded types. So in the end the complxity-cost for language and compiler was not worth the added benefit that [type T] parameters provide. Noe that we still accept _named arguments_ [A = T] in expressions; these are useful for specifying some parameters and letting others be inferred.
* | | | Merge pull request #2039 from dotty-staging/add-refined-assertNicolas Stucki2017-03-031-0/+3
|\ \ \ \ | | | | | | | | | | Add assert that refine infos are legal wrt refined names
| * | | | Add assert that refine infos are legal wrt refined namesMartin Odersky2017-02-271-0/+3
| | | | |
* | | | | Merge pull request #2031 from dotty-staging/fix-#2030odersky2017-03-033-2/+3
|\ \ \ \ \ | | | | | | | | | | | | Fix #2030: Don't chain implicit conversions
| * | | | | Don't chain implicit conversionsMartin Odersky2017-02-273-2/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When inferring a view, we are not allowed to use another implicit conversion to adapt its result. Fixing this revealed another problem where we have to re-enable implicit conversions when pre-typing arguments in overloading resolution.
* | / / / Allow abstract type members in objects.Nicolas Stucki2017-03-011-1/+1
| |/ / / |/| | |
* | | | Merge pull request #2042 from dotty-staging/matsuriFelix Mulder2017-03-013-17/+54
|\ \ \ \ | | | | | | | | | | Last changes before presentation at Matsuri
| * | | | Message rendering: colorize positional splice, then splitFelix Mulder2017-03-013-17/+54
| | | | |
* | | | | Merge pull request #2028 from ennru/ennru_AnnotatedPrimaryConstructorRequiresFelix Mulder2017-03-013-3/+19
|\ \ \ \ \ | |_|_|_|/ |/| | | | Change 'private, protected, or this expected' to Message
| * | | | Better location to indicate the errorEnno Runne2017-02-271-1/+1
| | | | |
| * | | | Change 'private, protected, or this expected' to MessageEnno Runne2017-02-233-3/+19
| | | | |
* | | | | Merge pull request #2035 from dotty-staging/fix-#2033Guillaume Martres2017-02-281-1/+10
|\ \ \ \ \ | | | | | | | | | | | | Fix #2033: Improve handling of unresolved overloaded arguments
| * | | | | Fix #2033: Improve handling of unresolved overloaded argumentsMartin Odersky2017-02-271-1/+10
| | |_|/ / | |/| | |
* / | | | Remove wrapArrayMethodName from defn.Nicolas Stucki2017-02-271-7/+0
|/ / / / | | | | | | | | | | | | Note that it is never used and the same method exists in transform.TreeGen
* | | | Merge pull request #1993 from dotty-staging/add-lazy-implicitsodersky2017-02-255-9/+50
|\ \ \ \ | | | | | | | | | | Treat implicit by-name arguments as lazy values
| * | | | Fix typosMartin Odersky2017-02-211-3/+3
| | | | |
| * | | | PolishingMartin Odersky2017-02-181-5/+2
| | | | |
| * | | | Treat implicit by-name arguments as lazy valuesMartin Odersky2017-02-175-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous rules, the two test cases produce a diverging implicit expansion. We avoid this by creating for every implicit by-name argument of type T a lazy implicit value of the same type. The implicit value is visible for all nested implicit searches of by-name arguments. That way, we tie the knot and obtain a recursive lazy value instead of a diverging expansion.
* | | | | Merge pull request #2017 from dotty-staging/refchecks-less-slowodersky2017-02-251-2/+8
|\ \ \ \ \ | |_|_|_|/ |/| | | | Make resolveSuper less slow
| * | | | ResolveSuper: MixinOps save 2-3 seconds on stdlib compilation.Dmitry Petrashko2017-02-211-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | By ordering tests in a smarter way. Add leave a big scary comment.
* | | | | Merge pull request #2026 from dotty-staging/fix-#2001odersky2017-02-241-15/+8
|\ \ \ \ \ | |_|_|/ / |/| | | | Better error messages for missing type of recursive definitions
| * | | | Fix indentationMartin Odersky2017-02-231-4/+4
| | | | |
| * | | | Better error messages for missing type of recursive definitionsMartin Odersky2017-02-231-11/+4
| | |_|/ | |/| |
* | | | Merge pull request #2015 from dotty-staging/add-pf-overloadingodersky2017-02-232-27/+29
|\ \ \ \ | |/ / / |/| | | Add overloading support for case-closures
| * | | Drop stray printlnMartin Odersky2017-02-211-1/+1
| | | |
| * | | Extend argument pretyping to case-closuresMartin Odersky2017-02-212-32/+27
| | | |
| * | | Add overloading support for case-closuresMartin Odersky2017-02-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | case-closures (which are represented as Match nodes) have a known arity just like other function literals. So shape analysis for overloading resolution should apply to them as well.
* | | | Merge pull request #2012 from ennru/ennru_CantInstantiateAbstractFelix Mulder2017-02-223-2/+24
|\ \ \ \ | | | | | | | | | | Change 'is abstract; cannot be instantiated' to Message
| * | | | Added explanation for CantInstatiateAbstractClassOrTraitEnno Runne2017-02-221-1/+12
| | | | |
| * | | | Change 'is abstract; cannot be instantiated' to MessageEnno Runne2017-02-203-2/+13
| | | | |
* | | | | Merge pull request #2021 from dotty-staging/fix-#2020Guillaume Martres2017-02-221-1/+7
|\ \ \ \ \ | | | | | | | | | | | | Fix #2020: Only the first parameters of a case class are caseaccessors
| * | | | | 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 #2009: Fix placeholder params logic for lambdas (#2019)odersky2017-02-221-7/+9
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix #2009: Fix placeholder params logic for lambdas Logic was missing placeholders in rhs of lambdas. * Add comment * Fix typo
* | | | | Merge pull request #2014 from dotty-staging/fix-#2002odersky2017-02-221-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix #2000: Make implicit and non-implicit functions incomparable
| * | | | | Fix #2000: Make implicit and non-implicit functions incomparable with <:<Martin Odersky2017-02-211-1/+1
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit and non-implicit functions are incomparable with <:<, but are treated as equivalent with `matches`. This means implicit and non-implicit functions of the same types override each other, but RefChecks will give an error because their types are not subtypes. Also contains a test for #2002.
* | | | | Merge pull request #1997 from dotty-staging/fix-#1992odersky2017-02-222-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Fix off-by-one error in forward reference checking
| * | | | | Fix off-by-one error in forward reference checkingMartin Odersky2017-02-182-2/+2
| | | | | |
* | | | | | Merge pull request #1974 from dotty-staging/fix/ctx-captureodersky2017-02-2113-59/+87
|\ \ \ \ \ \ | | | | | | | | | | | | | | Avoid accidental captures of Context
| * | | | | | TempClassInfo#addSuspension: do not capture ContextGuillaume Martres2017-02-202-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This capture did not cause any problem since we always called TempClassInfo#finalize with the same Context than we captured in `addSuspension`, but it's better to be explicit about these things.
| * | | | | | adjustModuleCompleter: Avoid capturing ContextGuillaume Martres2017-02-201-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we computed the scope in `findModuleBuddy` using `this.effectiveScope`, this means that we captured `this` which has a self-type of `Context`, replacing it by `ctx.effectiveScope` would be wrong since we are interested in the scope at the time `adjustModuleCompleter` was called, not the scope at the time the completer is called. Therefore, we have to eagerly compute `this.effectiveScope` so that we don't capture the Context but can use the right scope in `findModuleBuddy`. We also move `findModuleBuddy` to a companion object to avoid accidental captures of `this`. This capture lead to crashes in the IDE.
| * | | | | | Annotation#deferredSymAndTree: make sure symbol is valid in current runGuillaume Martres2017-02-191-1/+1
| | | | | | |
| * | | | | | ImportInfo: removed ctx parameter from constructorGuillaume Martres2017-02-194-19/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ImportInfo#toString required the ctx parameter,so it was replaced by ImportInfo#toText.
| * | | | | | ClassfileParser: avoid looking up inner class in wrong phaseGuillaume Martres2017-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getMember needs to take an implicit `Context` parameter, otherwise the following code: val result = ctx.atPhaseNotLaterThan(ctx.typerPhase) { implicit ctx => getMember(owner, innerName.toTypeName) } will not run getMember at the typer phase.