aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #767 from dotty-staging/fix-#756-super-accessorsDmitry Petrashko2015-08-282-0/+16
|\ | | | | Fix #756 super accessors
| * Add missing negative test.Martin Odersky2015-08-211-0/+8
| |
| * Add test caseMartin Odersky2015-08-211-0/+8
| |
* | Merge pull request #770 from odersky/fix-repeatedDmitry Petrashko2015-08-241-0/+10
|\ \ | | | | | | Fix repeated
| * | Refine refOfDef top handle repeated parametersMartin Odersky2015-08-221-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | refOfDef is used in desugaring case classes, specifically the definition of an apply method. Here it is necessary to pass a vararg argument (x: _*) if the case class parameter is repeated. This functionality is now added to `refOfDef`. I verified that the other uses of `refOfDef` are compatible with this change. Fixes #768.
* | | Make it a syntactic criterion whether a literal is a legal typeMartin Odersky2015-08-241-0/+2
| | | | | | | | | | | | | | | Introduce a new non-terminal "SimpleLiteral". Only SimpleLiterals can be types.
* | | Test other forms of singleton types.Martin Odersky2015-08-231-2/+18
| | | | | | | | | | | | | | | Tested are now other numeric values, strings, booleans, which are all legal singleton types.
* | | Better error message for Null and 'sym singleton types.Martin Odersky2015-08-231-0/+4
| | | | | | | | | | | | | | | | | | Null and 'sym are not legal as singleton types because the underlying values are not stable. They are rejected now outright instead of issuing a cryptic "X is not stable" error message.
* | | Update neg testMartin Odersky2015-08-231-1/+0
| | | | | | | | | | | | It's decided that constant types and purity are independent.
* | | Tests of functionality.Martin Odersky2015-08-232-0/+46
|/ / | | | | | | | | | | As the comment in pos/singletons.scala says, we currently test only constant propagation during typer. We should also have a test that literalize produces the literals in the right places.
* | Merge pull request #764 from dotty-staging/mixin/forwardersodersky2015-08-221-0/+14
|\ \ | | | | | | Mixin: class defined abstract members take precedence over interface defined.
| * | Test that forwarders are correctly created.Dmitry Petrashko2015-08-211-0/+14
| |/
* / Test that fields are correctly set before super constructor is called.Dmitry Petrashko2015-08-211-0/+12
|/
* Merge pull request #758 from ↵Dmitry Petrashko2015-08-201-1/+11
|\ | | | | | | | | dotty-staging/fix-liftedTry-capturedVars-interaction Fix lift try and captured vars interaction
| * Add a local val to lifted try to make sure owners are still legal.Martin Odersky2015-08-151-1/+1
| | | | | | | | | | Checks the hypothesis that lifting a try may safely move expressions into a ValDef owned by a new temp var.
| * Fix CaputuredVars/LiftTry interaction.Martin Odersky2015-08-151-1/+11
| | | | | | | | | | | | CapturedVars introduced an assignment that could cause a try to be executed with a non-empty stack, even after LiftTry had already run. We now avoid this by introducing a temporary variable.
* | Merge pull request #760 from dotty-staging/mixin-fixesodersky2015-08-201-0/+23
|\ \ | | | | | | Fixes to scala2 Mixin
| * | test #760Dmitry Petrashko2015-08-171-0/+23
| |/
* / Test that partial functions are handled correctly.Dmitry Petrashko2015-08-171-0/+10
|/
* GetClass: get classSymbol reliablyDmitry Petrashko2015-08-131-1/+2
| | | | TermRefs do not have a classSymbol.
* Revert "Workaround #742 and add a test for it."Martin Odersky2015-08-051-7/+0
| | | | This reverts commit a43d39ad719978fbb36663f336c1c7cd2c4da1e0.
* Add LiftTry phaseMartin Odersky2015-08-052-0/+28
| | | | | Phase lifts tries that would be illegal because they execute on non-empty expression stacks.
* Implement non-local returnsMartin Odersky2015-08-041-0/+32
| | | | Non-local returns are now implemented.
* 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.