aboutsummaryrefslogtreecommitdiff
path: root/test/dotc/tests.scala
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* 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-161-0/+1
| | | | | | | 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.
* 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
| | |
| * | Revise alias rules in type comparisons.Martin Odersky2015-12-151-2/+0
| | | | | | | | | | | | The fix solves two cases where we had a deep subtype before.
* | | Merge pull request #1007 from dotty-staging/fix/tests-ycheckDmitry Petrashko2015-12-211-1/+1
|\ \ \ | |/ / |/| | Fix typo in command run by Jenkins
| * | Fix typo in command run by JenkinsGuillaume Martres2015-12-211-1/+1
| |/ | | | | | | The effect of this typo was that Ycheck:tailrec was never run on Jenkins.
* | Check types for overriding conditions.Martin Odersky2015-12-141-1/+1
| | | | | | | | Closes #241 -- that took a while!
* | Better diagnosis for cyclic references caused by class clashes.Martin Odersky2015-12-141-1/+2
| | | | | | | | | | | | | | We now get a cyclic reference when inheriting from an inner class with the same name in an outer supertype. Since this was legal in Scala2 it's good to explain that particular case. Test case in overrideClass.scala
* | Make some types of definitions symbolicMartin Odersky2015-12-141-1/+1
| | | | | | | | | | | | | | | | | | This is needed to ensure that the type of a definition node (ValDef, TypeDef, or DefDef) always refers to the symbol of that definition. Caused a spurious error in selfReq to go away (so error count was updated).
* | Allow deep subtype for sets and related code in dotty/transform.Martin Odersky2015-12-131-2/+3
| | | | | | | | | | The change in subtyping led to a deep subtype recursion for sets.scala. It seems legit, so the -Yno-deep-subtypes check is disabled.
* | Disallow hk type parameters in lower bounds.Martin Odersky2015-12-111-0/+1
| | | | | | | | Also: various cleanups to comments.
* | Disallow existentially bound parameters as type parametersMartin Odersky2015-12-061-0/+1
|/ | | | | | | Done in order to keep the basics as simple as possible. Treating existentially bound parameters as still instantiatable type parameters does not seem to add anything fundamental, and makes the type system less regular.
* Indicate regex used for filtering out benchmarks.Dmitry Petrashko2015-12-021-1/+1
|
* Add tests for dotc.core pickling/unpicklingVladimirNik2015-12-021-0/+13
|
* Removed tasty_dotc_reporting test due to issue #986VladimirNik2015-12-011-1/+1
|
* Add pickling/unpickling of stable modifierVladimirNik2015-11-271-0/+1
| | | | | Pickling/unpickling of STABLE modifier allows to fix problem with unpickling of path-dependent types (#982)
* New tests for tastyVladimirNik2015-11-201-0/+7
|
* Fixed != comparisonSimon Hafner2015-11-201-1/+1
| | | | | | By linter: comparing values of types Char and String using `!=' will always yield true
* Flag trailing `_' following non-function as an errorMartin Odersky2015-11-161-0/+1
| | | | | | | | If `x` is not a function or method, then `x _` should be disallowed. scalac accepts this and converts it to () => x instead. I'd like to drop this because it's unnecessary and non-obvious. If -language:Scala2 is on, the behavior is like Scala 2's but a migration warning is issued.
* Merge pull request #927 from dotty-staging/stdlib-boundsodersky2015-11-091-0/+1
|\ | | | | Drop checking that lower bound is a subtype of upper bound.
| * Check bounds of inferred typevars in PostTyper.Martin Odersky2015-11-051-0/+1
| |
| * Drop neg testMartin Odersky2015-11-051-1/+0
| |
* | Drop neg testMartin Odersky2015-11-051-1/+0
| |
* | Turn on -language:Scala2 -migration when compiling stdlibMartin Odersky2015-11-051-1/+1
| | | | | | | | needed to turn some errors into warnings.
* | Handle variance unsoundness in scalacMartin Odersky2015-11-051-0/+2
|/ | | | | | | | | | | | | | | | | The included test pos-special/variances-constr.scala demonstrates an unsoundness in the variance checking of scalac. Scalac excludes symbols owned by constructors from the checking. This is unsound, as can be demonstrated by compiling the test and observing output of the program run: Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at Test$.main(variances-constr.scala:17) at Test.main(variances-constr.scala) Dotty allows this code only under -language:Scala2 and issues a migration warning.
* Merge pull request #900 from dotty-staging/fix-#871odersky2015-11-051-1/+5
|\ | | | | Deal gracefully with missing return types of abstract menthods.
| * Deal gracefully with missing return types of abstract menthods.Martin Odersky2015-11-011-1/+5
| | | | | | | | | | | | | | 1) Better error message: "missing return type" instead of `=' expected. 2) Allow them under language:Scala2 Fixes #871
* | Ouch... remove comment that broke compilation.Dmitry Petrashko2015-11-021-1/+0
| |