aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #217 from dotty-staging/transform/mixinDmitry Petrashko2014-11-102-3/+3
|\ | | | | Transform/mixin
| * Adding test for Unit vars.Martin Odersky2014-11-091-1/+1
| |
| * Improved version of mixin.Martin Odersky2014-11-091-2/+2
| | | | | | | | | | Now also handles all supercalls. Seems to do the right thing on pos/traits.scala. But does not pass most tests because the sym transformer forces too many things.
* | Merge pull request #207 from dotty-staging/transform/privateToStaticodersky2014-11-093-0/+97
|\| | | | | Transform/private to static
| * New phase: PrivateToStaticMartin Odersky2014-11-093-0/+97
| | | | | | | | | | Make private methods in traits static, so that we do not need to give a default for them.
* | Detect cycles involving types bounded by singleton typesGuillaume Martres2014-11-061-0/+25
|/ | | | This fixes #193.
* Merge pull request #180 from smarter/fix/nosymbol-subtypingodersky2014-11-061-4/+5
|\ | | | | Fix subtyping of types without symbols
| * Fix subtyping of types without symbolsGuillaume Martres2014-10-091-1/+5
| |
| * Simplify subtying testGuillaume Martres2014-10-091-4/+1
| |
* | Merge commits '474b2ae' and '46eb5ea' from #201 into umasterDmitry Petrashko2014-11-031-0/+15
|\ \
| * | Added a test for by name functionsMartin Odersky2014-10-281-0/+15
| | |
* | | Typer should leave inline exception handlers inline.Dmitry Petrashko2014-10-301-2/+8
| | |
* | | TailRec now handles Try with Ident-handlerDmitry Petrashko2014-10-301-0/+14
|/ /
* | LambdaLift checks now explicitly for references to labels outside scope.Martin Odersky2014-10-261-0/+0
| | | | | | | | | | Nested methods cannot refer to labels in theior environment. Needs a fix in TailCalls. Moved failing test to pending.
* | Avoid hoisting local classesMartin Odersky2014-10-264-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | The patch disables hoisting of classes local to a block into the result type of the block. Instead, we widen the result type of the block to one which reflects all refinements made to the parents type of the local class. Test cases in avoid.scala, t1569.scala. The original t1569.scala no longer works. Why is explained in neg/t1569-failedAvoid.scala
* | Test for patmat action on a @ Bind(_, Typed(_: Unapply, _)Dmitry Petrashko2014-10-141-0/+3
| |
* | Disambiguate names in test caseMartin Odersky2014-10-131-3/+3
| |
* | New testsMartin Odersky2014-10-1210-0/+179
| |
* | Move private fields into constructorMartin Odersky2014-10-112-0/+86
| | | | | | | | | | | | | | Private fields that are accessed only from the constructor, and are accessed only after they are properly initialized are now moved into the constructor. This avoids creating a redundant objetc field. Good example: gcd in Rationals (see constrs.scala).
* | Fix handling of type params in secondary constructorsMartin Odersky2014-10-112-25/+47
| | | | | | | | | | | | | | | | | | Params are already added by Desugar. No special treatment needed here. Besides primaryConstructor.typeParams is always empty, because term symbols do not have type parameters. The fix turns t2660.scala into an error. I believe the error is correct, hence the test was moved with a comment to neg.
* | Merge pull request #174 from dotty-staging/rebDmitry Petrashko2014-10-1125-55/+309
|\ \ | |/ |/| Pattern matcher
| * Cleanup patmat based on feedbackDmitry Petrashko2014-10-111-0/+1
| | | | | | | | from pr #174.
| * Enable outer tests in pattern matcher.Dmitry Petrashko2014-10-111-0/+12
| | | | | | | | And a test for this.
| * Bring back test removed between merges.Dmitry Petrashko2014-10-111-0/+12
| |
| * Make changeOwner more robust regarding non-standard owner chainsMartin Odersky2014-10-111-12/+0
| | | | | | | | | | | | | | | | | | | | | | The problem is running changeOwner(from, to) where - from is a ValDef or a Label - an embedded definition has as owner not `from` but some owner of `from`. We allow such denomrlaized owners and the pattern matcher generates them. This patch makes changeOwner take these situations into account.
| * Fix #167Martin Odersky2014-10-111-0/+12
| | | | | | | | Can handle now vararg arguments in patterns.
| * Fix problem in unapply typing.Martin Odersky2014-09-231-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GADT bound resetting may only be applied when comparing <pattern type> <: <expected type>, not when comparing the other way around. The fix revealed an error in a test case (t1048) which looks like a real error. Therefore the test got moved to neg. Conflicts: src/dotty/tools/dotc/typer/Applications.scala test/dotc/tests.scala tests/disabled/t1048.scala
| * Renamed parameters in Typer&Applictaions.Dmitry Petrashko2014-09-231-29/+0
| | | | | | | | Indicating that pt is type of selector is this pattern match makes it easier to follow.
| * Disabling patmat tests failing due to typer.Dmitry Petrashko2014-09-231-0/+29
| |
| * All pat-mat specific tests succeed now.Dmitry Petrashko2014-09-171-0/+0
| | | | | | | | | | Except t1048 which infers incorrect type in typer, patmat creates a tree that computes a more precise one that fails to typecheck Disabling erasure due to dozens of "Type BLA is illegal after erasure" errors.
| * More complicated tests for patmatDmitry Petrashko2014-09-171-12/+30
| |
| * Several fixes to patmat.Dmitry Petrashko2014-09-171-12/+12
| | | | | | | | Now patmat passes tests but erasure fails.
| * More complicated patterns.Dmitry Petrashko2014-09-171-0/+24
| |
| * New phase: CapturedVarsMartin Odersky2014-09-121-0/+25
| | | | | | | | Breaks out boxing functionality of captured vars from lambda lift.
| * Handle return in tailcalls.Martin Odersky2014-09-121-0/+5
| | | | | | | | | | Avoids characterizing the "from" link in a return as a tail call reference.
| * Better tests and more fixes for ExplicitOuterMartin Odersky2014-09-061-0/+14
| | | | | | | | | | | | Now also testing that after erasure no outer this exists. Tests suit now includes calls to local classes and methods which need an outer pointer, as well as passing an outer pointer along a secondary constructor.
| * Bring back blockescapes test...Martin Odersky2014-09-061-0/+0
| | | | | | | | ... by reverting a premature optimization in Erasure.
| * Partially reverting of 08c6eacaMartin Odersky2014-09-053-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partial revert of 08c6eaca "this type is a term ref to the source module". The problem with doing this is that it introduces spurious outer references. An inner module that contains self referenves always needs the directly enclosing class. The revert avoids this dependency by making ThisTypes always point to TypeRefs. Several other changes were necessary to make the builds pass: TypeRefs had to get prefixes after erasure so that they can be reloaded. Symbols of such typerefs had to be retrieved without forcing a denotation. One test (blockescapes.scala) fails and is moved to pending, awaiting further resolution. Also two other new tests in pending which currently fail (and have failed before).
| * Add outer parameters in constructor calls.Martin Odersky2014-08-311-6/+6
| | | | | | | | | | 1) Constructors of inner classes get outer parameters 2) Outer arguments are passed as needed.
| * New phase: outerAccessorsMartin Odersky2014-08-311-0/+48
| | | | | | | | | | | | | | | | The new phase replaces attachOuter. It creates outer accessors where needed but does not yet define outer parameters or pass outer arguments. It should run before pattern matcher, so that pattern matcher can access the outer fields of scrutinees.
| * Fixes to erasure to make -Ycheck:all work.Martin Odersky2014-08-283-0/+22
| | | | | | | | | | | | | | | | Main change: Introduce JavaArrayType as a new type constructor for Java erased array. Translate all methods of Array class during erasure to primitive operations on arrays. Some other small fixes for more localized problems.
| * Special context for self constructor argsMartin Odersky2014-08-242-0/+15
| | | | | | | | | | Arguments to this(...) calls need a special contet, similar to - but different from - the supercall context.
| * Check that idents don't assume magic.Martin Odersky2014-08-241-1/+5
| | | | | | | | | | | | In TreeChecker, make sure that every identifier has a type with an elidable prefix. This excludes identifiers pointing to members of random prefixes without making the prefix explicit in the tree as part of a Select node.
| * Make ElimByName change owners of by-name parametersMartin Odersky2014-08-181-0/+21
| | | | | | | | | | | | | | | | | | By-name parameters did not have their owner changed before. This was not noticed in treecheck because the method generated for the closure did not have its Method flag set by accident, so owmer checking ignored the new val. Once the Methgod flag was set, owner checking failed. Once changeOwner was added, a whole lot of other things failed, which led to the fixes in the previous commits.
| * Split Nullarify functionality to ElimByName, ErasureMartin Odersky2014-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | New phase ElimByName elimintaes by-name parameters. All other occurrences of parameterless methods and ExprTypes are eliminated in erasure. The reason for the split like this is that it is very hard for Nullarify to determine when to insert ()'s. The logic for this is fragile because we need to look at previous denotations which might not exist (before splitter) or might result from a merge between parameterless and nullary methods. In Erasure the same is much simpler to achieve.
| * Fix and enable RefChecksMartin Odersky2014-08-137-46/+49
| | | | | | | | RefChecks is now enabled. Some of the tests had to be fixed to be refchecks-correct.
| * Re-enabled checkbounds testsMartin Odersky2014-08-081-2/+2
| | | | | | | | | | | | | | | | Now that F-bunded types are treated more robustly, we can check bounds for non-emptyness during Typer. This unvealed one wrong test (wonder how that passed scalac?), which got moved to neg.
| * Detect cycles and protected legal ones with LazyRefsMartin Odersky2014-08-081-0/+4
| | | | | | | | | | | | | | | | | | | | Cycles are now detected early, when an info is first completed. Legal, f-bounded cycles are broken by a LazyRef, which will construct its type lazily. This makes checkBounds validation of AppliedTypeTrees work (in FirstTransform). Formerly, this stackoverflowed despite the laziness precautions in findMember. Todo: Do the same for class files coming from Java and Scala 2.x.
* | Fix isSubType(A#X, B#X) not checking if A <: BGuillaume Martres2014-10-051-0/+13
| |
* | Fix #167Martin Odersky2014-08-271-0/+12
|/ | | | Can handle now vararg arguments in patterns.