aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix path error disgnasticsMartin Odersky2016-02-094-8/+23
| | | | | Fix wording so that it works for nested errors as well. Incorparte Tiark's latest example.
* Only final lazy vals can be paths.Martin Odersky2016-02-094-4/+36
| | | | | | Reason: They might be overridden by other lazy vals that are not realizable, and therefore risk creating bad bounds.
* Enforce rule that laziness is preserved when overriding.Martin Odersky2016-02-097-11/+23
|
* Reorganize tests to account for new typing of projectionMartin Odersky2016-02-0918-42/+112
| | | | | | Tests with failed projections are moved to pos-scala2, which was renamed from pos-special. Files in pos-scala2 are compiled with -language:Scala2 option.
* Cleanup of isEffectivelyFinalMartin Odersky2016-02-091-7/+4
| | | | | | | | | EffectivelyFinal came without documentation, so it was not clear what is was supposed to compute. I looked at the use sites, and it seems that all they need is "impossible to override". So I changed the code to do that and dropped the additional condition that members of modules or final classes were not allowed to be lazy or mutable. It was not clear to me what that had to do with finality.
* Move realizability logic from Types to TypeOps.Martin Odersky2016-02-094-44/+45
| | | | Types is already big enough.
* Realizability refactoringMartin Odersky2016-02-095-27/+58
| | | | | | Distinguish between isStable and isRealizable. Issue migration warnings for realizibility failures. Provide error diagnostics why something is not realizable.
* Also consider type aliases when checking for realizabilityMartin Odersky2016-02-093-1/+41
| | | | Fixes #50.
* Move scala2Mode test from isStable to isRealizableMartin Odersky2016-02-092-5/+5
| | | | This prepares the way for using isRealizable in different contexts.
* Use isRealizable to identify stable prefixesMartin Odersky2016-02-095-11/+61
| | | | | | | Replaces isVolatile, which is too weak (and more complicated). Backwards compatibility with Scala2 is ensured by dropping the requirement in Scala2 mode. Fixes #1047, which now compiles without inifinite recursion.
* No volatile check needed for strict vals.Martin Odersky2016-02-092-10/+10
|
* Merge pull request #1053 from dotty-staging/fix-#1045odersky2016-02-085-25/+90
|\ | | | | Fix #1045
| * Drop redundant context parameterMartin Odersky2016-02-081-1/+1
| |
| * Disable benchmark testMartin Odersky2016-02-041-0/+0
| | | | | | | | | | | | | | | | The test checks that Scala collections perform within 10x of Java collections. That's not something we need to test for dotty. And because of the heavily parallel execution of the tests it does not always hold. This is the second time in a a month that this particular test failed on jenkins. I think we lost enough cycles on it.
| * Slight optimizationMartin Odersky2016-02-041-6/+8
| |
| * Try to make refinements match in approximateUnionsMartin Odersky2016-02-043-2/+48
| | | | | | | | | | See comment in Typer#approximateUnion for an explanation. Fixes #1045.
| * Push `|' into corresponding RefinedTypes in approximateUnionMartin Odersky2016-02-042-25/+42
| | | | | | | | | | This gives in general a supertype, that's OK for approximation. See ee76fda for an explanation.
* | Merge pull request #1067 from dotty-staging/fix-1065odersky2016-02-082-2/+22
|\ \ | | | | | | Fix #1065 erasedLub for arrays of primitives.
| * | Test that #1065 is fixed.Dmitry Petrashko2016-02-081-0/+12
| | |
| * | Fix #1065 erasedLub for arrays of primitives.Dmitry Petrashko2016-02-081-2/+10
| |/ | | | | | | | | | | Unlike arrays of objects, that can be accessed as an array of a super type of this object, int[] cannot be accessed as an array of primitives.
* | Merge pull request #1063 from dotty-staging/fix-#803Dmitry Petrashko2016-02-083-3/+18
|\ \ | | | | | | Handle "missing args" case when expected type is a singleton type.
| * | Handle "missing args" case when expected type is a singleton type.Martin Odersky2016-02-053-3/+18
| | | | | | | | | | | | Fixes #803.
* | | Merge pull request #1057 from dotty-staging/fix/hide-stacktracesodersky2016-02-069-9/+11
|\ \ \ | | | | | | | | Hide stack traces behind -Ydebug
| * | | Do not use the plain printer with -YdebugGuillaume Martres2016-02-062-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Instead, a new setting called -Yplain-printer is used for this. After this commit, we can now run all tests with -Ydebug (this was not the case before because using the plain printer breaks -Ytest-pickler)
| * | | Do not store context creation trace with -YdebugGuillaume Martres2016-02-062-1/+2
| | | | | | | | | | | | | | | | | | | | This makes the compiler extremely slow. To store the trace, you now need to pass -Ytrace-context-creation
| * | | Do not use println when SingleDenotation#signature failsGuillaume Martres2016-02-051-1/+1
| | | |
| * | | Hide stack traces behind -YdebugGuillaume Martres2016-02-055-6/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | They're not very useful for end users and some tests like tests/neg/selfreq.scala always print these exceptions which makes it harder to read the test logs, Also use Thread.dumpStack() instead of creating an Exception and calling printStackTrace() on it.
* | | Merge pull request #1064 from dotty-staging/fix-#1044-take-3Guillaume Martres2016-02-063-5/+14
|\ \ \ | | | | | | | | Third try for a fix for #1044: handle TypevarsMissContext mode in wildApprox
| * | | Fix #1044: handle TypevarsMissContext mode in wildApproxGuillaume Martres2016-02-063-5/+14
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `wildApprox` encounters a PolyParam it approximates it by its bounds in the current constraint set, but this is incorrect if `TypevarsMissContext` is set, we might get the bounds of another use of this `PolyType`. This is exactly what happened in i1044.scala where the implicit view `refArrayOps` needs to be used twice with two different type parameters. The fix is to approximate a PolyParam by its original bounds in its PolyType if `TypevarsMissContext` is set. This fix was inspired by the approach of #1054.
* | | Merge pull request #1060 from dotty-staging/throwMethodInitodersky2016-02-051-1/+1
|\ \ \ | | | | | | | | Force the initialization of throwMethod in Definitions
| * | | Force the initialization of throwMethod in DefinitionsVladimirNik2016-02-051-1/+1
| |/ /
* | | Merge pull request #1062 from dotty-staging/fix-#859odersky2016-02-055-5/+15
|\ \ \ | |/ / |/| | Fix #859
| * | Surive non-existing sourceModule in Scala2 pickled info.Martin Odersky2016-02-053-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | It seems when unpickling nsc that some module classes come without a source module. Survive this situation rather than crashing. i859.scala is an example. i859 compiles with the patch, but causes a deep subtype when unpickling. Not sure whether scalac does the same.
| * | Handle subtyping of LazyVals that are in train of being evaluated.Martin Odersky2016-02-051-2/+5
| | | | | | | | | | | | | | | Instead of forcing again, and causing an assertion error, back out assuming that the result is false. Fixes first problem with #859.
| * | Make LazyRef#ref a def instead of a lazy valMartin Odersky2016-02-051-1/+2
|/ / | | | | | | | | It's slightly more efficient. There was no need to have a separate cache for the lazy val.
* | Merge pull request #1052 from smarter/fix/driver-apiGuillaume Martres2016-02-0510-71/+86
|\ \ | |/ |/| Improve and document the Driver#process API, fix partest logging
| * Use Context#setReporter where possibleGuillaume Martres2016-02-051-2/+1
| |
| * Context: set compilerCallback like other context variablesGuillaume Martres2016-02-042-16/+7
| | | | | | | | | | | | Previously, we could set compilerCallback on non-fresh contexts, but there is no reason that this should be allowed, and this is not done anymore in the code since the last commit.
| * Better compiler entry pointsGuillaume Martres2016-02-043-18/+51
| | | | | | | | | | | | | | | | | | - Document the entry points - It is now possible to set a custom reporter without using a custom context - Use `null` for optional arguments to make it easier to run the compiler using reflection or from Java. - DPDirectCompiler does not use a custom context anymore
| * Compiler: use the reporter passed from the DriverGuillaume Martres2016-02-042-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | With this commit and the previous one, partest should finally correctly log the output of the compiler and display it at the end of its execution if compilation failed. Also make sure the initial Reporter in a Context is _not_ a ThrowingReporter. Previously, the initial Reporter was always overriden in Compiler by rootReporter so it had no effect, but this is not the case anymore, and the negative junit tests fail with the ThrowingReporter since they throw an exception instead of exiting with a certain number of errors.
| * Driver: properly use root Context passed as argumentGuillaume Martres2016-02-043-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also CompilerTest no longer runs the compiler with the context DottyTest#ctx. Previously, we got away with this because Compiler#process ignored it and created a new Context, but this commit fixes this, and it is now very important that we use a different context for every test we compile. Since DottyTest#ctx was the only part of DottyTest we used, CompilerTest no longer extends DottyTest to make sure that we do not use it accidentally. If we want to use DottyTest as a base class for tests again, we will have to remove its implicit Context field first. Also do not try to initialize the definitions in the context used by partest, this is not necessary.
| * Remove useless options in testsGuillaume Martres2016-02-042-14/+1
| | | | | | | | | | | | | | | | - Removed "-Xprint-types", it is only rarely needed and makes it very hard to read trees, enable it yourself if you need it. - Removed "-Ylog:<some", this does not seem to have any effect currently. - Removed "-pagewidth 90", this is overloaded in tests.scala to 160 anyway.
| * Reporter: make summary available without a ContextGuillaume Martres2016-02-041-5/+16
| |
| * ConsoleReporter: remove unused argument ctxGuillaume Martres2016-02-044-4/+4
|/
* Merge pull request #1022 from dotty-staging/fix-i939Dmitry Petrashko2016-01-243-6/+13
|\ | | | | Fix #939. Allows IntMap and LongMap to compile
| * Add IntMap and LongMap to collections whitelist.Dmitry Petrashko2016-01-241-5/+3
| |
| * Test that #939 is fixedDmitry Petrashko2016-01-241-0/+8
| |
| * Fix i939: Patmat shouldn't compare selectors to module TypeTrees.Dmitry Petrashko2016-01-241-1/+2
|/ | | | | | | | It would be great to augment Ycheck to ensure that some trees are not permitted, e.g. TypeTree cannot be a stat in a block or a receiver of a call. Currently this is `ensured` by backend by failing.
* Merge pull request #1039 from dotty-staging/fix-#998Guillaume Martres2016-01-232-3/+28
|\ | | | | Fix #998
| * Fix #998Martin Odersky2016-01-202-3/+28
| | | | | | | | Needed a fix in approximateUnion.