aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/sbt
Commit message (Collapse)AuthorAgeFilesLines
* Fix #1750: Handle illegal class overrides betterMartin Odersky2017-01-291-1/+11
| | | | | | | | | | | | | | | | | | 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.
* 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.
* 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
* ExtractDependencies: correctly record inheritance on type aliasGuillaume Martres2016-11-221-1/+1
| | | | | | | | | | | | This fix the test "Extracted source dependencies from public members" which previously failed with: Set('G, 'E) is not equal to Set('B, 'E) (DependencySpecification.scala:34) `H` extends `G.T[Int]` which is an alias of `B`, so the `topLevelInheritanceDepndencies` of `H` should contain `B`, this was not the case before because we didn't dealias before looking for the top-level class of the dependency, so we ended up with `G`, the top-level class in which the alias `T` is contained.
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-224-0/+1003