| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Fixes #864. Review by @smarter.
|
|\
| |
| | |
Improve and document the Driver#process API, fix partest logging
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
- 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.
|
| | |
|
|/ |
|
|\
| |
| | |
Fix #939. Allows IntMap and LongMap to compile
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Fix #998
|
| |
| |
| |
| | |
Needed a fix in approximateUnion.
|
|\ \
| | |
| | | |
Fix #1037
|
| | |
| | |
| | |
| | |
| | | |
We verified that before the combination abstract/concrete for `x`
also led to AMEs. So we test it here explicitly, too.
|
| | |
| | |
| | |
| | | |
instead of the one after it. Fixes problem with t7475b.scala
|
| | | |
|
| | | |
|
| |/ |
|
|\ \
| |/
|/| |
Fix #1036
|
|/
|
|
| |
Achieved by tweaking from where we get the parameter types of an eta-expansion.
|
|\
| |
| | |
Check all bounds and avoid infinite subtyping checks when intersecting denotations
|
| | |
|
| |
| |
| |
| | |
This allows us to run compileStdLib without deep subtypes again.
|
| |
| |
| |
| |
| | |
New test that exhibited the problem is ski.scala. Previously
this did not fail with a bounds violation.
|
| |
| |
| |
| |
| | |
Checking bounds everywhere revealed a problem in compileStdLib,
which this commit fixes.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|
|/
|
|
|
| |
This is important for IDEs who want to see the full tree.
The tree now gets replaced by a TypeTree in PostTyper.
|
|\
| |
| | |
Fix caching bug: don't assume that tvars instantiation cannot be retracted
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/| |
Upgrade scala-partest to 1.0.11
|
|/
|
|
| |
First step in fixing #1034
|
|\
| |
| | |
Stop crashes because we're out of memory by disabling t7880
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
Improve migration message for Scala 2 procedures
|
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Change early typeparams, take 3
|
| | |
| | |
| | |
| | | |
This makes compileIndexedSeq pass again.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/| |
partest: Print stack traces of swallowed exceptions
|
|/ |
|