aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Narrow problematic constraint instead of widening it.Martin Odersky2016-02-051-8/+22
|
* Fix docs and namingMartin Odersky2016-02-052-6/+9
|
* Prune constraints that could turn into cyclesMartin Odersky2016-02-053-3/+65
| | | | Fixes #864. Review by @smarter.
* Merge pull request #1052 from smarter/fix/driver-apiGuillaume Martres2016-02-0510-71/+86
|\ | | | | Improve and document the Driver#process API, fix partest logging
| * Use Context#setReporter where possibleGuillaume Martres2016-02-051-2/+1
| |
| * Context: set compilerCallback like other context variablesGuillaume Martres2016-02-042-16/+7
| | | | | | | | | | | | Previously, we could set compilerCallback on non-fresh contexts, but there is no reason that this should be allowed, and this is not done anymore in the code since the last commit.
| * Better compiler entry pointsGuillaume Martres2016-02-043-18/+51
| | | | | | | | | | | | | | | | | | - 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
| * Compiler: use the reporter passed from the DriverGuillaume Martres2016-02-042-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | With this commit and the previous one, partest should finally correctly log the output of the compiler and display it at the end of its execution if compilation failed. Also make sure the initial Reporter in a Context is _not_ a ThrowingReporter. Previously, the initial Reporter was always overriden in Compiler by rootReporter so it had no effect, but this is not the case anymore, and the negative junit tests fail with the ThrowingReporter since they throw an exception instead of exiting with a certain number of errors.
| * Driver: properly use root Context passed as argumentGuillaume Martres2016-02-043-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Reporter: make summary available without a ContextGuillaume Martres2016-02-041-5/+16
| |
| * ConsoleReporter: remove unused argument ctxGuillaume Martres2016-02-044-4/+4
|/
* Merge pull request #1022 from dotty-staging/fix-i939Dmitry Petrashko2016-01-243-6/+13
|\ | | | | Fix #939. Allows IntMap and LongMap to compile
| * Add IntMap and LongMap to collections whitelist.Dmitry Petrashko2016-01-241-5/+3
| |
| * Test that #939 is fixedDmitry Petrashko2016-01-241-0/+8
| |
| * Fix i939: Patmat shouldn't compare selectors to module TypeTrees.Dmitry Petrashko2016-01-241-1/+2
|/ | | | | | | | It would be great to augment Ycheck to ensure that some trees are not permitted, e.g. TypeTree cannot be a stat in a block or a receiver of a call. Currently this is `ensured` by backend by failing.
* Merge pull request #1039 from dotty-staging/fix-#998Guillaume Martres2016-01-232-3/+28
|\ | | | | Fix #998
| * Fix #998Martin Odersky2016-01-202-3/+28
| | | | | | | | Needed a fix in approximateUnion.
* | Merge pull request #1038 from dotty-staging/fix-#1037Guillaume Martres2016-01-236-8/+23
|\ \ | | | | | | Fix #1037
| * | Extend testMartin Odersky2016-01-192-0/+7
| | | | | | | | | | | | | | | We verified that before the combination abstract/concrete for `x` also led to AMEs. So we test it here explicitly, too.
| * | Perform isCurrent at transform phaseMartin Odersky2016-01-191-3/+8
| | | | | | | | | | | | instead of the one after it. Fixes problem with t7475b.scala
| * | Small refactoringMartin Odersky2016-01-191-2/+5
| | |
| * | Don't force symbol denotation when taking fingerprint.Martin Odersky2016-01-192-2/+2
| | |
| * | Avoid repeated evaluations of parentIsYounger.Martin Odersky2016-01-191-1/+1
| |/
* | Merge pull request #1040 from dotty-staging/fix-#1036Guillaume Martres2016-01-232-1/+18
|\ \ | |/ |/| Fix #1036
| * Fix #1036Martin Odersky2016-01-202-1/+18
|/ | | | Achieved by tweaking from where we get the parameter types of an eta-expansion.
* Merge pull request #1014 from dotty-staging/fix/deep-subtypesGuillaume Martres2016-01-1812-53/+248
|\ | | | | Check all bounds and avoid infinite subtyping checks when intersecting denotations
| * Check AppliedTypeTrees bounds inside AppliedTypeTreeGuillaume Martres2016-01-183-7/+16
| |
| * Avoid infinite subtyping checks when intersecting denotationsGuillaume Martres2016-01-183-13/+33
| | | | | | | | This allows us to run compileStdLib without deep subtypes again.
| * Adapt and add testsMartin Odersky2016-01-184-10/+147
| | | | | | | | | | New test that exhibited the problem is ski.scala. Previously this did not fail with a bounds violation.
| * Avoid caching the wrong bounds in TypeRefsMartin Odersky2016-01-181-1/+16
| | | | | | | | | | Checking bounds everywhere revealed a problem in compileStdLib, which this commit fixes.
| * Check bounds everywhereMartin Odersky2016-01-183-29/+35
| | | | | | | | | | | | | | | | Previously, bounds of a TypeDef tree were not checked. We now make sure bounds are checked everywhere in PostTyper. The previous partial check in Applications gets removed (it was not complete even for TypeApplications because sometimes bounds were not yet known when the test was performed.)
| * Keep rhs of TypeDef in typed treeMartin Odersky2016-01-182-2/+10
|/ | | | | This is important for IDEs who want to see the full tree. The tree now gets replaced by a TypeTree in PostTyper.
* Merge pull request #1020 from dotty-staging/fix/tvar-ephemeralodersky2016-01-182-1/+4
|\ | | | | Fix caching bug: don't assume that tvars instantiation cannot be retracted
| * Fix caching bug: don't assume that tvars instantiation cannot be retractedGuillaume Martres2016-01-172-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When TypeVar#inst is empty but an instantiation exists in the typer state, we should set ephemeral to true, because this instantiation will be retracted if we throw away the current typer state. This makes hkrange.scala pass, it compiled before but the type parameter of `f` was inferred to be `Nothing` because of this bug, and this failed Ycheck. For anyone who wonders how caching bugs manifest themselves, here's what happened in details in hkrange.scala: 1. In an ExploreTyperState we set `CC` to be `IndexedSeq` in the constraint set 2. In that same typer state the TypeRef `CC[Int]` (it's a TypeRef because `CC` is a type lambda) gets the denotation `IndexedSeq[Int]`, which is correct, but the denotation is cached since `ephemeral` is false, which is wrong. 3. Later, we retract the ExplorerTyperState, so `CC` is uninstantiated again and unconstrained. 4. Then we do the subtyping check `CC[Int] <:< IndexedSeq[Int]`, because the denotation of `CC[Int]` was cached, this returns true, but `CC` stays unconstrained. 5. This means that when we instantiate `CC`, we get `Nothing` After this fix, the TypeRef denotation is no longer cached, so when we do `CC[Int] <:< IndexedSeq[Int]`, `CC` gets constrained as expected.
* | Merge pull request #1035 from dotty-staging/upgrade/partest-1.0.11Dmitry Petrashko2016-01-181-1/+1
|\ \ | |/ |/| Upgrade scala-partest to 1.0.11
| * Upgrade scala-partest to 1.0.11Guillaume Martres2016-01-171-1/+1
|/ | | | First step in fixing #1034
* Merge pull request #1033 from dotty-staging/disable/t7880odersky2016-01-171-0/+1
|\ | | | | Stop crashes because we're out of memory by disabling t7880
| * Stop crashes because we're out of memory by disabling t7880Guillaume Martres2016-01-171-0/+1
|/ | | | | | | | | | | | | | | | All of our recent memory-related tests failures since https://github.com/lampepfl/dotty/pull/1030 was merged seem to be caused by t7880.scala. It tries to intentionally trigger an OutOfMemoryError, however since we don't pass -Xmx to our run tests it's possible that this we fill up the memory of our host before we reach the maximum heap size of the JVM. Ideally, we would specify a -Xmx for run tests (scalac uses 1 GB), unfortunately in the version of partest we use this is tricky because we need to set the system property "partest.java_opts". If we upgrade our partest to the latest release, we can instead specify it by setting the argument `javaOpts` of the constructor of `SuiteRunner`, see https://github.com/scala/scala-partest/commit/7c4659e1f88b410109ad3c4e7f66ae7070c6e985
* Merge pull request #1021 from dotty-staging/fix/procedure-migrationodersky2016-01-171-1/+1
|\ | | | | Improve migration message for Scala 2 procedures
| * Improve migration message for Scala 2 proceduresGuillaume Martres2016-01-141-1/+1
| | | | | | | | | | | | It's not correct to just add `=` you also need to specify the return type to be `Unit` otherwise things may not work as expected, this is especially important for a `main` method.
* | Merge pull request #1031 from dotty-staging/change-early-typeparams3odersky2016-01-1714-27/+89
|\ \ | | | | | | Change early typeparams, take 3
| * | Always eta-expand AppliedTypeTrees argumentsGuillaume Martres2016-01-162-2/+2
| | | | | | | | | | | | This makes compileIndexedSeq pass again.
| * | Compute type params in namer without completing the whole infoMartin Odersky2016-01-166-15/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-165-7/+18
| | | | | | | | | | | | | | | | | | | | | 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.
| * | Make skolems uncachedMartin Odersky2016-01-161-2/+2
| | | | | | | | | | | | | | | | | | There was no reason in the first case to cache them, as their equality is reference identity. Maybe this fixes the OOM errors we encounter.
| * | 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.
| * | Increase the maximum heap size on JenkinsGuillaume Martres2016-01-161-1/+3
|/ / | | | | | | | | | | | | | | We're getting a lot of OutOfMemoryException when the maximum size is 1 GB, but we cannot increase it too much without using up all the memory available on the Jenkins instances, let's see if 1.1 GB is enough. Also stop using a custom -Xss, the default of 1 MB should be good enough.
* | Merge pull request #1029 from dotty-staging/fix/partest-outputodersky2016-01-161-1/+4
|\ \ | |/ |/| partest: Print stack traces of swallowed exceptions
| * partest: Print stack traces of swallowed exceptionsGuillaume Martres2016-01-151-1/+4
|/