aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
Commit message (Collapse)AuthorAgeFilesLines
* Proparage function result constrains when inferring parameter typesMartin Odersky2016-07-161-0/+3
| | | | | | | | If an application has functions with implicit parameter types we need to be more aggressive about propagating knowledge of the expected result type into the constraint. Fixes #1378.
* Merge pull request #1377 from dotty-staging/#1365odersky2016-07-151-0/+13
|\ | | | | Fix 1365: Fix bindings in patterns
| * Fix 1365: Fix bindings in patternsMartin Odersky2016-07-091-0/+13
| | | | | | | | | | | | We need to compare pattern types with expected types in order to derive knowledge about pattern-bound variables. This is done use the mechanism of gadt bounds.
* | Merge pull request #1291 from nicolasstucki/implement-scala-dynamicDmitry Petrashko2016-07-151-0/+7
|\ \ | | | | | | Add scala.Dynamic support.
| * | Add scala.Dynamic language feature check.Nicolas Stucki2016-07-071-0/+7
| |/
* | Merge pull request #1343 from dotty-staging/change-hk-direct2odersky2016-07-1526-934/+254
|\ \ | | | | | | Direct representation of higher-kinded types
| * | Fix bounds checking of hk applied typedMartin Odersky2016-07-141-2/+32
| | | | | | | | | | | | | | | Previous logic could only handle classes as constructors. Also, address other reviewers comments.
| * | Allow hk parameters in lower boundsMartin Odersky2016-07-131-0/+11
| | |
| * | Enable test for fixed #1181: Typer should preserve aliases in TypeTreesGuillaume Martres2016-07-121-0/+12
| | | | | | | | | | | | This was fixed two commits ago.
| * | Drop restriction to 2nd order hk typesMartin Odersky2016-07-122-0/+49
| | | | | | | | | | | | Allow hk type parameters to be higher kinded themselves.
| * | Avoid dealiasing on type applicationMartin Odersky2016-07-122-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | When applying a type alias of a type lambda, keep the original application instead of reducing. But reduce anyway if - the reduced type is an application where the type constructor has the same kind as the original type constructor, or - some of the arguments are wildcards.
| * | Allow definition of new types in refinementsMartin Odersky2016-07-122-0/+54
| | | | | | | | | | | | | | | Allow definition of types in refinements that do not appear in parent type.
| * | Fix SI-2712Martin Odersky2016-07-115-2/+66
| | | | | | | | | | | | | | | Allows partially instantiated types as type constrictors when inferring higher-kinded types.
| * | More testsMartin Odersky2016-07-111-0/+13
| | |
| * | Disallow higher-kinded types that simulate general existential typesMartin Odersky2016-07-112-265/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot handle such types in general. So we now check that a hk application C[args] where some of the arguments are wildcards does not have as a supertype a hk application ([X] -> B)[args]
| * | Change testsMartin Odersky2016-07-115-626/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - compileMixed failed because there was a cycle between immutable.Seq (compiled) and parallel.ParSeq (loaded from classfile). Inspection of the completion log (turn completions Printer on) and the stack trace showed that there's nothing we can do here. The old hk scheme did not go into the cycle because it did not force an unrelated type. I believe with enough tweaking we would also hva egotten a cycle in the old hk scheme. The test is "fixed" by adding parallel.ParSeq to the files to compile. - Disable named parameter tests Those tests do not work yet with the revised hk scheme. Before trying to fix this, we should first decide what parts of named parameters should be kept.
| * | Eta-expand unapplied types that have type parametersMartin Odersky2016-07-114-26/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We would like to change from a scheme where eta-expansion was prototype driven to one where unapplied parameterized types are always eta expanded. The reason is that we might miss some eta expansions due to cyclic references. run/colltest4 is an exmaple. Here, we missed an eta expansion in the type of Iterator. The class definition is: trait Iterable[+A] extends IterableOnce[A] with FromIterable[Iterable] { We'd expect that the second parent would expand to FromIterable[[X0] -> Iterable[X0]] But we miss the expansion because at the time we complete Iterable we have not completed FromIterable yet. In fact this happens in both the old and the new hk scheme. But in the old scheme we did not notice the error whereas in the new scheme we get an error in PostTyper that the type Iterable does not conform to its bound `[X0] -> Iterable[X0]`. With this commit, we change the scheme, so that eta-expansion depends on the type parameters of a type itself, instead of the expected type. We should investigate whether we can do a similar change for Scala2 classloading. Check kinds of type parameters Also, do not allow a hk type if the bound is a * type.
| * | Introduce recursive typesMartin Odersky2016-07-112-16/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Map self-references in refinements to recursive types. This commit does this for refinement types appearing in source. We still have to do it for unpickled refinements. Test apply-equiv got moved to pending because it simulates the old higher-kinded type encoding in source, which relies on the old representation in terms of self-referential refinement types. The plan is not to adapt this encoding to the new representation, but to replace it with a different encoding that makes critical use of the added power of recursive types. Use recursive types also when unpickling from Scala 2.x. Add mapInfo method to Denotations.
* | | Correct typo in IsInstanceOfEvalautor, fixes #1352Felix Mulder2016-07-141-0/+15
|/ /
* / Test for #1366Martin Odersky2016-07-081-0/+6
|/
* Merge pull request #1309 from felixmulder/topic/fix#1307Dmitry Petrashko2016-06-221-0/+7
|\ | | | | Fix issue with GADT not typechecking without bind in match
| * Fix issue with GADT not typechecking without bind in matchFelix Mulder2016-06-061-0/+7
| |
* | better handling of overloaded extractorsliu fengyun2016-06-201-0/+38
|/
* Do not miss implicits in type parameters of parentsGuillaume Martres2016-05-311-0/+12
| | | | | This did not work before because we incorrectly looked for their value in the prefix of the type instead of the type itself.
* Fix implicit scope caching bugGuillaume Martres2016-05-311-0/+16
| | | | | | | | | | | | | | The issue is subtle: the `tp` in scope in `def ofTypeImplicits` is the `tp` passed to the top-level `implicitScope` method, not the `tp` passed to the recursively called `iscope`, this means that before this commit, all intermediate `OfTypeImplicit` scopes cached while computing an implicit scope had their `tp` field incorrectly set, which means that we could miss implicits in later implicit searches. Note that the `implicit_cache.scala` test worked before this commit because of the restrictions on caching that exist since b8b0f381ef2cbcb7bad66fd3e7a9ae929baa45f6, it is included anyway because our caching strategy might change in the future.
* Document why we cannot cache all implicit scopesGuillaume Martres2016-05-311-0/+17
|
* Add test for SI-9795Felix Mulder2016-05-271-0/+7
|
* Annotate repeated params with `case` flag to indicate that they are legalFelix Mulder2016-05-271-4/+1
| | | | | | | One drawback with this approach is that the type seems to propagate. I.e. if the return type of an expression is `repeated` then the enclosing variable will get the `repeated` type instead of getting the expected `Seq` type
* Don't evaluate isInstanceOf for value classes, disable bugged testsFelix Mulder2016-05-262-5/+1
| | | | | | | The tests `i1059.scala` and `t3480.scala` are failing due to a bug in pattern matcher that evaluates the `x` in `List(x: _*)` incorrectly. Concerned issue: #1276
* Two more testsMartin Odersky2016-05-191-0/+20
| | | | Unrelated to other commits but useful to get in.
* Allow dependent method type for unapply.Martin Odersky2016-04-271-0/+14
|
* Test caseMartin Odersky2016-04-271-0/+16
|
* Merge branch 'master' into fix-equalityodersky2016-04-261-0/+10
|\
| * Fix test failures in tailcall due to name clashes.Dmitry Petrashko2016-04-211-1/+1
| |
| * Test #1221.Dmitry Petrashko2016-04-181-0/+10
| |
* | Add test that demonstrate that #878 is fixedGuillaume Martres2016-04-221-0/+17
|/ | | | It was fixed by 2460f9603b0f0ed1d73dfea99edcee9ba6261d36
* Merge pull request #1211 from dotty-staging/fix-#1202odersky2016-04-161-0/+14
|\ | | | | Fix Tasty errors
| * Augment test caseMartin Odersky2016-04-071-0/+14
| |
* | Check that #1216 is fixed.Dmitry Petrashko2016-04-142-0/+22
| |
* | Merge pull request #1186 from dotty-staging/fix-#1185odersky2016-04-064-12/+126
|\ \ | |/ |/| Improvements to cyclic checking, avoidance, named parameters
| * Domain checking for named type parametersMartin Odersky2016-03-301-10/+10
| | | | | | | | | | | | Now verifies that the named type parameters of an overriding type or class are the same as the named type parameters of an overridden type.
| * Test casesMartin Odersky2016-03-302-2/+52
| |
| * Fix test case.Martin Odersky2016-03-301-4/+4
| | | | | | | | The intent is that Repr implementations should not bind the Out parameter.
| * Simplify and fix avoid logicMartin Odersky2016-03-301-0/+33
| | | | | | | | | | The previous formulation broke for named parameters. Test case in flowops1.scala.
| * Fixes to checkNonCyclicMartin Odersky2016-03-301-0/+31
| | | | | | | | | | | | | | | | | | Simplified logic and now check prefixes of TypeRefs. Without the simplified logic we would get false cyclic errors for ski.scala. Test case: flowops.scala Fixes #1185.
* | FullParametrization: allow to have $this of ThisType.Dmitry Petrashko2016-03-311-0/+26
| | | | | | | | | | | | | | | | | | TailRec methods remain members of enclosing class, it means that they can refer to methods that require this.type. It means that tailrec, unlike value classes is not allowed to widen type of $this to it's full self type. Fixes #1089
* | Remove Variances.scala files accidentally leftover from #1193Guillaume Martres2016-03-311-15/+0
| | | | | | | | These files were supposed to be remove, their content are now in variances.scala
* | merge variances and VariancesMartin Odersky2016-03-311-0/+15
| |
* | Add tests related to variance checking.Sandro Stucki2016-03-301-0/+15
|/
* Fix problem involving classtag based pattern matches.Martin Odersky2016-03-211-0/+19
| | | | | | Rewriting did not go far enough, as evidenced by pos/i1174.scala Fixes #1174