aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
| * Check named type params for welformedness rules.Martin Odersky2016-02-191-0/+1
| |
* | Merge pull request #1106 from dotty-staging/neg-linesDmitry Petrashko2016-02-191-3/+133
|\ \ | |/ |/| Neg tests check files for // error markers (rebased and updated)
| * Neg tests: filename checking updatedVladimirNik2016-02-181-1/+1
| |
| * Restructured JUnit neg testsvsalvis2016-02-181-50/+107
| |
| * Negtests (JUnit only) check that each error line has a // errorvsalvis2016-02-181-3/+76
| |
* | Merge pull request #898 from dotty-staging/add/auto-uncurryodersky2016-02-181-0/+1
|\ \ | |/ |/| Implement auto tupling of function arguments
| * Strengthen requirement for auto-tuplingMartin Odersky2016-02-161-1/+1
| | | | | | | | | | | | | | Was: corresponding parameter types "are compatible". Now: corresponding parameter types "conform". This avoids the inconsistency mentioned by @retronym in #897.
| * Auto-uncurry n-ary functions.Martin Odersky2016-02-161-0/+1
| | | | | | | | Implements SIP #897.
* | Add checks for value classes:VladimirNik2016-02-161-0/+1
|/ | | | | 1. Add errors in case of incorrect parameter; 2. Improvement to error message if value class is defined as a local class;
* Merge pull request #1076 from dotty-staging/fix/run-tests-memoryDmitry Petrashko2016-02-122-2/+11
|\ | | | | partest: run tests with -Xms64M -Xmx1024M instead of JVM defaults
| * partest: run tests with -Xms64M -Xmx1024M instead of JVM defaultsGuillaume Martres2016-02-112-2/+11
| | | | | | | | | | | | This is the same settings that scalac uses, this should help use avoid using too much memory (the default on 64 bits Linux seems to be -Xms248M -Xmx3938M).
* | Merge pull request #1081 from dotty-staging/fix-#645Dmitry Petrashko2016-02-121-0/+1
|\ \ | | | | | | Add test case for #645
| * | Add test case for #645Martin Odersky2016-02-121-0/+1
| |/
* / Survive class of errors in implicit searchMartin Odersky2016-02-121-0/+1
|/ | | | | | | | An `C.this` term with erroneous class `C` will get a `NoPrefix` type. A subsequent implicit search on this crashed. This is fixed now. Fixes #324.
* By-name parameters are not stable values.Martin Odersky2016-02-091-2/+2
|
* Big realizability refactoringMartin Odersky2016-02-091-6/+7
| | | | | | | Move logic from TypeOps to new file CheckRealizable.scala. Also check realizable fields under strict mode. Check at phase PostTyper rather than Typer to avoid cycles. New tests for imports and deep paths.
* Handle paths of length > 1 for realizability checkingMartin Odersky2016-02-091-1/+1
|
* Drop lines from testMartin Odersky2016-02-091-2/+2
| | | | | | | The lines in question now cause an error ("cannot be instantiated...") which masks the real tests at phase PostTyper. Also adapt bugcount of hklower test
* Check that non-abstract classes have realizable bounds.Martin Odersky2016-02-091-1/+1
|
* Handle imports in path checks.Martin Odersky2016-02-091-1/+1
| | | | | | | | | | If `T` is a member of `p` then { import p._; ... T ... } should be checked in the same way as { ... p.T ... }
* Fix path error disgnasticsMartin Odersky2016-02-091-1/+1
| | | | | Fix wording so that it works for nested errors as well. Incorparte Tiark's latest example.
* Only final lazy vals can be paths.Martin Odersky2016-02-091-1/+2
| | | | | | Reason: They might be overridden by other lazy vals that are not realizable, and therefore risk creating bad bounds.
* Enforce rule that laziness is preserved when overriding.Martin Odersky2016-02-091-2/+2
|
* Reorganize tests to account for new typing of projectionMartin Odersky2016-02-091-5/+6
| | | | | | Tests with failed projections are moved to pos-scala2, which was renamed from pos-special. Files in pos-scala2 are compiled with -language:Scala2 option.
* Also consider type aliases when checking for realizabilityMartin Odersky2016-02-091-0/+1
| | | | Fixes #50.
* Use isRealizable to identify stable prefixesMartin Odersky2016-02-091-1/+1
| | | | | | | Replaces isVolatile, which is too weak (and more complicated). Backwards compatibility with Scala2 is ensured by dropping the requirement in Scala2 mode. Fixes #1047, which now compiles without inifinite recursion.
* Merge pull request #1063 from dotty-staging/fix-#803Dmitry Petrashko2016-02-081-0/+1
|\ | | | | Handle "missing args" case when expected type is a singleton type.
| * Handle "missing args" case when expected type is a singleton type.Martin Odersky2016-02-051-0/+1
| | | | | | | | Fixes #803.
* | Surive non-existing sourceModule in Scala2 pickled info.Martin Odersky2016-02-051-0/+1
|/ | | | | | | | | It seems when unpickling nsc that some module classes come without a source module. Survive this situation rather than crashing. i859.scala is an example. i859 compiles with the patch, but causes a deep subtype when unpickling. Not sure whether scalac does the same.
* Better compiler entry pointsGuillaume Martres2016-02-041-8/+2
| | | | | | | | | - Document the entry points - It is now possible to set a custom reporter without using a custom context - Use `null` for optional arguments to make it easier to run the compiler using reflection or from Java. - DPDirectCompiler does not use a custom context anymore
* Driver: properly use root Context passed as argumentGuillaume Martres2016-02-042-6/+4
| | | | | | | | | | | | | | | Also CompilerTest no longer runs the compiler with the context DottyTest#ctx. Previously, we got away with this because Compiler#process ignored it and created a new Context, but this commit fixes this, and it is now very important that we use a different context for every test we compile. Since DottyTest#ctx was the only part of DottyTest we used, CompilerTest no longer extends DottyTest to make sure that we do not use it accidentally. If we want to use DottyTest as a base class for tests again, we will have to remove its implicit Context field first. Also do not try to initialize the definitions in the context used by partest, this is not necessary.
* Remove useless options in testsGuillaume Martres2016-02-042-14/+1
| | | | | | | | - Removed "-Xprint-types", it is only rarely needed and makes it very hard to read trees, enable it yourself if you need it. - Removed "-Ylog:<some", this does not seem to have any effect currently. - Removed "-pagewidth 90", this is overloaded in tests.scala to 160 anyway.
* ConsoleReporter: remove unused argument ctxGuillaume Martres2016-02-041-1/+1
|
* Add IntMap and LongMap to collections whitelist.Dmitry Petrashko2016-01-241-5/+3
|
* Check AppliedTypeTrees bounds inside AppliedTypeTreeGuillaume Martres2016-01-181-0/+1
|
* Avoid infinite subtyping checks when intersecting denotationsGuillaume Martres2016-01-181-1/+1
| | | | This allows us to run compileStdLib without deep subtypes again.
* Adapt and add testsMartin Odersky2016-01-181-3/+4
| | | | | New test that exhibited the problem is ski.scala. Previously this did not fail with a bounds violation.
* Always eta-expand AppliedTypeTrees argumentsGuillaume Martres2016-01-161-1/+1
| | | | This makes compileIndexedSeq pass again.
* Compute type params in namer without completing the whole infoMartin Odersky2016-01-161-0/+9
| | | | | | | | | Type params should be computed before computing the whole info of a type. Without the patch we get a cyclic reference in the compileMixed test. Note that compileIndexedSeq does not pass with this commit (it passed before), this is fixed in the next commit.
* Fix checkNonCyclic.Martin Odersky2016-01-162-1/+2
| | | | | | | Need to also look info refined types. Need to handle case where we hit a NoCompleter again. Fixes #974 and makes MutableSortedSetFactory in stdlib compile.
* Survive files that are not SFiles in CompilerTestMartin Odersky2016-01-161-1/+1
| | | | | | | I observed in a local partest a file with was a java.io.Path, not an SFile. They should be treated like SFiles. Not clear why this came up. The file in question (partest-generated/pos/Patterns_v1.scala) looked just like all the others that were read as SFiles.
* partest: Print stack traces of swallowed exceptionsGuillaume Martres2016-01-151-1/+4
|
* Merge pull request #1005 from dotty-staging/ycheck-erasure-arraysDmitry Petrashko2016-01-041-3/+1
|\ | | | | Ycheck that scala.Array is erazed to either Object or JavaArrayType.
| * Enable previously failing whitelist testMartin Odersky2015-12-211-3/+1
| |
* | Merge pull request #993 from dotty-staging/tasty-typer-testDmitry Petrashko2016-01-031-0/+7
|\ \ | | | | | | Add tests for dotc.typer pickling/unpickling
| * | Add tests for dotc.typer pickling/unpicklingVladimirNik2015-12-041-0/+7
| | |
* | | Fix #1009: Do not forget to skolemize some typesGuillaume Martres2015-12-241-0/+1
| | |
* | | Update test error countMartin Odersky2015-12-221-1/+1
| | | | | | | | | | | | | | | One error gest supporessed now because it has the same position as a previous one.
* | | Merge pull request #1001 from dotty-staging/change-distribute-orodersky2015-12-211-2/+1
|\ \ \ | | | | | | | | Change distribute or
| * | | Add test caseMartin Odersky2015-12-191-0/+1
| | | |