| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Fix wording so that it works for nested errors as well.
Incorparte Tiark's latest example.
|
|
|
|
|
|
| |
Reason: They might be overridden by other lazy vals
that are not realizable, and therefore risk creating
bad bounds.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
EffectivelyFinal came without documentation, so it was not clear
what is was supposed to compute. I looked at the use sites, and it
seems that all they need is "impossible to override". So I changed
the code to do that and dropped the additional condition that
members of modules or final classes were not allowed to be lazy or
mutable. It was not clear to me what that had to do with finality.
|
|
|
|
| |
Types is already big enough.
|
|
|
|
|
|
| |
Distinguish between isStable and isRealizable.
Issue migration warnings for realizibility failures.
Provide error diagnostics why something is not realizable.
|
|
|
|
| |
Fixes #50.
|
|
|
|
| |
This prepares the way for using isRealizable in different contexts.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
Fix #1045
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The test checks that Scala collections perform within 10x of Java collections.
That's not something we need to test for dotty. And because of the heavily
parallel execution of the tests it does not always hold. This is the second
time in a a month that this particular test failed on jenkins. I think we lost
enough cycles on it.
|
| | |
|
| |
| |
| |
| |
| | |
See comment in Typer#approximateUnion for an explanation.
Fixes #1045.
|
| |
| |
| |
| |
| | |
This gives in general a supertype, that's OK for approximation.
See ee76fda for an explanation.
|
|\ \
| | |
| | | |
Fix #1065 erasedLub for arrays of primitives.
|
| | | |
|
| |/
| |
| |
| |
| |
| | |
Unlike arrays of objects, that can be accessed as an array
of a super type of this object,
int[] cannot be accessed as an array of primitives.
|
|\ \
| | |
| | | |
Handle "missing args" case when expected type is a singleton type.
|
| | |
| | |
| | |
| | | |
Fixes #803.
|
|\ \ \
| | | |
| | | | |
Hide stack traces behind -Ydebug
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead, a new setting called -Yplain-printer is used for this.
After this commit, we can now run all tests with -Ydebug (this was not
the case before because using the plain printer breaks -Ytest-pickler)
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This makes the compiler extremely slow. To store the trace, you now need
to pass -Ytrace-context-creation
|
| | | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
They're not very useful for end users and some tests like
tests/neg/selfreq.scala always print these exceptions which makes it
harder to read the test logs,
Also use Thread.dumpStack() instead of creating an Exception and calling
printStackTrace() on it.
|
|\ \ \
| | | |
| | | | |
Third try for a fix for #1044: handle TypevarsMissContext mode in wildApprox
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When `wildApprox` encounters a PolyParam it approximates it by its
bounds in the current constraint set, but this is incorrect if
`TypevarsMissContext` is set, we might get the bounds of another use of
this `PolyType`. This is exactly what happened in i1044.scala where the
implicit view `refArrayOps` needs to be used twice with two different
type parameters.
The fix is to approximate a PolyParam by its original bounds in its
PolyType if `TypevarsMissContext` is set.
This fix was inspired by the approach of #1054.
|
|\ \ \
| | | |
| | | | |
Force the initialization of throwMethod in Definitions
|
| |/ / |
|
|\ \ \
| |/ /
|/| | |
Fix #859
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
Instead of forcing again, and causing an assertion error, back out
assuming that the result is false. Fixes first problem with #859.
|
|/ /
| |
| |
| |
| | |
It's slightly more efficient. There was no need to have
a separate cache for the lazy val.
|
|\ \
| |/
|/| |
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.
|