aboutsummaryrefslogtreecommitdiff
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Document `IsInstanceOfEvaluator` using markdown style docstringsFelix Mulder2017-01-312-28/+37
|
* Add markdown parsing to dottydocFelix Mulder2017-01-311-0/+1
|
* Fix #1916 - fix erasure of xxl closuresMartin Odersky2017-01-311-1/+3
| | | | | xxl closures need to get the SAM type FunctionXXL as their explicit type field after ersure.
* Fix #1750: Handle illegal class overrides betterMartin Odersky2017-01-294-5/+31
| | | | | | | | | | | | | | | | | | Illegal class overrides are fundamentally at odds with the way dotty represents types and therefore can cause lots of low-level problems. Two measures in this commit First, we detect direct illegal class overrides on completion instead of during RefChecks. Break the override by making the previously overriding type private. This fixes i1750.scala, but still fails for indirect overrides between two unrelated outer traits/classes that are inherited by the same class or trait. We fix this by catching the previously thrown ClassCastException in both ExtractAPI and RefChecks. Test case for indirect overrides is in i1750a.scala.
* Merge pull request #1896 from dotty-staging/fix/bootstrapGuillaume Martres2017-01-2814-80/+67
|\ | | | | Add sbt-based bootstrap
| * sbt.ExtractDependencies: avoid false dependenciesGuillaume Martres2017-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Type#member might return a denotation that doesn't "really exists" (as defined by TypeAssigner#reallyExists), in some circumstance this denotation can refer to a symbol in a class that is in the classpath but that is not used by this file, so using addDependency on the result of Type#member might add a false dependency. We avoid this by using Type#select instead which will internally do the right thing. This issue was discovered while compiling the bootstrapped projects which would sometimes force a full recompilation for no reason.
| * Workaround #1895: Bringing a symbol to a new run is brokenGuillaume Martres2017-01-282-5/+14
| |
| * Workaroud #1856: recursively calling a lazy val works differently in DottyGuillaume Martres2017-01-282-2/+21
| |
| * Fix bug in partest.DPConsoleRunnerGuillaume Martres2017-01-281-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was that we declared case classes like: case class CompFailed() extends NegTestState but we used their companion objects like in: case _ => CompFailed Interestingly, this bug was caught by compiling this code with dotty, instead of `failureStates` getting inferred to be of type `AnyRef`, it ended up being a union of object types, this allows dotty to realize our subsequent pattern match on `failureStates` cannot possibly succeed: -- Error: /home/smarter/opt/dotty/compiler/test/dotty/partest/DPConsoleRunner.scala 353 | case CompFailedButWrongDiff() => | ^ | missing parameter type for parameter x$1 of expanded function x$1 => | x$1 @unchecked match | { | case CompFailedButWrongDiff() => | nextTestActionFailing(s"output differs") | true | case _ => | false | }, expected = ? -- Error: /home/smarter/opt/dotty/compiler/test/dotty/partest/DPConsoleRunner.scala 353 | case CompFailedButWrongDiff() => | ^^^^^^^^^^^^^^^^^^^^^^^^ |Pattern type CompFailedButWrongDiff is neither a subtype nor a supertype of selector type CompSucceeded | CompFailedButWrongNErr | CompFailed | CompFailedButWrongDiff'where: CompFailedButWrongDiff is a class in method runNegTest | CompFailedButWrongDiff' is a object in method runNegTest
| * Workaround #1770: Run changeOwner at group end in ElimByNameGuillaume Martres2017-01-281-1/+5
| | | | | | | | | | Using changeOwnerAfter would be more appropriate but currently fails with an assertion in LambdaLift
| * Fix some dotty compilation errorsGuillaume Martres2017-01-284-6/+12
| |
| * Use new sbt-based bootstrap for partest tooGuillaume Martres2017-01-271-40/+0
| | | | | | | | | | | | | | `partest` and `partest-only` are now run through `dotty-compiler-bootstrapped`. The old bootstrapping mechanism is deleted since it has been unmaintained and broken for several months and that I do not wish to maintain two bootstrapping mechanisms.
| * Do not hardcode jars path in the tests, instead get them from sbtGuillaume Martres2017-01-271-11/+9
| | | | | | | | | | This is necessary to run the tests with the bootstrapped projects and is just much better than hardcoding them anyway.
| * Remove hardcoded classpath reorderingGuillaume Martres2017-01-272-10/+1
| | | | | | | | | | | | If something needs to be fixed, fix it at the source. This prevented dotty-compiler-bootstrapped from using the dotty-library-bootstrapped clases instead of the dotty-library jar
* | Merge pull request #1909 from dotty-staging/fix-1687Dmitry Petrashko2017-01-281-34/+39
|\ \ | | | | | | Fix #1687: postpone computations in tailrec until they are needed.
| * | Fix #1687: postpone computations in tailrec until they are needed.Dmitry Petrashko2017-01-221-34/+39
| |/ | | | | | | | | | | | | | | | | Previous version precomputed everything needed to make the final decision. This was fast-path for method that will be tail-rec transformed. Unfortunatelly, in case decision was not to tail-rec optimize it could have led to exponential number of transformations. Now, the fast-path is for methods that will not.
* / Fix #1908: give synthetic default params correct flagsFelix Mulder2017-01-252-1/+52
|/
* Merge pull request #1904 from dotty-staging/fix-npe-implicitsodersky2017-01-161-8/+10
|\ | | | | Fix another NPE when compiling under -Yno-imports
| * Fix another NPE when compiling under -Yno-importsMartin Odersky2017-01-161-8/+10
| |
* | Merge pull request #1903 from dotty-staging/fix-npe-implicitsodersky2017-01-161-3/+11
|\| | | | | Fix NPE in Implicits
| * Fix NPE in ImplicitsMartin Odersky2017-01-161-3/+11
| | | | | | | | | | We got on NPE when compiling the collection strawman under -Yno-imports. We did not preview that the contextual implicit scope stack could be empty.
* | Merge pull request #1901 from dotty-staging/change-predef-importodersky2017-01-164-14/+23
|\| | | | | Adopt scala's scheme for root import hiding
| * Adopt scala's scheme for root import hidingMartin Odersky2017-01-154-14/+23
| | | | | | | | | | | | | | | | | | | | scalac hides a root import from Predef if there is an eplicit Predef import. We now do the same (previously we did this only if the overriding import undefined something, using a `x => _` syntax). To avoid cycles and races one had to be very careful not to force import symbols too early, so we now compare the name before the symbol proper. All this is likely temporary - the comment of ImportInfo#unimported points to a different, more systematic solution.
* | Merge pull request #1880 from dotty-staging/improve-whitelist-infrastructureodersky2017-01-124-685/+87
|\ \ | |/ |/| Improve whitelist infrastructure.
| * Add useExplicitWhiteList for debugging.Nicolas Stucki2017-01-111-1/+27
| |
| * Simplify blacklist paths.Nicolas Stucki2017-01-052-19/+22
| |
| * Remove whitelist and keep only blacklist.Nicolas Stucki2017-01-053-654/+8
| | | | | | | | | | | | Now that that the blacklist is fully know and is small enough, it will be simpler to maintain only the blacklist.
| * Add stdlib whitelist loader.Nicolas Stucki2017-01-052-22/+41
| |
* | Merge pull request #1883 from dotty-staging/fix-1877Dmitry Petrashko2017-01-114-6/+84
|\ \ | | | | | | Fix #1877: Add forwarders for primitive/generic mixins.
| * | Add PrimitiveForwarders and fix forwarding on value classes.Nicolas Stucki2017-01-114-15/+56
| | |
| * | Fix #1877: Add forwarders for primitive/generic mixins.Nicolas Stucki2017-01-062-6/+43
| | |
* | | Merge pull request #1690 from dotty-staging/benchDmitry Petrashko2017-01-111-1/+1
|\ \ \ | | | | | | | | Fix benchmarks and add multiple mini benchmark tests
| * | | fix benchmark testliu fengyun2016-11-241-1/+1
| | | |
* | | | Merge pull request #1894 from dotty-staging/fix/inner-class-emissionGuillaume Martres2017-01-111-1/+4
|\ \ \ \ | | | | | | | | | | Partially fix Java interop for emitted inner classes
| * | | | Partially fix Java interop for emitted inner classesGuillaume Martres2017-01-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The backend uses `rawname` to define the "inner name" of an InnerClass entry in a classfile, this should be the simple name of the class before any mangling takes place. Fixing this allows Java code to reference dotty inner classes, except if they're defined in objects which is still broken until https://github.com/DarkDimius/scala/pull/4 is merged and a new backend is published.
* | | | | Merge pull request #1893 from dotty-staging/fix-#1891odersky2017-01-112-2/+14
|\ \ \ \ \ | | | | | | | | | | | | Fix #1891: Don't add redundant constraint
| * | | | | Add more explanation.Martin Odersky2017-01-111-0/+3
| | | | | |
| * | | | | Fix #1891: Don't add redundant constraintMartin Odersky2017-01-102-2/+11
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before adding a constraint, make sure there is no way the two types are already in a subtype relation. Adding redundant constraints is problematic because we might introduce cycles. See i1891.scala for a test.
* | | | | Fix #1878: Use Inline on final vals.Nicolas Stucki2017-01-102-20/+27
| | | | |
* | | | | Stop emitting fields for inlined fields.Nicolas Stucki2017-01-101-1/+2
| | | | |
* | | | | Revert "Fix #1878: Generate fields for final vars."Nicolas Stucki2017-01-101-1/+1
|/ / / / | | | | | | | | | | | | This reverts commit 63d68bf4d3cbac82f6d9faf19acd5589603a17ee.
* | | | Merge pull request #1888 from dotty-staging/bump-version-011Guillaume Martres2017-01-082-4/+4
|\ \ \ \ | | | | | | | | | | Bump version from 0.1-SNAPSHOT to 0.1.1-SNAPSHOT
| * | | | Bump version from 0.1-SNAPSHOT to 0.1.1-SNAPSHOTGuillaume Martres2017-01-082-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for two reasons: - All published Scala versions are of the form a.b.c and some tooling expect that, like sbt CrossVersion API. - Using 0.1.1 instead of 0.1.0 means that we match the version number of dotty-sbt-bridge, this is simpler and means that in the future sbt could automatically choose the correct version of dotty-sbt-bridge so that the user does not need to specify scalaCompilerBridgeSource in his build.sbt Note: it's awful that we have hardcoded paths to jars and that I had to change them, but I won't fix that now.
* | | | | Improve error position and drop second error since it is prunedJonathan Brachthäuser2017-01-081-1/+1
| | | | |
* | | | | Give context for code examples to ease understandingJonathan Brachthäuser2017-01-081-9/+18
| | | | |
* | | | | Replace all occurrences of Id, ident or Ident with idJonathan Brachthäuser2017-01-081-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To match the specs in https://github.com/lampepfl/dotty/blob/master/docs/syntax-summary.txt all occurences of Id, ident or Ident in comments have been replaced with the terminal `id`.
* | | | | Add error message for dangling this in path selectionsJonathan Brachthäuser2017-01-082-1/+28
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following examples trigger the error message: val x: Foo.this = ??? // Also triggers the error: import foo.this // Additionally, also slays the compiler type X = Foo.this.type
* | | | Merge pull request #1887 from dotty-staging/fix-#1867Guillaume Martres2017-01-071-1/+1
|\ \ \ \ | |_|/ / |/| | | Fix #1867: Set position of empty refined types
| * | | Fix #1867: Set position of empty refined typesMartin Odersky2017-01-041-1/+1
| | | |
* | | | Merge pull request #1873 from dotty-staging/fix-#1865odersky2017-01-051-1/+2
|\ \ \ \ | | | | | | | | | | Fix #1865: Compute outer path at right phase