aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | Merge branch 'master' into si4400Felix Mulder2017-04-021-0/+6
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | Merge pull request #2154 from dotty-staging/topic/fix-#2151Felix Mulder2017-03-311-0/+6
| |\ \ \ \ | | |_|/ / | |/| | | Fix #2151: don't die for wrong number of typeargs applied
| | * | | Fix #2151: don't die for wrong number of typeargs appliedFelix Mulder2017-03-311-0/+6
| | |/ /
* | / / 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-294-0/+20
| |
* | Add test to check failure of non-tail recursiveFelix Mulder2017-03-291-0/+7
| |
* | Move varargs tests to top-level pos and negFelix Mulder2017-03-298-3/+3
| |
* | Add testing of new test frameworkFelix Mulder2017-03-2911-0/+56
| |
* | Add run testing capabilitiesFelix Mulder2017-03-297-73/+5
| |
* | Add neg testing capability to ParallelTestingFelix Mulder2017-03-292-2/+2
| |
* | Fix i851.java not being valid javaFelix Mulder2017-03-291-1/+1
| |
* | Merge pull request #2139 from dotty-staging/fix/false-companionGuillaume Martres2017-03-284-0/+17
|\ \ | | | | | | Fix #2137: Create dummy companions for top-level objects without a real one
| * | Fix #2137: Create dummy companions for top-level objects without a real oneGuillaume Martres2017-03-234-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we sometimes ended up forcing a companion class symbol from a previous run or from the classpath which lead to weird issues like in `false-companion`. Even if we end up not forcing such a symbol, its presence can still lead to issue: before this commit incremental compilation of `dotty-compiler-bootstrapped` was broken because we recorded a false dependency on the non-bootstrapped `dotty-compiler` jar. The added test is currently marked pending because it does not work with JUnit (which doesn't handle separate compilation), only partest. I didn't managed to get it to work right, and this won't be necessary once our testing framework is overhauled by https://github.com/lampepfl/dotty/pull/2125 anyway, so I'll just have to remember to enable this test afterwards.
* | | 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.
* | | | Fix varargs in methods and constructors (#2135)Igor Mielientiev2017-03-227-0/+21
| |/ / |/| | | | | | | | | | | | | | | | | * Fix varargs in methods (Issue: #1625) * Fix minor comments * Change varargs parameter message * Fix failed test, fix case for constructor
* | | Update check fileMartin Odersky2017-03-202-4/+4
| | |
* | | Add test casesMartin Odersky2017-03-206-3/+80
|/ /
* | Merge pull request #2122 from dotty-staging/fix-i2086Guillaume Martres2017-03-202-0/+9
|\ \ | | | | | | Fixed #2086: Add tests for issue that has already been fixed.
| * | Fixed #2086: Add tests for issue that has already been fixed.Nicolas Stucki2017-03-202-0/+9
| | |
* | | Merge pull request #2123 from dotty-staging/fix-i1573Guillaume Martres2017-03-203-0/+15
|\ \ \ | |/ / |/| | Fixed #1573: Add tests for fixed issue.
| * | Fixed #1573: Add tests for fixed issue.Nicolas Stucki2017-03-203-0/+15
| | |
* | | Merge pull request #2118 from abeln/super-bugDmitry Petrashko2017-03-201-0/+3
|\ \ \ | |/ / |/| | Fix #2117: bug in typechecking super prefix with invalid enclosing class
| * | Fix bug in typechecking super prefix with invalid enclosing classAbel Nieto2017-03-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When typechecking class A { C.super.foo() } If C isn't an enclosing class, the compiler was throwing because of an unguarded pattern match. Fix the issue by checking for ErrorType. Tested: Verified that the example above no longer throws. Added a test.
* | | Better type inference in harmonizeUnionGuillaume Martres2017-03-181-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the added testcase failed because the type of `inv` was inferred to be `Inv[Any]` instead of `Inv[Int]`. The situation looks like this: def inv(cond: Boolean) = if (cond) new Inv(1) // : Inv[A] where A >: Int else Inv.empty // : Inv[A'] where A' unconstrained // : Inv[A] | Inv[A'] To get the type of `inv`, we call `harmonizeUnion` which will take the lub of `Inv[A]` and `Inv[A']`, eventually this mean that we do: A' <:< A But since `harmonizeUnion` uses `fluidly`, this does not result in `A'` getting constrained to be a subtype of `A`, instead we constrain `A` to the upper bound of `A'`: Any <:< A We use `fluidly` to avoid creating OrTypes in `lub`, but it turns out that there is a less aggressive solution: `lub` calls `mergeIfSuper` which then calls `isSubTypeWhenFrozen`, if we just make these subtype calls non-frozen, we can achieve what we want. This is what the new `lub` parameter `canConstrain` allows.
* | | Merge pull request #2110 from dotty-staging/fix/reduce-more-lambdasGuillaume Martres2017-03-181-0/+3
|\ \ \ | | | | | | | | Reduce type lambdas even if variance changes
| * | | Reduce type lambdas even if variance changesGuillaume Martres2017-03-161-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the added testcase failed with (when running with -Ydebug-alias): 2 | def foo = Seq(a) | ^ |covariant type A occurs in invariant position in type => Seq.CC[Cov.this.A] of method foo Because the type parameter of `CC` is invariant. Of course, this is fine because `CC[A]` can be reduced to `Seq[A]`, but before this commit, `TypeApplications#appliedTo` used to disallow reductions that replaced an invariant type parameter with a variant one. I believe that for type inference, only preserving the arity is important, so I removed this restriction.
* | | 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 #2096 from dotty-staging/fix-i2051Dmitry Petrashko2017-03-152-0/+11
|\ \ \ | | | | | | | | Fix #2051: allow override T with => T or ()T
| * | | add more testsliu fengyun2017-03-141-0/+7
| | | |
| * | | add neg test for #2051liu fengyun2017-03-141-0/+2
| | | |
| * | | fix #2051: allow override T with => T or ()Tliu fengyun2017-03-141-0/+2
| | | |
* | | | Merge pull request #2079 from dotty-staging/depmeth2odersky2017-03-142-0/+28
|\ \ \ \ | | | | | | | | | | Allow inter-parameter dependencies
| * | | | Test casesMartin Odersky2017-03-142-0/+28
| | | | |
* | | | | 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
| | |/ / / | |/| | |
* | | | | Merge pull request #2097 from dotty-staging/fix-i1706Guillaume Martres2017-03-141-0/+3
|\ \ \ \ \ | | | | | | | | | | | | Fix #1706: add test
| * | | | | add test for #1706liu fengyun2017-03-141-0/+3
| |/ / / / | | | | | | | | | | | | | | | The bug is already fixed in PR #1724 while fixing another issue
* | | | | Merge pull request #2091 from dotty-staging/fix-#2077Guillaume Martres2017-03-142-0/+11
|\ \ \ \ \ | |_|/ / / |/| | | | Fix #2077: Optimization of constant conditionals
| * | | | 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.
* / / / fix #2071: handle HKApply in SAMTypeliu fengyun2017-03-141-0/+7
|/ / /
* | | Merge pull request #2080 from dotty-staging/fix#-2066odersky2017-03-122-0/+42
|\ \ \ | | | | | | | | Fix #2066: Don't qualify private members in SelectionProto's...
| * | | Alternative fix of #2066.Martin Odersky2017-03-121-0/+27
| | | | | | | | | | | | | | | | | | | | Now we never match `? { name: T }` with types that have only a private `name` member. This is what scalac does, too.
| * | | Fix #2066: Don't qualify private members in SelectionProto's...Martin Odersky2017-03-121-0/+15
| | | | | | | | | | | | | | | | ... unless they would be accessible in the given context.
* | | | Merge pull request #2078 from dotty-staging/fix-#1569-v2Guillaume Martres2017-03-122-9/+12
|\ \ \ \ | | | | | | | | | | Fix #360: Improve avoidance algorithm
| * | | | Add original test case of #360Martin Odersky2017-03-121-0/+6
| | | | |
| * | | | Fix #1569: Improve avoidance algorithmMartin Odersky2017-03-122-9/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | The essential change is that we do not throw away more precise info of the avoided type if the expected type is fully defined.