aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix #2152: Instantiate dependent result type parametersMartin Odersky2017-04-111-0/+7
| | | | | | | #2152 shows that dependent result type parameters can end up in the types of terms, so we have to eliminate them. If we don't we get orphan parameters in pickling. Fix method name and comment
* Fix #2219: Fix type applications on WildcardTypeGuillaume Martres2017-04-111-0/+7
| | | | | | | Previously we just returned the unapplied WildcardType which is incorrect if the WildcardType is bounded. The proper thing to do is to do the type application on the bounds of the WildcardType and wrap the result in a WildcardType.
* Merge pull request #1938 from dotty-staging/named-based-patmatFelix Mulder2017-04-116-0/+111
|\ | | | | Change case class desugaring and decouple Products and name-based-pattern-matching
| * Add testsOlivier Blanvillain2017-04-066-0/+111
| | | | | | | | | | | | - t7296 & case-class-23 are moved out of pending - 1938 tests productElement > 23
* | Merge pull request #2215 from dotty-staging/#2142odersky2017-04-111-0/+28
|\ \ | | | | | | Fix #2142: Skolemize arguments of dependent methods if necessary
| * | Skolemize arguments to dependent methods as necessary.Martin Odersky2017-04-101-0/+28
| | | | | | | | | | | | This was missing before, led to errors not being detected.
* | | Merge pull request #2197 from dotty-staging/add-enum-exhaustivenessodersky2017-04-1010-5/+98
|\ \ \ | | | | | | | | Add enum exhaustivity checking
| * | | add more enum exhaustivity testsliu fengyun2017-04-063-0/+77
| | | |
| * | | exhaustivity support for enumsliu fengyun2017-04-066-5/+17
| | | |
| * | | Add child annotations for enum valuesMartin Odersky2017-04-061-0/+4
| | |/ | |/| | | | | | | | | | A new kind of child annotation that points to the term symbol representing an enum value.
* | | Merge pull request #2206 from dotty-staging/fix-#2198odersky2017-04-101-0/+6
|\ \ \ | |_|/ |/| | Fix #2198: Don't widen module singletons
| * | Fix #2198: Don't widen module singletonsMartin Odersky2017-04-091-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Since module classes are a compiler-generated construct that's not directly visible to programmers, it seems better not to automatically widen a module singleton to its underlying class. Fixes #2198.
* | | Merge pull request #2207 from dotty-staging/fix-#2188Nicolas Stucki2017-04-091-0/+5
|\ \ \ | | | | | | | | Fix #2188: Do cbn transform also on Selects
| * | | Fix #2188: Do cbn transform also on SelectsMartin Odersky2017-04-091-0/+5
| |/ / | | | | | | | | | These can arise as a result of an explicit outer transform.
* | | Merge pull request #2208 from dotty-staging/fix-#2192Guillaume Martres2017-04-091-0/+7
|\ \ \ | | | | | | | | Fix #2192: Follow supertypes when determining whether an expect type …
| * | | Fix #2192: Fullow supertypes when determining whether an expect type is a ↵Martin Odersky2017-04-091-0/+7
| |/ / | | | | | | | | | function type
* | | Merge pull request #2205 from dotty-staging/fix-#2220odersky2017-04-092-0/+10
|\ \ \ | |/ / |/| | Fix #2220: Change handling of package objects and tweak hk type inference
| * | Tweak logic for hk type comparisonsMartin Odersky2017-04-092-0/+10
| | |
* | | Fix #2201: Less aggressive type application reduction for better inferenceGuillaume Martres2017-04-083-0/+33
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we believed that reducing type applications did not affect type inference as long as the reduced type constructor had the same arity as the unreduced one, for example reducing `Foo[X, Y]` is fine when `Foo` is defined as: type Foo[A, B] = Bar[A, B] but not when it's defined as: type Foo[A] = Bar[A, A] But this is not a sufficient condition: the bounds of the type constructor arguments also matter for type inference, so we need to be more strict and disallow reductions in cases like: type Foo[A, B] = Bar[B, A] and: type Foo[A, B] = Bar[A, Int]
* | Merge pull request #2187 from dotty-staging/fix-2166odersky2017-04-061-0/+5
|\ \ | |/ |/| fix #2166: unpickling of shared CaseDef
| * fix #2166: unpickling of shared CaseDefliu fengyun2017-04-041-0/+5
| |
* | Merge pull request #1958 from dotty-staging/add-enumodersky2017-04-0625-32/+246
|\ \ | | | | | | Add "enum" construct
| * | Another test fixedMartin Odersky2017-04-051-1/+1
| | |
| * | Update test and add check fileMartin Odersky2017-04-052-1/+9
| | |
| * | Implementation of proposal changesMartin Odersky2017-04-053-5/+31
| | | | | | | | | | | | | | | - rename utility methods - generate utility methods also for object cases
| * | Add check fileMartin Odersky2017-04-051-0/+1
| | |
| * | New and updated testsMartin Odersky2017-04-044-3/+37
| | |
| * | Infer enum type args from type parameter boundsMartin Odersky2017-04-041-1/+12
| | | | | | | | | | | | | | | | | | Infer type arguments for enum paraments from corresponding type parameter bounds. This only works if the type parameter in question is variant and its bound is ground.
| * | Fix neg test error countMartin Odersky2017-04-041-1/+1
| | | | | | | | | | | | | | | Previous expansion caused 3 spurious follow-on errors which are now avoided.
| * | Support cases with type parameters that extend a non-parameterized baseMartin Odersky2017-04-041-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | Support cases with type parameters that implicitly extend a non-parameterized base without needing their own extends clause. The proposal has been updated to make clear that this is supported. Also address other reviewers comments.
| * | Support comma-separated enum constantsMartin Odersky2017-04-041-3/+1
| | |
| * | Change enumeration members.Martin Odersky2017-04-042-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on the discussion in #1970, enumeration objects now have three public members: - valueOf: Map[Int, E] - withName: Map[String, E] - values: Iterable[E] Also, the variance of case type parameters is now the same as in the corresponding type parameter of the enum class.
| * | Change return type of `apply`.Martin Odersky2017-04-041-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an enum case like case C() extends P1 with ... with Pn ... apply now returns `P1 & ... & Pn`, where before it was just P1. Also, add to Option test.
| * | Check that cases with type parameters also have an extends clauseMartin Odersky2017-04-041-0/+1
| | |
| * | More fine-grained distinctions when flags are defined.Martin Odersky2017-04-041-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flags like Trait are in fact not always defined when a symbol is created. For symbols loaded from class files, this flag, and some other is defined only once the classfile has been loaded. But this happens in general before the symbol is completed. We model this distinction by separating from the `FromStartFlags` set a new set `AfterLoadFlags` and distinguishing between the two sets in `SymDenotations#is`. Test case is enum-Option.scala. This erroneously complained before that `Enum` was not a trait.
| * | New test caseMartin Odersky2017-04-043-0/+44
| | |
| * | Link generic test to actual implementations of Enum and EnumValuesMartin Odersky2017-04-043-26/+2
| | | | | | | | | | | | These are now implemented in scala.runtime.
| * | Another testMartin Odersky2017-04-042-0/+11
| | |
| * | Add testsMartin Odersky2017-04-047-0/+47
| | |
| * | Adapt generic tests to model modified enum values schemeMartin Odersky2017-04-045-21/+35
| |/
* | Merge pull request #2025 from dotty-staging/fix-2024Nicolas Stucki2017-04-052-1/+5
|\ \ | | | | | | Fix #2024: TypeApply can be a final apply of a recursive method.
| * | Remove name clash in test.Dmitry Petrashko2017-03-131-1/+1
| | |
| * | Check that #2024 is fixed.Dmitry Petrashko2017-03-081-0/+4
| | |
* | | checkNoPrivateLeaks: Do not allow types to refer to leaky aliasesGuillaume Martres2017-04-043-1/+28
| |/ |/| | | | | | | | | | | | | | | | | | | `checkNoPrivateLeaks` can force a lot of things, this lead to hard-to-reproduce issues in unpickling because we called `checkNoPrivateLeaks` on the type parameters of a class before anything in the class was indexed. We fix this by making sure that `checkNoPrivateLeaks` never transforms type symbols, only term symbols, therefore we can unpickle type parameters without forcing too many things. tests/neg/leak-type.scala illustrates the new restriction that this necessitates.
* | Merge pull request #2162 from abeln/infix-opDmitry Petrashko2017-04-041-0/+5
|\ \ | | | | | | Fix #1959: infix type operators in the REPL
| * | Fix #1959: infix type operators in the REPLAbel Nieto2017-04-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Infix type operators were broken in the REPL. The REPL uses fold methods from the untpd package, but those were skipping the operator subtree when folding over an InfixOp. Fix the issue by taking the operator into account. Tested: 1) Verified that only the REPL code uses the modified fold method. 2) Added repl test.
* | | Merge pull request #2159 from dotty-staging/fix-hashcodeDmitry Petrashko2017-04-031-4/+4
|\ \ \ | | | | | | | | Make case class hashCode take class into account
| * \ \ Merge branch 'master' into fix-hashcodeFelix Mulder2017-04-022-0/+43
| |\ \ \
| * | | | Optimize hashCode computationMartin Odersky2017-03-311-4/+4
| | | | | | | | | | | | | | | | | | | | Also, update check file.
* | | | | Merge branch 'master' into si4400Felix Mulder2017-04-021-0/+6
|\ \ \ \ \ | | |/ / / | |/| | |