aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
Commit message (Collapse)AuthorAgeFilesLines
* Enable tests for old fixed issuesGuillaume Martres2016-02-091-0/+8
| | | | Fix #530, #654, #681, #684, #685
* Merge pull request #1051 from dotty-staging/change-isVolatileodersky2016-02-098-231/+31
|\ | | | | Change is volatile
| * Reorganize tests to account for new typing of projectionMartin Odersky2016-02-097-231/+0
| | | | | | | | | | | | 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.
| * Use isRealizable to identify stable prefixesMartin Odersky2016-02-091-0/+31
| | | | | | | | | | | | | | 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.
* | 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-082-3/+8
|\ \ | | | | | | Fix #1045
| * | 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
| |/
* / 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.
* 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.
* | Fix #1036Martin Odersky2016-01-201-0/+12
|/ | | | Achieved by tweaking from where we get the parameter types of an eta-expansion.
* Fix caching bug: don't assume that tvars instantiation cannot be retractedGuillaume Martres2016-01-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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-161-0/+2
| | | | | | | 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 #1006 from dotty-staging/more-testsGuillaume Martres2015-12-26169-3/+3139
|\ \ | | | | | | More tests
| * | The big pending/pos test triageMartin Odersky2015-12-20116-17/+1929
| | |
| * | 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
| | |
| * | Fix parsing of blocks that end in an importMartin Odersky2015-12-191-0/+35
| | |
| * | Fix desugaring of symbols.Martin Odersky2015-12-191-0/+518
| | | | | | | | | | | | Symbols can appear in patterns, so inserting an `apply` is wrong.
| * | Fix eta lifting for functions with vararg parameters.Martin Odersky2015-12-191-0/+5
| | |
| * | Categorize more testsMartin Odersky2015-12-1950-0/+622
| | | | | | | | | | | | All pos tests up to 3999 have been triaged. One new test in pending.
* | | Make asSeenFrom idempotentMartin Odersky2015-12-211-0/+12
|/ / | | | | | | | | | | Let asSeenFrom generate a marker annotated type for any unsafe instantiation. Then cleanup in typedSelect.
* / Revise alias rules in type comparisons.Martin Odersky2015-12-152-0/+22
|/ | | | The fix solves two cases where we had a deep subtype before.
* Check types for overriding conditions.Martin Odersky2015-12-141-9/+0
| | | | Closes #241 -- that took a while!
* Do not report data races between symbols defined in class and its selftypeMartin Odersky2015-12-141-0/+13
| | | | | | | Analogous to the previous situation where we do not report a data race if the previous symbol comes from a superclass, we now do the same if the previous symbol comes from a given self type. Makes overrideDataRace.scala pass, and finally enables stdlib test with TraverableViewLike.scala added.
* Fix tricky bug coming up when compiling TraversableViewLike.Martin Odersky2015-12-141-0/+18
|
* Allow deep subtype for sets and related code in dotty/transform.Martin Odersky2015-12-131-11/+0
| | | | | The change in subtyping led to a deep subtype recursion for sets.scala. It seems legit, so the -Yno-deep-subtypes check is disabled.
* Perform variance adaptation only when needed in isSubTypeMartin Odersky2015-12-131-0/+20
| | | | | | Previously adaptIfHK was performed on every type application. This made t3152 fail. We now do this only on demand, in isSubType. t3152 now passes again. But the change unmasked another error, which makes Iter2 fail to compile.
* Move failing test to pendingMartin Odersky2015-12-061-20/+0
| | | | | Seems to be a hk-type inference issue. Needs further investigation but is not high priority right now.
* Switch to new hk scheme.Martin Odersky2015-12-061-3/+3
|
* Add missing type params in testMartin Odersky2015-12-061-1/+1
|
* Disallow existentially bound parameters as type parametersMartin Odersky2015-12-062-18/+1
| | | | | | | Done in order to keep the basics as simple as possible. Treating existentially bound parameters as still instantiatable type parameters does not seem to add anything fundamental, and makes the type system less regular.
* isSubtype: try to dealias TypeRefs before recursively checking the prefixesGuillaume Martres2015-11-251-0/+15
| | | | | | | As demonstrated by tests/pos/hk-deep-subtype.scala, we can avoid some deep subtype recursions that result in stack overflows by doing this. Fix #943.
* Merge pull request #957 from dotty-staging/fix-#938odersky2015-11-171-0/+21
|\ | | | | Fix #938
| * Add test caseMartin Odersky2015-11-171-0/+21
| |
* | Links between companions after unpickling are addedVladimirNik2015-11-172-0/+10
|/
* Test case for #947Martin Odersky2015-11-171-0/+16
|
* Extend implicits testMartin Odersky2015-11-171-0/+6
| | | | ... to show that we support implicit patterns.
* Generalize test to function classesMartin Odersky2015-11-161-0/+10
| | | | | | The previous test was too struct, missed cases where some arguments of the function were unbound. i583a.scala contains a test case.
* Merge pull request #928 from dotty-staging/stdlib-definitionsDmitry Petrashko2015-11-101-1/+1
|\ | | | | Make Definitions survive recompilation of core definitions.