aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * Changes to tree copyingMartin Odersky2014-08-132-20/+20
| | | | | | | | | | | | | | | | 1) Add copiers with default arguments, to avoid boilerplate 2) All copiers are now curried wrt first argument (which is the original tree). We already make use of the new features in cpy.DefDef, but not yet elsewhere.
| * Fix and enable RefChecksMartin Odersky2014-08-131-1/+1
| | | | | | | | RefChecks is now enabled. Some of the tests had to be fixed to be refchecks-correct.
| * Add SyntheticMethods miniphaseMartin Odersky2014-08-111-1/+1
| | | | | | | | | | New phase for Synthetic Method generation. Scala 2.x did it in Typer, but it's cleaner to do it in a separate phase.
| * Disentangle phases from treetransformsMartin Odersky2014-08-091-8/+8
| | | | | | | | | | | | | | | | TreeTransforms are no longer phases. This allows to generate new transforms in prepare... methods without running into the problem that thee new transforms are undefined as phases. It also makes for a cleaner separation of concerns.
| * Re-enabled checkbounds testsMartin Odersky2014-08-081-0/+1
| | | | | | | | | | | | | | | | 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.
* | Fix isSubType(A#X, B#X) not checking if A <: BGuillaume Martres2014-10-051-0/+1
|/
* Enabled variance checkingMartin Odersky2014-08-031-0/+2
| | | | | | | Variance checking is now run as part of type-checking. Fixed tests that exhibited variance errors. Added tests where some classes of variance errors should be detected.
* Move Ycheck after tailrecDmitry Petrashko2014-07-221-1/+2
| | | | Hurray!
* fix/148Martin Odersky2014-07-201-0/+1
| | | | Fixed typo in Splitter. Closes #148.
* Make ExtensionMethods not rely on TailRecMartin Odersky2014-07-171-2/+2
| | | | | | | | | | | | | | This acommit allows TailRec to run after ExtensionMethods. This is due to the following changes: 1) Extension methods now "rewire" calls to other extension methods of the same class, so that they go directly to other extension methods instead of to the original method in the class. 2) Tailrec annotations get removed from original method and get added to the extension method instead. With this commit all tests can be re-enabled again.
* Enabled ExtensionMethodsMartin Odersky2014-07-171-1/+1
| | | | | | | | | Fixed extension methods so that it now runs and passes the build. Also enables ElimRepeated, which is a prerequistite for ExtensionMethods. Exception: Tailrec is currently disabled, because it needs to run before ExtensionMethods but it fails the -Ycheck test. Therefore the current tests skip this phase.
* Move valueclass functionality into its own ValueClass module.Martin Odersky2014-07-171-1/+0
|
* ExtensionMethods phase and TypeUtilsMartin Odersky2014-07-171-2/+1
| | | | | | | | | | | | New phase for extension methods. Also, split off some type handling functionality that can be used elsewhere in new TypeUtils decorator. The idea is that TypeUtils should contain methods on Type that make sense specifically for transformations. That way, we can keep Types from growing. Might make sense to do similar decorators for Denotations as well. There's a bug fix in MacroTransform: Need to treat selfInfo varDels specially, since they have no symbol.
* Changed PostTyperTransformer schemeMartin Odersky2014-07-173-6/+8
| | | | | | | | | | | | 1) We now always generate companion objects for classes. This is done in mini-phase "companions", which also assures that companion-modules appear after companion-classes. 2) PostTyperTransformers is gone; the part which normalizes trees has been rolled into TreeTransform and the part which reordered companion classes and modules is now in Companions. Note: Some tests were deisabled; should be re-enabled by Dmitry where needed.
* Added phase: SuperAccessorsMartin Odersky2014-07-171-1/+1
| | | | | Rewrote SuperAccessors (more to be done; see comments), and added stuff here and there to make it work smoother.
* Phases in tests now also have valid periods.Dmitry Petrashko2014-07-164-0/+23
|
* Handling higher-kinded types with lambdasMartin Odersky2014-06-181-2/+1
| | | | | Switch to the new scheme where higher-kinded types (and also some polymorphic type aliases) are represented as instances of Lambda traits.
* Change definition of isLegalPrefix so that it allows projecting on an ↵Martin Odersky2014-06-121-0/+1
| | | | | | | | | | | | | | abstract type. This is needed to make the encoding og higher-kinded types work. E.g. Rep[Int] would be represented as Rep { type Arg$0 = Int } # Apply where Apply is an abstract member of the base class Lambfa$I of Rep.
* Reclassifying testsMartin Odersky2014-05-301-0/+1
|