aboutsummaryrefslogtreecommitdiff
path: root/tests/run
Commit message (Collapse)AuthorAgeFilesLines
...
* | Restored full testMartin Odersky2015-06-261-5/+5
| | | | | | | | Uncommented parts that were left accidentally commented out when debugging.
* | Remove check file.Martin Odersky2015-06-261-1/+0
| | | | | | | | | | The file consisted of just a deprecation warning. Not sure what was deprecated; neither dotty nor scalac find anything wrong with it.
* | Fix erasure of Thistypes.Martin Odersky2015-06-262-0/+59
|/ | | | | | | | | | Thistypes erased to the underlying class. This is wrong. When seen as part of some other type, a ThisType has to erase to the erasure of the underlying type (i.e. the erasure if the selftype of the class). unittest-collections.scala failed with a MethodNotFound error because the erasure was computed incorrectly. On the other hand, a tree with a ThisType type, should keep the type, analogous to a tree with a TermRef type.
* Merge pull request #677 from alexander-myltsev/am-579-implement_class_ofDmitry Petrashko2015-06-232-0/+60
|\ | | | | Closes #579 Implement mini-phase for classOf[T]
| * Closes #579 Implement mini-phase for classOf[T]Alexander Myltsev2015-06-222-0/+60
| |
* | Merge pull request #667 from dotty-staging/fix/#646-array-additionodersky2015-06-222-0/+15
|\ \ | | | | | | Fix/#646 array addition
| * | Do not check for ambiguous implicits in viewExistsMartin Odersky2015-06-222-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously `viewExists(X, Y)` failed if there were ambiguous implicit conversions from X to Y. This is too fragile, as demonstrated by test case run/array-addition.scala. Here, the `genericArrayOps` implicit was not inserted because its result type `Array[?T]` was deemed to be incompatible with `? { +: : ? }`. It was incompatible because there were multiple implicits that added :+ to arrays of various element types. But once `genericArrayOps` gets applied, the type parameter `?T` of the array result is fixed, and the ambuity goes away. The scenario shows that we should not test for ambiguous implicits in viewExists. Such a test is fragile because it depends on the progress of type inference when the test is made. It's preferable to just test for any implicit conversion to exist and to check for ambiguities later, when the implicit conversion is actually applied. This has also the potential of speeding up implicit search in situations where `viewExists` is called often (e.g. when coupled with overloading resolution).
* | | Merge pull request #675 from dotty-staging/fix/#652-erase-constructorsodersky2015-06-228-0/+230
|\ \ \ | |/ / |/| | Fix/#652 erase constructors
| * | Re-enable sanitized printingMartin Odersky2015-06-201-1/+1
| | | | | | | | | | | | Ws disabled by accident.
| * | Avoid noise introduced by printing anonymous class numbersMartin Odersky2015-06-202-4/+6
| | | | | | | | | | | | | | | | | | We seem to have an instability where the testing framework influences what numbers anonymous classes are given. We have to deal with this, but not now. For the moment I am masking numbers from the test output.
| * | Updated check fileMartin Odersky2015-06-201-1/+1
| | | | | | | | | | | | Difference was in generated number for anonymous classes only.
| * | Map outer fields to parameters in primary constructorMartin Odersky2015-06-204-0/+161
| | | | | | | | | | | | | | | | | | Previously this was only done in secondary constructors; need to do it in primary constructor as well to avoid "reference to this before super" problems.
| * | Map proxy references in constructors to parametersMartin Odersky2015-06-202-0/+34
| | | | | | | | | | | | | | | Proxy references in constructors can't be left as fields because they can happen before the supercall.
| * | Map outer accessors to outer paramatersMartin Odersky2015-06-192-0/+33
| |/ | | | | | | | | Map references to outer accessors in secondary constructors to outer parameters. This was the second source of "reference to this before super call" errors.
* | Merge pull request #668 from lampepfl/fix/#650-self-typesodersky2015-06-222-0/+161
|\ \ | | | | | | Fix checking whether types are instantiable.
| * | Fix checking whether types are instantiable.Martin Odersky2015-06-192-0/+161
| | | | | | | | | | | | | | | The logic for checking aginst the self type was wrong, as demonstrated by pos/checkInstantiable.scala.
* | | Merge pull request #674 from dotty-staging/fix/#655-eta-expansionodersky2015-06-212-0/+20
|\ \ \ | |_|/ |/| | Fix/#655 eta expansion
| * | Fix problem in eta expansion.Martin Odersky2015-06-192-0/+20
| | | | | | | | | | | | Failure to do a widen caused by-name parameters to go undetected.
* | | Merge pull request #669 from dotty-staging/fix-patmat-seqodersky2015-06-194-0/+56
|\ \ \ | | | | | | | | Fix sequence matching.
| * | | Enable t5629b.Dmitry Petrashko2015-06-192-0/+46
| | | | | | | | | | | | | | | | Was also fixed in this PR.
| * | | Fix wrong test in PatMat.Dmitry Petrashko2015-06-192-0/+10
| | | | | | | | | | | | | | | | | | | | Call drop method directly if class derives from sequence. I do not understand how callRuntime works in scalac. Calling this method requires implicit search.
* | | | Merge pull request #671 from dotty-staging/fix/#659-lambdalift-proxiesodersky2015-06-191-0/+26
|\| | | | |/ / |/| | Fix/#659 lambdalift proxies
| * | Add initializers for lambdalift proxy fieldsMartin Odersky2015-06-191-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | If an inner class has proxy fields, we missed so far the assignment sfrom the proxy parameters in the primary constructor of the class to the proxy fields. Test case tries several variations of this.
| * | Fix problem with explicit outer accessorsMartin Odersky2015-06-191-0/+12
| | | | | | | | | | | | Even if an explicit outer accessor was a method, it got a TermRef as type.
* | | Take expected result type into account more often for overloading resolutionMartin Odersky2015-06-191-0/+109
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the expected result type of a FunProto type was ignored and taken into account only in case of ambiguities. arrayclone-new.scala shows that this is not enough. In a case like val x: Array[Byte] = Array(1, 2) we typed 1, 2 to be Int, so overloading resulution would give the Array.apply of type (Int, Int*)Array[Int]. But that's a dead end, since Array[Int] is not a subtype of Array[Byte]. This commit proposes the following modified rule for overloading resulution: A method alternative is applicable if ... (as before), and if its result type is copmpatible with the expected type of the method application. The commit does not pre-select alternatives based on comparing with the expected result type. I tried that but it slowed down typechecking by a factor of at least 4. Instead, we proceed as usual, ignoring the result type except in case of ambiguities, but check whether the result of overloading resolution has a compatible result type. If that's not the case, we filter all alternatives for result type compatibility and try again.
* | More explicit test of trait parameter initialization orderMartin Odersky2015-06-191-0/+30
| | | | | | | | As suggested by @retronym
* | Drop parameter accessor flag in traitsMartin Odersky2015-06-191-0/+6
| | | | | | | | | | Parameter accessors in traits have the ParamAccessor flag removed in the Mixin transformSym method.
* | Extend test to verify initialization orderMartin Odersky2015-06-191-6/+13
| | | | | | | | Verify that the initilialization order described in #640 is correctly implemented.
* | Convert pos test to be a run test.Martin Odersky2015-06-191-0/+19
| |
* | Merge pull request #663 from dotty-staging/fix/#643-scala2-noinitsDmitry Petrashko2015-06-192-0/+181
|\ \ | | | | | | Fix #643 - Scala2 unpickling now sets NoInits flag for interfaces.
| * | Avoid spurious StaleSymbol error in <refinement> membersMartin Odersky2015-06-162-0/+181
| |/ | | | | | | | | | | | | Refinement classes and their members could give spurious stale symbol errors if the symbol is loaded in a different run than the classfile containing it. The problem is that refinement classes do not form part of the scope of their owners. The fix assumes that refinement classes are always "stillValid".
* | Merge pull request #664 from dotty-staging/more-testsodersky2015-06-1878-0/+2515
|\ \ | |/ |/| Enable tests that pass, move macro tests to disabled.
| * Update origins.check with origins that match dotty.Dmitry Petrashko2015-06-151-3/+3
| |
| * Remove warnings that dotty doesn't emit from check files.Dmitry Petrashko2015-06-156-22/+0
| |
| * Enable tests that succeed.Dmitry Petrashko2015-06-1578-0/+2537
| |
* | Revert changes in testMartin Odersky2015-06-151-2/+1
| | | | | | | | Changes were made by accident.
* | Fix #651 Generalize criterion for isOpAssignMartin Odersky2015-06-152-0/+355
|/ | | | | Methods like + can have multiple parameters. In that case += also takes multiple parameters.
* Merge pull request #622 from dotty-staging/add/implement-scala2-traitsodersky2015-06-061-2/+8
|\ | | | | Implement Scala2 traits
| * Fixed test.Martin Odersky2015-06-021-2/+8
| | | | | | | | | | | | | | | | | | Until the previous fix to Denotation-& the test here spuriously passed. The Dotty spec is that value classes synthesize equals and hashCode only if no concrete definitions are inherited except the ones from Any. That was previously miscalculated. The test has been updated to reflect the specified behavior.
* | Revert "Update t6260-delambdafy.check to account for change in lambda ↵Dmitry Petrashko2015-06-021-0/+1
| | | | | | | | | | | | | | | | generation" This reverts commit cafd71af4902c76561f27a479c14e53729600bb9. For the future refference: tests and checkfiles should be modified only after carefull thought. Otherwise our tests will stop indicating the correct behaviour.
* | Revert "Avoid static initialization deadlock in run tests."Martin Odersky2015-06-015-34/+23
|/ | | | This reverts commit 8f90105dc4e62e78d53b385df1b2eb29f2855183.
* Update t6260-delambdafy.check to account for change in lambda generationGuillaume Martres2015-05-301-1/+0
|
* Avoid static initialization deadlock in run tests.Guillaume Martres2015-05-305-23/+34
| | | | | See https://github.com/lampepfl/dotty/pull/624#issuecomment-107064519 for a lengthy explanation.
* Bring back disabled test.Martin Odersky2015-05-292-0/+26
|
* Revert "Fix #580: use isContainedIn to support cases where the enclosing ↵Martin Odersky2015-05-292-26/+0
| | | | | | class is also the top-level class" This reverts commit 6898d2c296326779d373ef0e0b84e4451550120a.
* Merge pull request #611 from dotty-staging/supercalls-traits-testDmitry Petrashko2015-05-282-0/+56
|\ | | | | Add a test for supercalls in traits.
| * Extended test case.Martin Odersky2015-05-271-0/+10
| | | | | | | | Also added non-unit fields and a class that directly implements two traits with the same fields.
| * workaround https://issues.scala-lang.org/browse/SI-7666Dmitry Petrashko2015-05-271-5/+11
| |
| * Add super calls to trait initialization test)Dmitry Petrashko2015-05-271-3/+3
| |
| * Add a test for trait initialization.Dmitry Petrashko2015-05-271-0/+25
| |