aboutsummaryrefslogtreecommitdiff
path: root/tests/run
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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-042-0/+30
|
* 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-046-0/+39
|
* Adapt generic tests to model modified enum values schemeMartin Odersky2017-04-045-21/+35
|
* 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-021-0/+37
| |\
| * | Optimize hashCode computationMartin Odersky2017-03-311-4/+4
| | | | | | | | | | | | Also, update check file.
* | | Test that SI-4400 stays fixed.Dmitry Petrashko2017-03-311-0/+35
| |/ |/|
* | Test that #2156 is fixedDmitry Petrashko2017-03-301-0/+37
|/
* Fix #2147: redirect both java and scala std out/errFelix Mulder2017-03-292-0/+10
|
* Add run testing capabilitiesFelix Mulder2017-03-297-73/+5
|
* Merge pull request #2127 from dotty-staging/fix/variable-pattern-accessGuillaume Martres2017-03-282-0/+23
|\ | | | | Fix desugaring of variable pattern leaking into API
| * Fix desugaring of variable pattern leaking into APIGuillaume Martres2017-03-212-0/+23
| | | | | | | | | | This was especially bad for incremental compilation since the temporary variable name is unstable.
* | Update check fileMartin Odersky2017-03-202-4/+4
| |
* | Add test casesMartin Odersky2017-03-206-3/+80
|/
* Fixed #1573: Add tests for fixed issue.Nicolas Stucki2017-03-202-0/+10
|
* Merge pull request #2058 from dotty-staging/fix-2054liu fengyun2017-03-181-0/+13
|\ | | | | Fix #2054
| * Test that #2054 is fixed.Dmitry Petrashko2017-03-071-0/+13
| |
* | Fix #2099: avoid loading a private member when recomputing a NamedType denotGuillaume Martres2017-03-163-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ParamForwarding creates the following forwarder in B: private[this] def member: Int = super.member Where the type for `super.member` is `TermRef(SubA, member)` and the symbol is the `val member` in `A`. So far this is correct, but in later phases we might call `loadDenot` on this `TermRef` which will end up calling `asMemberOf`, which before this commit just did: prefix.member(name) This is incorrect in our case because `SubA` also happens to have a private `def member`, which means that our forwarder in B now forwards to a private method in a superclass, this subsequently crashes in `ExpandPrivate`. (Note: in the bytecode, a private method cannot have the same name as an overriden method, but this is already worked around in EnsurePrivate.) The fix is simple: when we recompute a member, we should only look at private members if the previous denotation was private.
* | Merge pull request #2098 from dotty-staging/fix-i1960Guillaume Martres2017-03-141-0/+8
|\ \ | | | | | | Fix #1960: add test
| * | add test for #1960liu fengyun2017-03-141-0/+8
| | |
* | | Fix #2077: Optimization of constant conditionalsMartin Odersky2017-03-132-0/+11
|/ / | | | | | | | | Move fixed logic to FirstTransform, where the other constant folding operations are also done.
* | Merge pull request #2045 from dotty-staging/fix-hlist-hmapodersky2017-03-097-0/+281
|\ \ | | | | | | Fix type inference for HLists and HMaps
| * | New test: covariant hmapsMartin Odersky2017-03-021-0/+97
| | | | | | | | | | | | | | | | | | Type inference tends to take quite different paths for non-variant and variant data structures. Since, non-variant hmap has already exposed quite a few problems, it's good to test it also in the covariant case.
| * | Drop duplication in testMartin Odersky2017-03-011-71/+0
| | |
| * | Add non-variant version of HLists for completenessMartin Odersky2017-02-282-0/+157
| | | | | | | | | | | | | | | Variance changes quite a few things for type inference, so it's good to check a non-variant version as well.
| * | Add check fileMartin Odersky2017-02-281-0/+1
| | |
| * | Independent test case, mentioned in #2004.Martin Odersky2017-02-281-0/+11
| | |
| * | New testMartin Odersky2017-02-282-0/+86
| | | | | | | | | | | | | | | The HLists test brought out the unsoundness of alias rewriting in glbs which is tackled in the last commit.
* | | Drop special case around Function1Martin Odersky2017-03-082-5/+7
| | | | | | | | | | | | | | | | | | Now only Scala2 mode treats Function1's as implicit conversions. Instead we introduce a new subclass ImplicitConverter of Function1, instances of which are turned into implicit conversions.
* | | Add puzzler 54 as a testMartin Odersky2017-03-081-0/+13
| | |
* | | Disallow subtypes of Function1 acting as implicit conversionsMartin Odersky2017-03-082-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new test `falseView.scala` shows the problem. We might create an implicit value of some type that happens to be a subtype of Function1. We might now expect that this gives us an implicit conversion, this is most often unintended and surprising. See the comment in Implicits#discardForView for a discussion why we picked the particular scheme implemented here.
* | | Disable most tests that depend on scala-reflectGuillaume Martres2017-03-082-58/+0
| |/ |/|
* | Merge pull request #2031 from dotty-staging/fix-#2030odersky2017-03-032-8/+6
|\ \ | |/ |/| Fix #2030: Don't chain implicit conversions
| * Test polishingMartin Odersky2017-02-272-8/+6
| |
* | Merge pull request #2011 from dotty-staging/hmap-testodersky2017-02-271-0/+97
|\ \ | |/ |/| HMap test case
| * Update HMap testOlivier Blanvillain2017-02-201-44/+24
| |
| * Add HMap test caseOlivier Blanvillain2017-02-201-0/+117
| |
* | Merge pull request #1993 from dotty-staging/add-lazy-implicitsodersky2017-02-254-0/+150
|\ \ | | | | | | Treat implicit by-name arguments as lazy values
| * | Treat implicit by-name arguments as lazy valuesMartin Odersky2017-02-174-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous rules, the two test cases produce a diverging implicit expansion. We avoid this by creating for every implicit by-name argument of type T a lazy implicit value of the same type. The implicit value is visible for all nested implicit searches of by-name arguments. That way, we tie the knot and obtain a recursive lazy value instead of a diverging expansion.
* | | Fix #2020: Only the first parameters of a case class are caseaccessorsMartin Odersky2017-02-221-0/+8
| | | | | | | | | | | | | | | Only the parameters in the first parameter list of a case class should get the `CaseAccessor` flag. Fixes #2020.
* | | Merge pull request #1996 from dotty-staging/fix-#1990odersky2017-02-214-0/+73
|\ \ \ | |_|/ |/| | Fix #1990: Handle inlining where this proxies change types
| * | Harden outer proxy computation of inlined codeMartin Odersky2017-02-192-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that we simply cannot do reliable outer path computation that fills in the right hand sides of this-proxies from the types of these proxies. As-seen-from logic can mangle the types of proxies enough to scramble the necessary information. What we now do instead is simply count: We record the number of outer accesses to an outer this in inlineable code, and do the same number of outer accesses when computing the proxy.
| * | Bonus test: builder patternMartin Odersky2017-02-182-0/+52
| |/ | | | | | | | | This shows that the builder pattern can be expressed with implicit function types.
* | Merge pull request #1989 from dotty-staging/remove/scalac-testsGuillaume Martres2017-02-182-28/+0
|\ \ | | | | | | Disable tests that require scala-compiler
| * | Disable tests that require scala-compilerGuillaume Martres2017-02-182-28/+0
| |/ | | | | | | This is necessary if we ever want to get rid of our dependency on scala-compiler
* | Fix binding of x @ (e: T) in ClassTag-based patmatGuillaume Martres2017-02-171-0/+9
| | | | | | | | | | | | We cannot assume that the untyped rhs of the bind is a `Typed` tree, with extractors it might be an `Apply` node, and in general it might also be a `Parens` node.