aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Enable tests for old fixed issuesGuillaume Martres2016-02-097-0/+0
| | | | Fix #530, #654, #681, #684, #685
* Merge pull request #1051 from dotty-staging/change-isVolatileodersky2016-02-0924-33/+410
|\ | | | | Change is volatile
| * By-name parameters are not stable values.Martin Odersky2016-02-092-14/+21
| |
| * New test files from SI 7278.Martin Odersky2016-02-092-0/+74
| |
| * Big realizability refactoringMartin Odersky2016-02-095-38/+129
| | | | | | | | | | | | | | Move logic from TypeOps to new file CheckRealizable.scala. Also check realizable fields under strict mode. Check at phase PostTyper rather than Typer to avoid cycles. New tests for imports and deep paths.
| * Handle paths of length > 1 for realizability checkingMartin Odersky2016-02-091-0/+27
| |
| * Drop lines from testMartin Odersky2016-02-092-3/+1
| | | | | | | | | | | | | | The lines in question now cause an error ("cannot be instantiated...") which masks the real tests at phase PostTyper. Also adapt bugcount of hklower test
| * Check that non-abstract classes have realizable bounds.Martin Odersky2016-02-091-3/+18
| |
| * Handle imports in path checks.Martin Odersky2016-02-091-11/+9
| | | | | | | | | | | | | | | | | | | | If `T` is a member of `p` then { import p._; ... T ... } should be checked in the same way as { ... p.T ... }
| * Fix path error disgnasticsMartin Odersky2016-02-091-0/+16
| | | | | | | | | | 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-092-2/+31
| | | | | | | | | | | | 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-093-2/+12
| |
| * Reorganize tests to account for new typing of projectionMartin Odersky2016-02-0914-22/+79
| | | | | | | | | | | | 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.
| * Also consider type aliases when checking for realizabilityMartin Odersky2016-02-091-0/+24
| | | | | | | | Fixes #50.
| * Use isRealizable to identify stable prefixesMartin Odersky2016-02-092-9/+40
| | | | | | | | | | | | | | 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-091-9/+9
| |
* | Merge pull request #1058 from dotty-staging/fix-#864-v2Guillaume Martres2016-02-091-0/+10
|\ \ | |/ |/| Prune constraints that could turn into cycles
| * Prune constraints that could turn into cyclesMartin Odersky2016-02-051-0/+10
| | | | | | | | Fixes #864. Review by @smarter.
* | Merge pull request #1053 from dotty-staging/fix-#1045odersky2016-02-083-3/+8
|\ \ | | | | | | Fix #1045
| * | 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.
| * | Try to make refinements match in approximateUnionsMartin Odersky2016-02-041-0/+7
| | | | | | | | | | | | | | | See comment in Typer#approximateUnion for an explanation. Fixes #1045.
| * | Push `|' into corresponding RefinedTypes in approximateUnionMartin Odersky2016-02-041-3/+1
| |/ | | | | | | | | 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-081-0/+12
|\ \ | | | | | | Fix #1065 erasedLub for arrays of primitives.
| * | Test that #1065 is fixed.Dmitry Petrashko2016-02-081-0/+12
| |/
* | Merge pull request #1063 from dotty-staging/fix-#803Dmitry Petrashko2016-02-081-0/+11
|\ \ | | | | | | 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-051-0/+11
| |/ | | | | | | Fixes #803.
* | Fix #1044: handle TypevarsMissContext mode in wildApproxGuillaume Martres2016-02-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Surive non-existing sourceModule in Scala2 pickled info.Martin Odersky2016-02-051-0/+3
|/ | | | | | | | | 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.
* Test that #939 is fixedDmitry Petrashko2016-01-241-0/+8
|
* Merge pull request #1039 from dotty-staging/fix-#998Guillaume Martres2016-01-231-0/+6
|\ | | | | Fix #998
| * Fix #998Martin Odersky2016-01-201-0/+6
| | | | | | | | Needed a fix in approximateUnion.
* | Merge pull request #1038 from dotty-staging/fix-#1037Guillaume Martres2016-01-232-0/+7
|\ \ | | | | | | Fix #1037
| * | Extend testMartin Odersky2016-01-192-0/+7
| |/ | | | | | | | | We verified that before the combination abstract/concrete for `x` also led to AMEs. So we test it here explicitly, too.
* / Fix #1036Martin Odersky2016-01-201-0/+12
|/ | | | Achieved by tweaking from where we get the parameter types of an eta-expansion.
* Check AppliedTypeTrees bounds inside AppliedTypeTreeGuillaume Martres2016-01-181-0/+5
|
* Adapt and add testsMartin Odersky2016-01-183-7/+143
| | | | | New test that exhibited the problem is ski.scala. Previously this did not fail with a bounds violation.
* Fix caching bug: don't assume that tvars instantiation cannot be retractedGuillaume Martres2016-01-171-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When TypeVar#inst is empty but an instantiation exists in the typer state, we should set ephemeral to true, because this instantiation will be retracted if we throw away the current typer state. This makes hkrange.scala pass, it compiled before but the type parameter of `f` was inferred to be `Nothing` because of this bug, and this failed Ycheck. For anyone who wonders how caching bugs manifest themselves, here's what happened in details in hkrange.scala: 1. In an ExploreTyperState we set `CC` to be `IndexedSeq` in the constraint set 2. In that same typer state the TypeRef `CC[Int]` (it's a TypeRef because `CC` is a type lambda) gets the denotation `IndexedSeq[Int]`, which is correct, but the denotation is cached since `ephemeral` is false, which is wrong. 3. Later, we retract the ExplorerTyperState, so `CC` is uninstantiated again and unconstrained. 4. Then we do the subtyping check `CC[Int] <:< IndexedSeq[Int]`, because the denotation of `CC[Int]` was cached, this returns true, but `CC` stays unconstrained. 5. This means that when we instantiate `CC`, we get `Nothing` After this fix, the TypeRef denotation is no longer cached, so when we do `CC[Int] <:< IndexedSeq[Int]`, `CC` gets constrained as expected.
* Stop crashes because we're out of memory by disabling t7880Guillaume Martres2016-01-171-0/+1
| | | | | | | | | | | | | | | | All of our recent memory-related tests failures since https://github.com/lampepfl/dotty/pull/1030 was merged seem to be caused by t7880.scala. It tries to intentionally trigger an OutOfMemoryError, however since we don't pass -Xmx to our run tests it's possible that this we fill up the memory of our host before we reach the maximum heap size of the JVM. Ideally, we would specify a -Xmx for run tests (scalac uses 1 GB), unfortunately in the version of partest we use this is tricky because we need to set the system property "partest.java_opts". If we upgrade our partest to the latest release, we can instead specify it by setting the argument `javaOpts` of the constructor of `SuiteRunner`, see https://github.com/scala/scala-partest/commit/7c4659e1f88b410109ad3c4e7f66ae7070c6e985
* Compute type params in namer without completing the whole infoMartin Odersky2016-01-161-0/+6
| | | | | | | | | Type params should be computed before computing the whole info of a type. Without the patch we get a cyclic reference in the compileMixed test. Note that compileIndexedSeq does not pass with this commit (it passed before), this is fixed in the next commit.
* Fix checkNonCyclic.Martin Odersky2016-01-162-0/+10
| | | | | | | Need to also look info refined types. Need to handle case where we hit a NoCompleter again. Fixes #974 and makes MutableSortedSetFactory in stdlib compile.
* Merge pull request #1005 from dotty-staging/ycheck-erasure-arraysDmitry Petrashko2016-01-042-0/+30
|\ | | | | Ycheck that scala.Array is erazed to either Object or JavaArrayType.
| * Fix erasure of raw arraysDmitry Petrashko2015-12-211-0/+15
| |
| * Minimize #996Dmitry Petrashko2015-12-201-0/+15
| |
* | Merge pull request #1010 from dotty-staging/fix/new-asSeenFromodersky2016-01-031-0/+13
|\ \ | | | | | | Fix #1009: Do not forget to skolemize some types
| * | Fix #1009: Do not forget to skolemize some typesGuillaume Martres2015-12-241-0/+13
| | |
* | | Merge pull request #1006 from dotty-staging/more-testsGuillaume Martres2015-12-26257-273/+65
|\ \ \ | |/ / |/| | More tests
| * | The big pending/pos test triageMartin Odersky2015-12-20196-670/+57
| | |
| * | Fix problem dealing with symbolic import renamesMartin Odersky2015-12-201-0/+9
| | |
| * | Fix hk comparison between class and range lambdaMartin Odersky2015-12-202-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | In a situation like List <: [X] -> <: GenTraversable[X] We have to ask whether the rhs contains the instantiated lhs, not whether it is a supertype.
| * | Don't flag override errors for synthetic companion objects.Martin Odersky2015-12-191-0/+25
| | |