| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Implement inline
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
`inline` is now a modifier keyword. To keep disruption tolerable,
we still allow `@inline` as an annotation as well. Other uses of
`inline` are supported only under `-language:Scala2` and are rewritten
to identifiers in backticks.
|
|\ \
| |/
|/| |
[WIP] fix encoding issues
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
rename test/pos/valueclasses to pos_valueclasses
tests/pos/valueclasses generates a valueclasses.flags
file in /tests/partest-generated/pos that conflicts
with the valueClasses.flags file that
tests/neg/valueClasses.scala tries to create
|
|\ \
| | |
| | | |
Fix #1457: Three incompatbilities with scalac
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Two of these are unavoidable. I moved the tests to diabled/not-representable
and added in each case a comment to the main scala file detailing why there
is a deviation.
The last one (import-rewrite) is fixed.
|
|\ \ \
| | | |
| | | | |
Fix #1513: misaligned by name type parameter type bounds
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit removes a problematic duplicated `checkBounds` call on `TypeApply`.
To verify correctness of this change on has to check that `normalizeTree` used only once [1],
and the function using `normalizeTree` already takes care of calling `checkBounds`.
[1]: https://github.com/lampepfl/dotty/blob/0e8f05d88bfef95fac59f522fd9d06792126bd11/src/dotty/tools/dotc/transform/PostTyper.scala#L205
|
| | | | |
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Fix #1335: Generate null checks for extractors
|
| | |/
| |/| |
|
|/ /
| |
| |
| |
| |
| | |
The issue fixed here was introduced by 71027f15. The added `csyms.isEmpty` condition on `case nil =>` is always true, which is clearely a bug.
t1500c still fails with covariant (or contravariant) type parameters on `::`, but this seams to be a more complicated issue involving the typer.
|
| |
| |
| |
| |
| |
| | |
type.
Test case is isApplicableSafe -Ycheck:first.
|
| | |
|
| |
| |
| |
| | |
We did not properly rename parameter references before.
|
| |
| |
| |
| |
| |
| | |
We now always widen selector type to the superclass if necessary,
no matter whether the selector type refers to a trait or a proper
class.
|
| |
| |
| |
| |
| |
| |
| | |
The special case in hasMatchingMember dealing with self-refential
members has to be generalized to deal lower and upper bounds.
Test case is t762.scala
|
| |
| |
| |
| | |
Fixes SI-7426, which caused a double definition before.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Fallback to .filter if a .withFilter is not available, but do this
only for .withFilter calls generated from for expressions (this is
different from what scalac does; the latter can also rewrite
.withFilter calls given in source, which is not desirable.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Passing tests from pending/pos go in pos. Some others
go in diabled/not-testable. These are tests that require
a compilation order which we cannot yet do with our unit
testing framework. Compiling them alltogether (as is now
doen in junit) does not work either for them because they
contain a duplicate class.
|
| |
| |
| |
| |
| | |
This one failed in getters before because a (previously unchecked) assignment
was turned into a checked application. Now it passes.
|
|\ \
| |/
|/| |
Make sure arguments are evaluated in the correct typer state.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/| |
Fix #1444: Pass implicits to parameterless traits if needed
|
| |
| |
| |
| |
| |
| |
| |
| | |
If a super trait is given as a type (i.e. no argument list), implicit args were
not passed. This is fixed now. Also, we now check for parameterized traits lacking
type arguments in Typer instead of in Mixin.
Fixes #1444.
|
|\ \
| | |
| | | |
Refinements to auto-tupling
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
Needed to address problem shown by z1720.scala.
Another fix to avoidance is needed to make it pass completely.
|
|\
| |
| | |
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.
|
| | | |
|