aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pull request #735 from dotty-staging/ycheck-methodsodersky2015-08-04100-4/+23
|\ | | | | Ycheck that methods defined in ClassInfo exist in tree.
| * Fix #744Dmitry Petrashko2015-07-282-0/+9
| | | | | | | | Mixi was not calling transformFollowing on generated setters.
| * Add a test for #743 to pending.Dmitry Petrashko2015-07-281-0/+6
| |
| * Workaround #742 and add a test for it.Dmitry Petrashko2015-07-281-0/+7
| | | | | | | | | | Making a correct fix could take some time, and I want to find other issues before I start working on this one.
| * Remove warning from .check file that is not emitted by DottyDmitry Petrashko2015-07-141-3/+0
| |
| * Enable 61 tests that succeed.Dmitry Petrashko2015-07-1395-0/+0
| |
| * Fix ClassCastException in patmat when using Product1.Dmitry Petrashko2015-07-131-1/+1
| |
* | Implement getClass methodAlexander Myltsev2015-07-252-0/+67
| |
* | Prettify console output of classof check testAlexander Myltsev2015-07-232-4/+7
| |
* | Merge pull request #719 from dotty-staging/fix/doubledefsDmitry Petrashko2015-07-201-0/+6
|\ \ | | | | | | Avoid crashes on double definitions
| * | Add test caseMartin Odersky2015-07-091-0/+6
| | |
* | | Merge pull request #727 from dotty-staging/genbcode-annotationsDmitry Petrashko2015-07-151-0/+0
|\ \ \ | | | | | | | | Implement emission of annotations in GenBCode.
| * | | Implement emotion of annotations in GenBCode.Dmitry Petrashko2015-07-141-0/+0
| | |/ | |/| | | | | | | Fixes #688
* | | Merge pull request #714 from smarter/add/vc-inline-before-erasureDmitry Petrashko2015-07-151-0/+37
|\ \ \ | | | | | | | | Move the inlining of value class methods before Erasure
| * | | Move the inlining of value class methods before ErasureGuillaume Martres2015-07-071-0/+37
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VCInline is split into two phases: - VCInlineMethods (before Erasure) replaces value class method calls by calls to extension methods - VCElideAllocations (after Erasure) handles == and optimizing the unboxing of a boxed value class, as VCInline did before. This should not affect anything currently, but in the future we will have phases before Erasure that mangle names (like TypeSpecializer, see #630), being able to put these phases after VCInlineMethods means that VCInlineMethods does not need to know anything about how these phases mangle names, this reduces the coupling between phases. The trade-off is that VCInlineMethods needs to deal with type parameters and multiple parameter lists whereas VCInline didn't.
* | | Merge pull request #721 from smarter/fix/implicit-scope-boundsodersky2015-07-151-0/+14
|\ \ \ | | | | | | | | Don't add lower bounds of abstract types to the implicit scope
| * | | Don't add lower bounds of abstract types to the implicit scopeGuillaume Martres2015-07-111-0/+14
| |/ / | | | | | | | | | | | | | | | | | | | | | As the spec[1] says: "The parts of a type T are [...] if T is an abstract type, the parts of its upper bound;" [1]: http://www.scala-lang.org/files/archive/spec/2.11/07-implicits.html#implicit-parameters
* / / SyntheticMethods: override productPrefix for case classesGuillaume Martres2015-07-132-0/+21
|/ / | | | | | | | | The productPrefix of a case class should be the name of the class itself to match Scala 2.
* | Check that a self type T is closed.Martin Odersky2015-07-061-0/+4
| | | | | | | | | | | | | | | | What is checked: A self type T is a subtype of all selftypes of classes refernced by T. That is, a self type has to subsume all self types of its required type. Ot, otherwise said, requirements must be closed; you cannot discover new ones in following them.
* | Error instead of crash when sigName comes up with a missing reference.Martin Odersky2015-07-061-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A TypeRef can have be unresolved, either because it refers to something that's missing from the classpath or because of transitive self type references. Instead of crashing in sigName, we now report the error. Achieved by defining a new exception type, MissingType, which derives from TypeError. This catches t7933.scala, now integrated in the neg/selfreq.scala. The problem there was a reference to AbsSettings, which was not a member of StandardScalaSettings.this, but was a member of the required type of AbsSettings, which itself appeared in the required type of StandardScalaSettings. We will outlaw in the next commit such transitive required references. Also collapsed TypeError and FatalTypeError. It was a misnomer anyway. Fatal were those type errors that were caught and reported! Open: Where else we should check for unresolved NamedTypes.
* | Merge pull request #694 from dotty-staging/fix/dependent-methodsodersky2015-07-062-1/+20
|\ \ | |/ |/| Fix/dependent methods
| * Add test from pending.Martin Odersky2015-06-251-0/+0
| |
| * Sharpen prototypes of implicit methods.Martin Odersky2015-06-251-0/+15
| | | | | | | | | | | | | | Necessary to make implicit resolution of type-level peano numbers work. The current commit makes takes the inimal steps to make this happen. We could also consider sharpening using followAlias every type we constrain a result, or every time we adapt a type.
| * Handle normalization of implicit dependent methods.Martin Odersky2015-06-231-1/+5
| | | | | | | | Now handles included test if toplevel implicit is given, but not yet without.
* | Tests that objects nested in value class methods workGuillaume Martres2015-07-042-0/+17
| | | | | | | | This confirms that SI-6359 does not apply to Dotty.
* | Merge pull request #695 from dotty-staging/fix/source-positionsDmitry Petrashko2015-07-022-3/+7
|\ \ | | | | | | Avoid crasher when first token of a program is in error
| * | Updated check file.Martin Odersky2015-06-251-3/+3
| | | | | | | | | | | | Seems partest adds code to the sources so that line numbers are not the same.
| * | Update check file.Martin Odersky2015-06-251-3/+3
| | | | | | | | | | | | Line numbers were wrong in previous file.
| * | Avoid crasher when first token of a program is in errorMartin Odersky2015-06-251-0/+4
| |/ | | | | | | | | This used to give a crash in SourcePositiom, promoted by feeding its calculations with a negative offset.
* | Check value class member restrictionsMartin Odersky2015-07-022-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to SIP 15 a value class C must obey the following restrictions: C may not have secondary constructors. C may not declare fields (other than the parameter of a value class). C may not contain object definitions. C may not have initialization statements. These are enforced by this commit. We are still missing restrictions on value class paremeters. We should review what the right set of conditions is (probably we want to admit non-vals, and maybe even multiple parameters).
* | Check that value classes are staticMartin Odersky2015-07-021-0/+15
| |
* | Check final and sealed conditionsMartin Odersky2015-07-021-0/+4
| | | | | | | | | | So far no error was raised for illegal inheritance from final or sealed classes.
* | Drop Module flag from lifted symbols.Martin Odersky2015-06-262-0/+10
| | | | | | | | | | | | | | Reason: A lifted module is no longer a module (i.e. singleton object) in the scope to which it is lifted. Fixes #689.
* | 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-5/+5
| | | | | | | | | | | | | | | | | | | | 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 #678 from dotty-staging/fix/#670-orphan-polyparamodersky2015-06-251-3/+3
|\ \ | |/ |/| Avoid junk produced by Constraint#replace.
| * Revert test to originalMartin Odersky2015-06-231-2/+2
| | | | | | | | Uncomment two lines that were commented out by accident.
| * Avoid junk produced by Constraint#replace.Martin Odersky2015-06-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two instances where a constraint undergoing a replace would still refer to poly params that are no longer bound after the replace. 1. In an ordering the replaced parameters was n ot removed from the bounds of the others. 2. When a parameter refers to the replaced parameter in a type, (not a TypeBounds), the replaced parameter was not replaced. We now have checking in place that in globally committable typer states, TypeVars are not instantiated to PolyParams and (configurable) that constraints of such typer states are always closed. Fixes #670.
* | Merge pull request #677 from alexander-myltsev/am-579-implement_class_ofDmitry Petrashko2015-06-232-0/+6
|\ \ | | | | | | Closes #579 Implement mini-phase for classOf[T]
| * | Closes #579 Implement mini-phase for classOf[T]Alexander Myltsev2015-06-222-0/+6
| | |
* | | Merge pull request #667 from dotty-staging/fix/#646-array-additionodersky2015-06-222-0/+0
|\ \ \ | | | | | | | | Fix/#646 array addition
| * | | Do not check for ambiguous implicits in viewExistsMartin Odersky2015-06-222-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+8
|\ \ \ \ | |/ / / |/| | | 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/+0
| | | | | | | | | | | | | | | | | | | | | | | | 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/+0
| | | | | | | | | | | | | | | | | | | | 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-1/+2
| |/ / | | | | | | | | | | | | Map references to outer accessors in secondary constructors to outer parameters. This was the second source of "reference to this before super call" errors.