aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
Commit message (Collapse)AuthorAgeFilesLines
* Fix tests to survive wellformedness checksMartin Odersky2015-10-222-2/+2
|
* Merge pull request #821 from dotty-staging/fix-check-simple-kindedDmitry Petrashko2015-10-201-1/+1
|\ | | | | Check that some types are not higher-kinded.
| * Check that some types are not higher-kinded.Martin Odersky2015-10-071-1/+1
| | | | | | | | Invalidates #813. Review by @darkdimius.
* | Merge pull request #823 from smarter/fix/lifting-and-inferenceGuillaume Martres2015-10-191-0/+9
|\ \ | | | | | | Always fully define the types of lifted expressions
| * | Always fully define the types of lifted expressionsGuillaume Martres2015-10-191-0/+9
| | | | | | | | | | | | Fixes #822
* | | Merge pull request #817 from smarter/fix/avoidGuillaume Martres2015-10-121-0/+42
|\ \ \ | |/ / |/| | Fix various issues in `TypeAssigner#avoid`
| * | TypeAssigner#avoid: do not lose type parameters when the base type changes.Guillaume Martres2015-10-091-0/+12
| | | | | | | | | | | | Fixes #741.
| * | Add pos test about escaping refinementsGuillaume Martres2015-10-091-0/+10
| | |
| * | TypeAssigner#avoid: don't miss escaping refs in complex typesGuillaume Martres2015-10-091-1/+9
| | |
| * | TypeAssigner#avoid: more precise types for inner classesGuillaume Martres2015-10-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | When we need to avoid `A` in the class `A#B`, we can try to replace `A` by a supertype. Previously, we only tried to replace `A#B` itself by a supertype. Fixes #711.
* | | Merge pull request #799 from dotty-staging/change-inferenceodersky2015-10-071-0/+17
|\ \ \ | |_|/ |/| | Change inference
| * | Generalize set of typevars instantiated before implicit searchMartin Odersky2015-09-181-0/+7
| | | | | | | | | | | | | | | | | | We now also consider type variables in a selection prefix of the application. The test case was augmented to include a snippet which only succeeds under the generalization.
| * | Add test caseMartin Odersky2015-09-181-0/+10
| | |
* | | Merge pull request #805 from dotty-staging/change-freeze-boundsodersky2015-10-061-0/+245
|\ \ \ | |_|/ |/| | Change : freeze bounds
| * | Add test caseMartin Odersky2015-10-011-0/+245
| | | | | | | | | | | | | | | Iter2.scala fails with 6 errors, but succeeds once lubs and glbs do not try to unify under invariant type constructors.
* | | Merge pull request #804 from svalaskevicius/fix-compiling-ScalaRunTimeodersky2015-10-021-0/+9
|\ \ \ | |/ / |/| | fix compiling ScalaRunTime.scala
| * | add a test for a pattern match with ignored type paramSarunas Valaskevicius2015-09-251-0/+9
| | |
* | | Move test to posMartin Odersky2015-09-291-0/+7
|/ / | | | | | | | | A test that checked for errors on overloading now succeeds with the new rules.
* | Fixes to comments suggested by reviewerMartin Odersky2015-09-211-4/+4
| | | | | | | | Fixes suggested by @marter when reviewing previous hk PR.
* | Eta expand $apply projected types if neededMartin Odersky2015-09-213-0/+625
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that asSeenFrom can produce types that get projected with $apply but that are not higher-kinded. An exampple failure is in Iter3, andother in scala.collection.immutable.Map (which is now part of the test suite). We now detect that situation, and eta expand the projected type in `derivedSelect`, this will force a subssequent `lookupRefined` which will give the desired normalized type. Also added is a configurable test that checks that $apply projected tyeps are in fact higher-kinded.
* | Move failing test to pending.Martin Odersky2015-09-181-52/+0
| | | | | | | | | | | | The original IterableSelfRec is not syntactically legal after the hk changes. I attempted to fix, but there's still a type error. Need to investigate whether this is a true error or a bug.
* | Disallow wildcard arguments to higher-kinded types...Martin Odersky2015-09-181-1/+34
| | | | | | | | ...unless the HK type can be eta-reduced to a class type.
* | Eta expand type arguments corresponding to lambdasMartin Odersky2015-09-181-2/+2
|/ | | | | In Namer, eta expand any type argument that corresponds to a higher-kinded type parameter. Also, check that all type parameter lists are fully applied.
* Fix desugaring problemMartin Odersky2015-09-121-0/+565
| | | | Desugaring worked incorrectly when both context bounds and default parameters were present.
* Test other forms of singleton types.Martin Odersky2015-08-231-2/+18
| | | | | Tested are now other numeric values, strings, booleans, which are all legal singleton types.
* Tests of functionality.Martin Odersky2015-08-231-0/+40
| | | | | | As the comment in pos/singletons.scala says, we currently test only constant propagation during typer. We should also have a test that literalize produces the literals in the right places.
* Move the inlining of value class methods before ErasureGuillaume Martres2015-07-071-0/+37
| | | | | | | | | | | | | | | | VCInline is split into two phases: - VCInlineMethods (before Erasure) replaces value class method calls by calls to extension methods - VCElideAllocations (after Erasure) handles == and optimizing the unboxing of a boxed value class, as VCInline did before. This should not affect anything currently, but in the future we will have phases before Erasure that mangle names (like TypeSpecializer, see #630), being able to put these phases after VCInlineMethods means that VCInlineMethods does not need to know anything about how these phases mangle names, this reduces the coupling between phases. The trade-off is that VCInlineMethods needs to deal with type parameters and multiple parameter lists whereas VCInline didn't.
* Merge pull request #694 from dotty-staging/fix/dependent-methodsodersky2015-07-062-0/+47
|\ | | | | Fix/dependent methods
| * Add test from pending.Martin Odersky2015-06-251-0/+32
| |
| * Sharpen prototypes of implicit methods.Martin Odersky2015-06-251-0/+15
| | | | | | | | | | | | | | Necessary to make implicit resolution of type-level peano numbers work. The current commit makes takes the inimal steps to make this happen. We could also consider sharpening using followAlias every type we constrain a result, or every time we adapt a type.
* | Check value class member restrictionsMartin Odersky2015-07-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to SIP 15 a value class C must obey the following restrictions: C may not have secondary constructors. C may not declare fields (other than the parameter of a value class). C may not contain object definitions. C may not have initialization statements. These are enforced by this commit. We are still missing restrictions on value class paremeters. We should review what the right set of conditions is (probably we want to admit non-vals, and maybe even multiple parameters).
* | Merge pull request #678 from dotty-staging/fix/#670-orphan-polyparamodersky2015-06-251-0/+26
|\ \ | |/ |/| Avoid junk produced by Constraint#replace.
| * Revert test to originalMartin Odersky2015-06-231-2/+2
| | | | | | | | Uncomment two lines that were commented out by accident.
| * Avoid junk produced by Constraint#replace.Martin Odersky2015-06-221-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two instances where a constraint undergoing a replace would still refer to poly params that are no longer bound after the replace. 1. In an ordering the replaced parameters was n ot removed from the bounds of the others. 2. When a parameter refers to the replaced parameter in a type, (not a TypeBounds), the replaced parameter was not replaced. We now have checking in place that in globally committable typer states, TypeVars are not instantiated to PolyParams and (configurable) that constraints of such typer states are always closed. Fixes #670.
* | Merge pull request #668 from lampepfl/fix/#650-self-typesodersky2015-06-221-0/+5
|\ \ | |/ |/| Fix checking whether types are instantiable.
| * Fix checking whether types are instantiable.Martin Odersky2015-06-191-0/+5
| | | | | | | | | | The logic for checking aginst the self type was wrong, as demonstrated by pos/checkInstantiable.scala.
* | Add test that succeedsMartin Odersky2015-06-191-0/+8
| |
* | Merge pull request #599 from dotty-staging/add/existential-skolemizationodersky2015-06-191-0/+20
|\ \ | |/ |/| Tighten comparison of skolem types
| * Deskolemize types inferred for vals and defsMartin Odersky2015-06-061-0/+20
| | | | | | | | | | | | | | We want to establish the invariant (optionally checked by assertNoSkolems) that symbols do not contain skolemized types as their info. This avoids unsoundness situations where a skolem gets exported as part if the result type of a method, so different instantiations look like their are the same instance.
* | Merge pull request #635 from dotty-staging/fix/private-scala2-trait-settersDmitry Petrashko2015-06-122-4/+10
|\ \ | | | | | | Some fixes around mixin and memoization
| * | Copy annotations from trait members to their implementationsMartin Odersky2015-06-081-1/+7
| | | | | | | | | | | | Implementations inherit all annotations on the implemented trait methods.
| * | Fix to trait setter generationMartin Odersky2015-06-081-3/+3
| |/ | | | | | | | | The logic to add trait setters to Scala 2 traits was wrong. This led to AbstractMethodErrors in the formerly commented out part of scala-trait.scala.
* | Fix mergeDenot one more time.Martin Odersky2015-06-072-0/+46
| | | | | | | | | | | | | | | | | | | | It's easy to get this wrong. What happened was that when computing deferred members of a class a deferred member was preferred over a concrete one because the types did not match. Thsi should not happen. We now change the scheme to always prefer concrete over abstract, and subclass-owned over superclass-owned. But we pick a denotation only if the overrides relationship on types coincides with the preference on symbols.
* | Bring back tests from disabled.Martin Odersky2015-06-073-0/+52
| | | | | | | | The tests in this commit pos were verified to work again.
* | Fix refs to inner objectsMartin Odersky2015-06-071-0/+16
|/ | | | | | | | A reference to an object from anywhere in its module class can be established by the This of the module class. The previous behavior always referenced the object as a term ref which might cause a reference to the outer This which might not be available (since this is not tracked by ExplicitOuter). Brings t3174.scala back from disabled.
* Merge pull request #622 from dotty-staging/add/implement-scala2-traitsodersky2015-06-062-0/+58
|\ | | | | Implement Scala2 traits
| * Add test case.Martin Odersky2015-06-012-0/+58
| | | | | | | | We are still lacking the setup to do this right for mixed Scala 2/Dotty runtime tests. So I checked into `pos` for now.
* | Test case for problems with lambda lifting.Martin Odersky2015-06-031-0/+9
| |
* | Move test from lambdaLift.scala to a separate file in pending.Dmitry Petrashko2015-06-021-21/+0
|/
* Uncomment testsMartin Odersky2015-05-271-2/+2
|