| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a tricky interaction with caching of typed arguments in FunProto types
and backtracking using different typer states. We might end up with a typed
argument that is evaluated in one typer state and that is used in another. The
problem is that the argument typing might have inserted type variables (maybe
by adding polymorphic implicit views) that are not registered in the typer
state in which the application is finally typed. In that case we will see
an "orphan poly parameter" in pickling.
The fix is to discard argument types is their typerstate is not committed
to the one in which the application is finally typed. To apply the fix we
need to track
- for typer states: whether or not it was committed, and what its parent is.
- for function prototypes: the typer state in which an argument with cached type
was evaluated.
Test case is t1756.scala, which produced an "orphan poly parameter CI" before.
|
|\
| |
| | |
Refinements to auto-tupling
|
| |
| |
| |
| |
| |
| | |
- Delete redundant t2660 (exists elready in pos)
- Comment t1756
- Recategorize tryexpr
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's a nasty interaction with auto-tupling and trying to insert an implicit
on the qualifier of a call. If the original call fails, we need to "undo" any
auto-tupling decisions in calls where an implicit is inserted on the qualifier.
Also: Needed to fix canAutoTuple test so that Scala2 feature is checked instead of dotty's.
Also: Drop features in dotty.language that duplicate those in scala.language.
|
| |
| |
| |
| | |
Bring in line with comparisons. Fixes z1720 for good.
|
|/
|
|
|
| |
Needed to address problem shown by z1720.scala.
Another fix to avoidance is needed to make it pass completely.
|
| |
|
|
|
|
|
|
| |
Eta expansion yielded incorrect result if the eta expanded method
has more than one parameter sections and the expected result type
is a unary function type. In that case a postfix `_' needs to be appended.
|
|
|
|
| |
Turn assertion into test. Without this, neg/tcpoly_overloaded.scala fails.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Currently, the classfiles emitted by dotty do not contain the type
parameters information that javac relies on.
Fixing this is tracked by #1303.
|
|
|
|
| |
This was fixed two commits ago.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Map self-references in refinements to recursive types. This
commit does this for refinement types appearing in source.
We still have to do it for unpickled refinements.
Test apply-equiv got moved to pending because it simulates
the old higher-kinded type encoding in source, which relies
on the old representation in terms of self-referential refinement
types. The plan is not to adapt this encoding to the new
representation, but to replace it with a different encoding
that makes critical use of the added power of recursive types.
Use recursive types also when unpickling from Scala 2.x.
Add mapInfo method to Denotations.
|
|
|
|
|
|
|
|
|
|
| |
Also, check that pattern matching against idents/selects/literals makes
sense.
The hooks perform an implicit search for an instance of `Eq[L, R]`, where
`L`, `R` are the argument types. So far this always succeeeds because Eq.eqAny
matches all such types. A separate commit will check the returned
search term for validity.
|
|\
| |
| | |
Fix Tasty errors
|
| |
| |
| |
| |
| |
| |
| | |
1) Move passing test to pickling
2) Add test case for #1212 in pending
3) Disable annotations/internal in pickling tests. They lead to a stable symbol error
which is explainable (modifiers are read before symbol is created).
|
|/ |
|
|
|
|
| |
Some random neg tests from previous experiments.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
There is a before/after difference having to do with the
order in which class declarations show up.
|
|
|
|
|
|
| |
Named parameters cause some elements to be unpickled
in a different order as they are pickled. In particular
term parameter aliases and type parameter aliases seem to be swapped.
|
|\
| |
| | |
Drop empty companion objects
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The underlying problem on MacOS/Windows remains:
We have a class `B` and an object `b` in the same scope.
We used to get a conflict on `B$/b$` because we created
an empty companion object for `B`. Now we get a conflict
for `B/b`, because the `b` object creates to classes:
`b.class` an `b$.class` and `b.class` clashes with `B.class`.
|
|/ |
|
|
|
|
| |
Fix #530, #654, #681, #684, #685
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
All pos tests up to 3999 have been triaged. One new test in pending.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There is a diff, but a minor one. Instead of
(T? >: Int <: Int)
we get
(T? = Int) after pickling.
|
|
|
|
|
|
| |
The original IterableSelfRec is not syntactically legal after
the hk changes. I attempted to fix, but there's still a type error.
Need to investigate whether this is a true error or a bug.
|
| |
|
|
|
|
| |
This reverts commit a43d39ad719978fbb36663f336c1c7cd2c4da1e0.
|
|\
| |
| | |
Ycheck that methods defined in ClassInfo exist in tree.
|
| | |
|
| |
| |
| |
| |
| | |
Making a correct fix could take some time,
and I want to find other issues before I start working on this one.
|
| | |
|
|/
|
|
| |
Fixes #688
|
|\
| |
| | |
Fix/dependent methods
|
| | |
|
| |
| |
| |
| | |
Now handles included test if toplevel implicit is given, but not yet without.
|
| |
| |
| |
| |
| |
| |
| | |
Reason: A lifted module is no longer a module (i.e. singleton object) in the scope
to which it is lifted.
Fixes #689.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Thistypes erased to the underlying class. This is wrong. When seen as part of some other type,
a ThisType has to erase to the erasure of the underlying type (i.e. the erasure if the selftype
of the class). unittest-collections.scala failed with a MethodNotFound error because the erasure
was computed incorrectly.
On the other hand, a tree with a ThisType type, should keep the type, analogous to a
tree with a TermRef type.
|
|\ \
| |/
|/| |
Avoid junk produced by Constraint#replace.
|