aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Simplify widenToParentsMartin Odersky2016-03-301-4/+5
| | | | No need to form the glb.
* Adapt type assignment for AppliedTypeTrees to new named paramsMartin Odersky2016-03-301-6/+4
|
* Test casesMartin Odersky2016-03-302-2/+52
|
* Don't lambda expand and/or types over named type parametersMartin Odersky2016-03-301-2/+16
| | | | | Do it only if at least one of the types has unnamed parameters. This is a fundamental conflict with how we deal with intersections and unions.
* Take named type parameters into account when instantiating variables.Martin Odersky2016-03-301-1/+5
| | | | | | When instantiating a type variable, make the instance has the same named type parameters as the upper bound. This is the analogue of kind-correctness for named type parameters.
* Add methods for expressing named type paramsMartin Odersky2016-03-302-0/+75
| | | | | Add methods for expressing what the named type parameters of a class or type are. Also, add a method that widens a type so that is has a specified set of named type parameters.
* Fix bug in printing New nodesMartin Odersky2016-03-301-1/+1
| | | | Explicitly given type parameters were printed twice.
* Fix test case.Martin Odersky2016-03-301-4/+4
| | | | The intent is that Repr implementations should not bind the Out parameter.
* Fix error message output.Martin Odersky2016-03-301-1/+1
| | | | Type was printed in raw form.
* Fix type-shifting problem in vcInlineMethodsMartin Odersky2016-03-301-1/+1
| | | | | | | vcInlineMethods could produce a different type on rewire which led to a -Ycheck failure. We now insert a cast when that happens. Test case: pos/flowops1.scala with -Ycheck:vcInline.
* Add test for #1181 to pendingMartin Odersky2016-03-301-0/+12
|
* Simplify and fix avoid logicMartin Odersky2016-03-303-27/+43
| | | | | The previous formulation broke for named parameters. Test case in flowops1.scala.
* Fixes to checkNonCyclicMartin Odersky2016-03-302-20/+49
| | | | | | | | | Simplified logic and now check prefixes of TypeRefs. Without the simplified logic we would get false cyclic errors for ski.scala. Test case: flowops.scala Fixes #1185.
* Merge pull request #1104 from dotty-staging/spec-bugsDmitry Petrashko2016-03-245-8/+40
|\ | | | | Improvements & bugs that were discovered while implementing specialization.
| * Add a test that checks that no useless forwarders are being created.Dmitry Petrashko2016-03-151-0/+17
| |
| * Mixin: create less forwarders.Dmitry Petrashko2016-03-151-4/+14
| | | | | | | | | | | | | | | | There were two sources of inefficiency in previous scheme: - if symbol was no overriding anything the forwarder was still being created - the class that is will have the forwarder was not considered. Many methods do not require forwarders as JVM will dispatch correctly.
| * Change name of DropEmptyCompanions from dropEmpty to dropEmptyCompanionsDmitry Petrashko2016-03-151-1/+1
| | | | | | | | | | dropEmpty is not as clear, as it does not indicate what it drops. Additionally makes phaseName by in sync with class name.
| * Memoize: perform required tree adaptation in setter.Dmitry Petrashko2016-03-151-2/+7
| | | | | | | | Otherwise can create trees that do not pas Ycheck.
| * Erasure: no need to bridge paramaccessors.Dmitry Petrashko2016-03-151-1/+1
| | | | | | | | Just like normal accessors.
* | Merge pull request #1180 from niktrop/dotc-settings-formatDmitry Petrashko2016-03-221-4/+6
|\ \ | | | | | | dotc settings: String options after settings with colon shouldn't be ignored
| * | String options with choices should be followed by colon and argument without ↵Nikolay.Tropin2016-03-181-4/+6
| | | | | | | | | | | | | | | | | | whitespace Format of some of the compiler settings was incompatible with scalac. For example "-target:jvm-1.8" is a valid argument for scalac, but it should be "-target: jvm-1.8" (with a whitespace) for dotc.
* | | Merge pull request #1184 from liufengyun/error-posodersky2016-03-222-2/+6
|\ \ \ | | | | | | | | better positioning of `_*` not last argument error
| * | | better positioning of `_*` not last argument errorliu fengyun2016-03-182-2/+6
| | | | | | | | | | | | | | | | | | | | The error should be at the beginning of the underscore `_`, not the next token after the star `*`, which is the default.
* | | | Merge pull request #1187 from dotty-staging/fix-#1174Guillaume Martres2016-03-222-5/+34
|\ \ \ \ | | | | | | | | | | Fix problem involving classtag based pattern matches.
| * | | | Fix problem involving classtag based pattern matches.Martin Odersky2016-03-212-5/+34
|/ / / / | | | | | | | | | | | | | | | | | | | | Rewriting did not go far enough, as evidenced by pos/i1174.scala Fixes #1174
* | | | Merge pull request #1179 from liufengyun/fix-issue-1059odersky2016-03-183-5/+54
|\ \ \ \ | |/ / / |/| | | support `xs @ _*` and `_*` in Scala2 mode
| * | | support `xs @ _*` and `_*` in Scala2 modeliu fengyun2016-03-183-5/+54
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The standard syntax in Dotty now is `xs : _*`. In Scala2 mode, following code should be valid: list match { case List(_, _, _, _ @ _*) => 0 case List(_, _, _*) => 1 case List(_, _: _*) => 2 case Nil => 3 }
* | | Merge pull request #1183 from sjrd/scalajs-0.6.8Dmitry Petrashko2016-03-182-18/+5
|\ \ \ | | | | | | | | Upgrade to Scala.js 0.6.8.
| * | | Upgrade to Scala.js 0.6.8.Sébastien Doeraene2016-03-182-18/+5
|/ / / | | | | | | | | | | | | | | | This allows to remove the ugly workaround for default methods. There is also a slight adaptation for the new way to encode a reference to the JS global scope in the IR.
* | | Merge pull request #1176 from liufengyun/masterDmitry Petrashko2016-03-181-2/+2
|\ \ \ | | | | | | | | fix command line processing error
| * | | fix command line processing errorliu fengyun2016-03-151-2/+2
| | |/ | |/|
* | | Merge pull request #1166 from dotty-staging/fix-#1136odersky2016-03-1820-61/+80
|\ \ \ | | | | | | | | Fix typing of SeqLiterals
| * | | Fix test casesMartin Odersky2016-03-112-2/+2
| | | | | | | | | | | | | | | | The test contained an error that was unvovered by the "Nothing is not Nullable" fix.
| * | | Add second field to SeqLiteralMartin Odersky2016-03-1017-57/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The field keeps track of the element type. This is necessary because JavaSeqLiteral is nonvariant and the elements might be empty, so we cannot always compute the type from the element types.
| * | | Nothing is not nullableMartin Odersky2016-03-101-1/+1
| | | |
| * | | More info when resolveOverloading failsMartin Odersky2016-03-101-1/+1
| | | |
* | | | Merge pull request #1160 from dotty-staging/add/collection-strawmanodersky2016-03-186-6/+601
|\ \ \ \ | | | | | | | | | | Add/collection strawman
| * | | | Refine pretypeArgsMartin Odersky2016-03-093-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | It worked more or less by accident before. Now it's more complicated, but we also have tests.
| * | | | Make use of better overload resolution in collections strawman testMartin Odersky2016-03-091-2/+2
| | | | |
| * | | | Pretype functional arguments when doing overload resolutionMartin Odersky2016-03-093-2/+51
| | | | |
| * | | | New collection strawmanMartin Odersky2016-03-092-2/+488
| | | | | | | | | | | | | | | | | | | | Centered around views instead of iterators.
* | | | | Merge pull request #1148 from sjrd/scalajs-gen-exprsodersky2016-03-1811-90/+1502
|\ \ \ \ \ | | | | | | | | | | | | Implement most of the Scala.js IR code generator.
| * | | | | More documentation for some Scala.js-specific methods.Sébastien Doeraene2016-03-163-4/+33
| | | | | |
| * | | | | Cache the Phases we need in JSCodeGen like all other phases.Sébastien Doeraene2016-03-162-8/+7
| | | | | |
| * | | | | Implement most of use-site JavaScript interop.Sébastien Doeraene2016-03-102-16/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable things that are not yet implemented: * JS exports * Scala.js-defined JS classes.
| * | | | | Implement most of the Scala.js IR code generator.Sébastien Doeraene2016-03-107-75/+1030
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notable things that are missing at this point: * Pattern matching * Try * Most of the JavaScript interop
| * | | | | Move the logic of ExpandSAMs.isJvmSam to Platform.isSam.Sébastien Doeraene2016-03-073-8/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whether a language SAM type is also a valid SAM type for the back-end is a platform-specific thing. On Scala.js, for example, the rules are completely different than for the JVM. This commit therefore moves the logic of the predicate used by ExpandSAMs to decide whether to expand a SAM as an anonymous class to the Platform.
* | | | | | Merge pull request #1154 from dotty-staging/add-rewriteodersky2016-03-1824-84/+433
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | First steps towards rewriting from Scala2 in dotty
| * | | | | Address reviewer comments.Martin Odersky2016-03-148-40/+46
| | | | | |
| * | | | | Fix two rewrite patches.Martin Odersky2016-03-123-14/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. trailing `_`: `x _` is rewritten to `(() => x)` not to `x` 2. lazy vals: Rewrites are done in Typer, not LazyVals. Later on we are too much at risk to hit synthetically generated lazy vals.