aboutsummaryrefslogtreecommitdiff
path: root/compiler/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix #2054: @Static methods may access synthetic private methods stuffDmitry Petrashko2017-03-072-2/+5
| | | | | | Due to way how we desugar lambdas, we can decide to make a lambda static Static methods could refer to those lambdas and we need to make them public
* 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.
| * | | | | | TreeUnpickler: do not capture Context in Annotation symbolGuillaume Martres2017-02-182-5/+13
| | | | | | |
| * | | | | | TreeUnpickler: do not capture Context in Annotation treeGuillaume Martres2017-02-181-1/+1
| | | | | | |
| * | | | | | TreeUnpickler: Avoid capturing context in lazyStatsGuillaume Martres2017-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `lazyStats` creates a lazy tree using `readLater`, but the closure inside `readLater` calls `mergeTypeParamsAndAliases` which until this commit implicitly used the Context from the outer method `readTemplate`, this lead to crashes in the Language Server.