| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix desugaring of Bind(WILDCARD, _).
|
| | |
|
| | |
|
| |
| |
| |
| | |
Turn assertion into test. Without this, neg/tcpoly_overloaded.scala fails.
|
| | |
|
|\ \
| |/
|/| |
Fix #1442: add new phase, SelectStatic
|
| | |
|
|\ \
| | |
| | | |
Add arrays to collection strawman
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Avoids missing member in tangledCompanion.scala, which is a minimization
of intermittent failures in CollectionStrawMan6. Intermittent, because it
depended on order of compilation. CollectionTests have to be compiled together with
but before CollectionStrawMan6 (this was _sometimes_ the case because partest did not
honor indicated compilation order so far). I.e.
dotc CollectionTests_2.scala CollectionStrawMan6_1.scala
would trigger the error. tangledCompanion.scala captures the dependencies
in a single file.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Test generated code before but fails with verify error at runtime.
Here's the message:
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
D$.<init>()V @2: invokedynamic
Reason:
Type uninitializedThis (current frame, stack[1]) is not assignable to 'D$'
Current Frame:
bci: @2
flags: { flagThisUninit }
locals: { uninitializedThis }
stack: { uninitializedThis, uninitializedThis }
Bytecode:
0x0000000: 2a2a ba00 1f00 00b7 0022 2ab3 0024 b1
at Test$.main(t3048.scala:13)
at Test.main(t3048.scala)
With the fix in last commit, test causes backend to crash with
java.lang.AssertionError: assertion failed: val <none>
at scala.Predef$.assert(Predef.scala:165)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.assertClassNotArray(BCodeHelpers.scala:214)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.assertClassNotArrayNotPrimitive(BCodeHelpers.scala:219)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.getClassBTypeAndRegisterInnerClass(BCodeHelpers.scala:238)
at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.getClassBTypeAndRegisterInnerClass(BCodeSkelBuilder.scala:51)
at scala.tools.nsc.backend.jvm.BCodeHelpers$BCInnerClassGen$class.internalName(BCodeHelpers.scala:210)
|
| | |
| | |
| | |
| | |
| | |
| | | |
substDealias did not follow aliases when the prefix of a typeref changed
under substitution. This was exhibited by a bug in extensionMethods which was
first discovered in CollectionStrawMan6 and was minimized in extmethods.
|
| |/
|/|
| |
| | |
This allows objects to be easily aliased
|
| | |
|
|\ \
| | |
| | | |
Fix #1269: Typing and pattern matching of nested subclasses
|
| | |
| | |
| | |
| | |
| | | |
Previous test did not reflect deeper paths for outer references. This caused
a -Ycheck:patMat failure for i1269.scala.
|
| | | |
|
|\ \ \
| | | |
| | | | |
partest: Enable separate compilation
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently, the classfiles emitted by dotty do not contain the type
parameters information that javac relies on.
Fixing this is tracked by #1303.
|
| | | |
| | | |
| | | |
| | | | |
javac wants the public class name to match the filename.
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
This lead to inference failures when separately compiling t1751 and
t294, this did not happen under joint compilation because JavaParser
does not create the overloaded constructor
|
|\ \ \
| |/ /
|/| | |
Fix parameterized typedefs with lambdas as rhs
|
| | |
| | |
| | |
| | |
| | | |
Adapt operations TypeApplications and TypeComparer to account
for the possibilities of curried type lambdas.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previously the compiler crashed when faced with a parameterized typedef
that has a lambda as rhs. We fix this by refining the condition when
not to abstract in typeDefsig.
|
| | | |
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Faced with recursive dependencies through self types, we might have
to apply `normalizeToClassRefs` to a class P with a parent that is not
yet initialized (witnessed by P's parents being Nil). In that case
we should still execute forwardRefs on P, but we have to
wait in a suspension until P is initialized.
This avoids the problem raised in #1401. I am still not quite sure
why forwardRefs is needed, but it seems that asSeenFrom alone is not
enough to track the dependencies in this case.
|
|\ \
| | |
| | | |
Fix #1378: Propagate more knowledge of result type into applications
|
| |/
| |
| |
| |
| |
| |
| |
| | |
If an application has functions with implicit parameter types we need to be
more aggressive about propagating knowledge of the expected result type into
the constraint.
Fixes #1378.
|
|\ \
| | |
| | | |
Fix wildcard protos
|
| | | |
|
|\ \ \
| |/ /
|/| | |
HK reduction: Remove special-case for typerefs
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The special case:
case stripped: TypeRef =>
stripped.symbol.is(BaseTypeArg)
is wrong because you might still want to reduce applications involving
TypeRefs which are not base class parameters, like in:
class Foo[A]
type Alias[X] = Foo[X]
val x: Alias[Int] = ???
`Alias` is a TypeRef so before this commit `Alias[Int]` was never reduced
to `Foo[Int]`. It should have been:
case stripped: TypeRef if stripped.symbol.is(BaseTypeArg) =>
true
But even this is incorrect: it assumes that we can always safely reduce HK
applications involving base class parameters, this is not the case when
the parameter kind is different from the rhs kind as illustrated by
`i1181c.scala`. We fix this by simply dropping the special case.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that we implement partial higher-order unification (SI-2712 fix)
i1181.scala will compile even if `Alias[Int]` gets dealiased to
`(Int, Int)` because we can unify the latter with `M[_]` where
`M = [X] -> (Int, X)`.
The new test will only succeed if `Alias[Int, Int]` is not dealiased
because we will never unify `Foo[Int]` with `M[_,_]`.
|
|\ \
| |/
|/| |
Changes to overloading
|
| | |
|
| |
| |
| |
| |
| |
| | |
Adds the original test form #1381. t2660 looks similar.
Also adds some unrelated tests I had in the queue that now
compile.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Fix #1381: Overloading is now changed so that we first try without implicit searches.
Only if that leaves no applicable alternatives we try again with implicit search turned on.
This also fixes test case t2660, which got moved from neg to pos.
|
|\ \
| | |
| | | |
Fix 1365: Fix bindings in patterns
|
| | |
| | |
| | |
| | |
| | |
| | | |
We need to compare pattern types with expected types in order
to derive knowledge about pattern-bound variables. This is done
use the mechanism of gadt bounds.
|
|\ \ \
| |_|/
|/| | |
Add scala.Dynamic support.
|
| |/ |
|
|\ \
| | |
| | | |
Direct representation of higher-kinded types
|
| | |
| | |
| | |
| | |
| | | |
Previous logic could only handle classes as constructors.
Also, address other reviewers comments.
|
| | | |
|
| | |
| | |
| | |
| | | |
This was fixed two commits ago.
|
| | |
| | |
| | |
| | | |
Allow hk type parameters to be higher kinded themselves.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When applying a type alias of a type lambda, keep the original
application instead of reducing. But reduce anyway if
- the reduced type is an application where the type
constructor has the same kind as the original type constructor, or
- some of the arguments are wildcards.
|
| | |
| | |
| | |
| | |
| | | |
Allow definition of types in refinements that do not appear
in parent type.
|
| | |
| | |
| | |
| | |
| | | |
Allows partially instantiated types as type constrictors when inferring higher-kinded
types.
|