aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Moved pending tests that work into pos and neg.Martin Odersky2014-11-171-0/+2
| | | | | | | One test (t2613) required lifting a hard recursion limit in findMember (used for debug only, will be removed in the future). The same test also requires -Yno-deep-subtypes to be reset, so it's in pos_special instead of pos.
* Added methods to prepare-for and transform a complete compilation unit tree.Martin Odersky2014-11-121-5/+5
| | | | Should replace destructive inits.
* Merge pull request #220 from dotty-staging/refactor/DefTreesDmitry Petrashko2014-11-113-15/+15
|\ | | | | Refactor/def trees
| * Drop modifiers as separate data from MemberDef treesMartin Odersky2014-11-103-15/+15
| | | | | | | | Typed MemberDef trees now take the modifiers from their symbol's data.
* | Fix subtyping checks involving ThisType and PolyParamGuillaume Martres2014-11-111-0/+1
|/
* Merge pull request #217 from dotty-staging/transform/mixinDmitry Petrashko2014-11-101-1/+1
|\ | | | | Transform/mixin
| * Merge memoize with miniphases following it into one group.Martin Odersky2014-11-091-1/+1
| |
| * Reinstantiated full tests.Martin Odersky2014-11-091-2/+2
| | | | | | | | | | The fix to Types in 9bb35512 (Retract of optimization in computeDenot) allowed the two tests to compile "twice" again.
| * New Mixin scheme.Martin Odersky2014-11-091-2/+2
| | | | | | | | | | | | | | Split into two phases, ResolveSuper before Erasure and Mixin after. Likewise GettersSetters is split into Getters and Memoize. All tests pass, except two tests fail when compiled twice. Will investigate next why.
| * Improved version of mixin.Martin Odersky2014-11-091-1/+1
| | | | | | | | | | 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-091-1/+1
|\| | | | | Transform/private to static
| * New phase: RestoreScopesMartin Odersky2014-11-091-1/+1
| | | | | | | | | | | | | | | | Cleans up after LambdaLift and Flatten. RestoreScopes exhibited a problem (double definition) when compiling Unpickler. The root of the problem was in Applications.scala. The effect was that arguments woulkd be lifted out, but then the argument expression would be used anyway. That caused a closure to be present twice which caused the double def error much later. -Ycheck did not catch it because the two closure expressions were in non-overlapping scopes.
| * New miniphase: FlattenMartin Odersky2014-11-091-1/+1
| |
* | Detect cycles involving types bounded by singleton typesGuillaume Martres2014-11-061-0/+2
|/ | | | This fixes #193.
* Merge pull request #180 from smarter/fix/nosymbol-subtypingodersky2014-11-061-1/+1
|\ | | | | Fix subtyping of types without symbols
| * Fix subtyping of types without symbolsGuillaume Martres2014-10-091-1/+1
| |
* | Fix treatment of by name functionsMartin Odersky2014-10-271-4/+1
| | | | | | | | | | | | | | By-name functions like `(=> T) => T` were not treated correctly before. Witness the disabled `-Ycheck:gettersSetters` for transform/TreeCheckers in thge test suite. This commit changes the scheme how => T types are treated and fixes the problems with by-name functions.
* | Better tests and bugfix for named argsMartin Odersky2014-10-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original problem was that in an expression f(x = bar(y = z)) only the outer named arg was eliminated by FirstTransform. The first error was that the postcondition in FirstTransform did not get to the named arg, because it got called from the overrdden typed method in TreeChecker, yet function arguments were evaluated with typedUnadapted. action: change Retyper and TreeChecker to override typedUndapped instead of typed. This flushed out the second error: transformOther in FirstTransform needs to recursively transform the argument of a NamedArg, because the framework itself does not handle NamedArg nodes. Now, all tests pass except that TreeChecker itself fails -Ycheck:gettersSetters due to a problem with handling by-name function types. This should be fixed in a separate PR.
* | Almost all tests pass -Ycheck:lambdLiftMartin Odersky2014-10-261-2/+5
| | | | | | | | | | | | | | | | | | | | Only exception: dotc/transform. This seems to be for two reasons: 1) The call-by-name functions used in Decorator#foldRightBN cannot be translated correctly at their use points. 2) An anonymous function in Constructors are not correctly lifted. 2) could be related to missing/duplicated symbols in pattern matcher. I'll follow up with a commit that points these out.
* | Avoid hoisting local classesMartin Odersky2014-10-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | More refined printing optionsMartin Odersky2014-10-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using RefinedPrinter we now have a choice whether when printing a definition tree such as def foo(x: T): U we print the parameter and result type info found in the tree or in the symbol. Previously, we printed the sym info when after typer and the tree info before. This turns out to be too inflexble. With the patch, we print the sym info if option -Yprint-syms is set, and the tree info otherwise. Also, align -Yno-deep-subtypes from camelCase to standard hyphenated option notation. Tweak where unique ids are printed.
* | Adaptations to make pattern matcher in new worldMartin Odersky2014-10-121-8/+4
| | | | | | | | | | | | | | | | | | | | Tests now always include erasure (before quite a few tests failed when erasure was enableed). By contrast lazy vals creates problems with erasure, disabled for now. Some other small polishings on integration of pattern matcher with rest of dotc. Deep recompilation of tools still fails, currently disabled.
* | Fix typing of _* patterns.Martin Odersky2014-10-121-0/+1
| | | | | | | | And bring back two tests for typing of patterns
* | Add possibility to compile all files in a directory and all subdirectories.Martin Odersky2014-10-122-3/+7
| | | | | | | | | | We better make this configurable. Because sometimes we want to compile only the files in the immediate directory.
* | Add constructors phaseMartin Odersky2014-10-111-7/+1
| |
* | Merge pull request #174 from dotty-staging/rebDmitry Petrashko2014-10-116-53/+70
|\ \ | |/ |/| Pattern matcher
| * Cleanup tests.Dmitry Petrashko2014-10-111-11/+6
| |
| * Fix test suite to go deep in subdirectories.Dmitry Petrashko2014-10-111-1/+1
| |
| * Remove outdated tests.Dmitry Petrashko2014-10-111-2/+0
| | | | | | | | dotc_core_transform directory is empty. Files where moved while restructuring erasure.
| * Enable all testsDmitry Petrashko2014-10-111-0/+1
| |
| * Make productArity a synthetic method which can be overriddenMartin Odersky2014-10-111-2/+4
| | | | | | | | | | | | Like other synthetic methods, productArity will not be generated if an explicit definition is given. Used to be generated unconditionally in desugaring.
| * Make rejection of deep subtype call stack optionalMartin Odersky2014-10-111-3/+7
| | | | | | | | | | | | Move flag that throws exception on deep subtyping stacks from Config varianble to setting. Disable setting for core-pickling which had a deep subtype failure after pattern matcher was integrated. Todo: Figure out why the subtype stack got so deep.
| * Make changeOwner more robust regarding non-standard owner chainsMartin Odersky2014-10-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Patmat now succeeds tests.Dmitry Petrashko2014-09-231-17/+25
| | | | | | | | @odersky there are some tests disabled, which failed due to other phases being able to transform more code.
| * @odersky have a look.Dmitry Petrashko2014-09-231-7/+9
| | | | | | | | testOnly dotc.tests
| * Fix problem in unapply typing.Martin Odersky2014-09-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * All pat-mat specific tests succeed now.Dmitry Petrashko2014-09-171-8/+12
| | | | | | | | | | 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.
| * Several fixes to patmat.Dmitry Petrashko2014-09-171-5/+5
| | | | | | | | Now patmat passes tests but erasure fails.
| * New phase: CapturedVarsMartin Odersky2014-09-121-1/+1
| | | | | | | | Breaks out boxing functionality of captured vars from lambda lift.
| * Bring back blockescapes test...Martin Odersky2014-09-061-1/+1
| | | | | | | | ... by reverting a premature optimization in Erasure.
| * Partially reverting of 08c6eacaMartin Odersky2014-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| * New phase: outerAccessorsMartin Odersky2014-08-311-1/+1
| | | | | | | | | | | | | | | | 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.
| * Disabling two tests which failed.Martin Odersky2014-08-292-2/+2
| | | | | | | | I reiterate my suspicion that these tests are too specific. So far, all these test failures were spurious. They created work without giving a benefit.
| * Fixes to erasure to make -Ycheck:all work.Martin Odersky2014-08-281-3/+2
| | | | | | | | | | | | | | | | 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.
| * Fixes to erasureMartin Odersky2014-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | Makes erasure pass the test suite. Erasure is not yet turned turned on by default, because TestNonCyclic fails with a stale symbol error. The problem is that This types are coupled to Symbols and therefore don't reload. This is a problem is This types refer to static symbols that get recompiled. We either have to drop using This types for static references, or redefine thme so that can be reloaded.
| * Special context for self constructor argsMartin Odersky2014-08-241-1/+3
| | | | | | | | | | Arguments to this(...) calls need a special contet, similar to - but different from - the supercall context.
| * Rename in Phase: name -> phaseNameMartin Odersky2014-08-182-14/+14
| | | | | | | | | | Most transformations are subclasses of phase. Having a generic name like `name` in scope everywhere is therefore very risky.
| * Moved -Ycheck to last phase before erasureMartin Odersky2014-08-171-1/+1
| | | | | | | | | | This should set the foundation to turn debug erasure so that it can be turned on by default
| * Split Nullarify functionality to ElimByName, ErasureMartin Odersky2014-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Moved -Ycheck after SplitterMartin Odersky2014-08-161-1/+1
| | | | | | | | | | | | | | This required a change in Ycheck where we now only test that the new tree has a subtype of the old one. Previously the requirement was "same type" but this caused "sigs.scala" to fail because a new tree had a constant Int type where the old tree had just Int as the type. It's hard to guard against these narrowings and they look harmless.