| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
Uncommented parts that were left accidentally commented out when debugging.
|
| |
| |
| |
| |
| | |
The file consisted of just a deprecation warning. Not sure what was deprecated; neither dotty
nor scalac find anything wrong with it.
|
|/
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
Closes #579 Implement mini-phase for classOf[T]
|
| | |
|
|\ \
| | |
| | | |
Fix/#646 array addition
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously `viewExists(X, Y)` failed if there were ambiguous
implicit conversions from X to Y. This is too fragile, as
demonstrated by test case run/array-addition.scala. Here,
the `genericArrayOps` implicit was not inserted because its
result type `Array[?T]` was deemed to be incompatible with
`? { +: : ? }`. It was incompatible because there were multiple
implicits that added :+ to arrays of various element types.
But once `genericArrayOps` gets applied, the type parameter
`?T` of the array result is fixed, and the ambuity goes away.
The scenario shows that we should not test for ambiguous implicits
in viewExists. Such a test is fragile because it depends on the
progress of type inference when the test is made. It's preferable
to just test for any implicit conversion to exist and to check
for ambiguities later, when the implicit conversion is actually
applied. This has also the potential of speeding up implicit search
in situations where `viewExists` is called often (e.g. when coupled
with overloading resolution).
|
|\ \ \
| |/ /
|/| | |
Fix/#652 erase constructors
|
| | |
| | |
| | |
| | | |
Ws disabled by accident.
|
| | |
| | |
| | |
| | |
| | |
| | | |
We seem to have an instability where the testing framework influences what numbers
anonymous classes are given. We have to deal with this, but not now. For the moment
I am masking numbers from the test output.
|
| | |
| | |
| | |
| | | |
Difference was in generated number for anonymous classes only.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previously this was only done in secondary constructors; need
to do it in primary constructor as well to avoid "reference to
this before super" problems.
|
| | |
| | |
| | |
| | |
| | | |
Proxy references in constructors can't be left as fields because
they can happen before the supercall.
|
| |/
| |
| |
| |
| | |
Map references to outer accessors in secondary constructors to outer parameters. This
was the second source of "reference to this before super call" errors.
|
|\ \
| | |
| | | |
Fix checking whether types are instantiable.
|
| | |
| | |
| | |
| | |
| | | |
The logic for checking aginst the self type was wrong, as demonstrated
by pos/checkInstantiable.scala.
|
|\ \ \
| |_|/
|/| | |
Fix/#655 eta expansion
|
| | |
| | |
| | |
| | | |
Failure to do a widen caused by-name parameters to go undetected.
|
|\ \ \
| | | |
| | | | |
Fix sequence matching.
|
| | | |
| | | |
| | | |
| | | | |
Was also fixed in this PR.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Call drop method directly if class derives from sequence.
I do not understand how callRuntime works in scalac. Calling this method requires implicit search.
|
|\| | |
| |/ /
|/| | |
Fix/#659 lambdalift proxies
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If an inner class has proxy fields, we missed so far the assignment sfrom
the proxy parameters in the primary constructor of the class to the proxy
fields.
Test case tries several variations of this.
|
| | |
| | |
| | |
| | | |
Even if an explicit outer accessor was a method, it got a TermRef as type.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the expected result type of a FunProto type was ignored and taken into
account only in case of ambiguities. arrayclone-new.scala shows that this is not enough.
In a case like
val x: Array[Byte] = Array(1, 2)
we typed 1, 2 to be Int, so overloading resulution would give the Array.apply of
type (Int, Int*)Array[Int]. But that's a dead end, since Array[Int] is not a subtype
of Array[Byte].
This commit proposes the following modified rule for overloading resulution:
A method alternative is applicable if ... (as before), and if its result type
is copmpatible with the expected type of the method application.
The commit does not pre-select alternatives based on comparing with the expected
result type. I tried that but it slowed down typechecking by a factor of at least 4.
Instead, we proceed as usual, ignoring the result type except in case of
ambiguities, but check whether the result of overloading resolution has a
compatible result type. If that's not the case, we filter all alternatives
for result type compatibility and try again.
|
| |
| |
| |
| | |
As suggested by @retronym
|
| |
| |
| |
| |
| | |
Parameter accessors in traits have the ParamAccessor flag removed
in the Mixin transformSym method.
|
| |
| |
| |
| | |
Verify that the initilialization order described in #640 is correctly implemented.
|
| | |
|
|\ \
| | |
| | | |
Fix #643 - Scala2 unpickling now sets NoInits flag for interfaces.
|
| |/
| |
| |
| |
| |
| |
| | |
Refinement classes and their members could give spurious stale symbol errors if the
symbol is loaded in a different run than the classfile containing it. The problem
is that refinement classes do not form part of the scope of their owners. The fix
assumes that refinement classes are always "stillValid".
|
|\ \
| |/
|/| |
Enable tests that pass, move macro tests to disabled.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Changes were made by accident.
|
|/
|
|
|
| |
Methods like + can have multiple parameters. In that case
+= also takes multiple parameters.
|
|\
| |
| | |
Implement Scala2 traits
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Until the previous fix to Denotation-& the test here spuriously passed.
The Dotty spec is that value classes synthesize equals and hashCode only
if no concrete definitions are inherited except the ones from Any. That
was previously miscalculated.
The test has been updated to reflect the specified behavior.
|
| |
| |
| |
| |
| |
| |
| |
| | |
generation"
This reverts commit cafd71af4902c76561f27a479c14e53729600bb9.
For the future refference: tests and checkfiles should be modified only after carefull thought.
Otherwise our tests will stop indicating the correct behaviour.
|
|/
|
|
| |
This reverts commit 8f90105dc4e62e78d53b385df1b2eb29f2855183.
|
| |
|
|
|
|
|
| |
See https://github.com/lampepfl/dotty/pull/624#issuecomment-107064519
for a lengthy explanation.
|
| |
|
|
|
|
|
|
| |
class is also the top-level class"
This reverts commit 6898d2c296326779d373ef0e0b84e4451550120a.
|
|\
| |
| | |
Add a test for supercalls in traits.
|
| |
| |
| |
| | |
Also added non-unit fields and a class that directly implements two traits with the same fields.
|
| | |
|
| | |
|
| | |
|