| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
| |
The `from` field of a Return tree should either be EmptyTree or an Ident
corresponding to the method we're returning from.
|
|
|
|
|
| |
Proposed to be used from repl: it gives you internal
representation of types after frontend and a context to play with them
|
|
|
|
|
|
|
|
|
|
| |
Dotty requires a mangled bootclasspath to start.
It means that `console` mode of sbt doesn't work for us.
At least I wasn't able to make sbt fork in console,
so instead I've added a Scala-repl into dotty itself :-)
It would be good to make it use dotty one day when we have
a backend :-)
|
|\
| |
| | |
Fix/erasure lub alternative
|
| |
| |
| |
| | |
Will do it in a different PR.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, tests fail. The failures I checked are all related to tailcalls.
Not sure whether there are others.
This is a blocker for serialization. Orphan parameters cannot be serialized.
Maybe rethink the position of tailcalls? It looks to me that the repeated trouble it gives us is
more than the effort required to put an efficient tailcall recognition after pattern matching in place.
But I might be wrong.
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
Fixes two bugs needed for java-override test:
Namer was creating a MethodType instead of a JavaMethodType even though
the JavaDefined flag was set on the DefDef.
Following Scalac, Namer needs to convert Java method parameters
of type j.l.Object to s.Any.
|
| |
|
|
|
|
|
| |
Reformulated matchign spec and implemented accordingly. Previous
fix for #329 would have missed third new error case in over.scala.
|
|
|
|
| |
Overriding pairs needs to match ExprTypes with field types. Closes #329.
|
| |
|
|
|
|
| |
Tests (non)equivalence of modules and their ThisTypes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous scheme did not ensure that transitivity was eliminated.
Example scenario:
We have in the constraint
P <: Q
for constrained variables P, Q and add
Q <: T
Previous propagation added the constraint and then tested
whether the bounds of all variables were satisfiable. For
Q we test
P <: T
but that is true because P <: Q and we already added the constraint Q <: T.
So we fail to add the constraint P <: T, and transitivity is no longer eliminated.
Instead we now test the new bounds (in this case P <: T) *before* adding
the new constraint Q <: T. This is also simpler than the previous scheme.
|
|
|
|
|
|
| |
Symptom was: When compiling Definitions.scala with the changes in the subsequent
commits, an empty tree was passed as implicit parameter, without an "implicit not found"
error being reported. The problem needed a fix in TyperState.
|
|
|
|
|
|
|
|
|
| |
I get very frequent build failures due to the mutual Scala<->Java dependency.
It builds for a long time, then decides that getCtx overrides nothing. The only
way to fix is another clean build. Total time lost: >5 minutes. These happened
occasionally before but have become much more frequent under ScalaIDe4.0, to the
point where this becomes a major drag on productity. Context escape detection
is nice but if it stops us getting work done, not worth the effort.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Remove historical enabling of erasure for some tests: its enabled by default now
|
|\
| |
| | |
Two new tests
|
| |
| |
| |
| |
| | |
1) Verify we survive illegal infinite paths. Closes #91.
2) Verify we handle fbounds in and types correctly.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This is necessary to reject code like
val x: Boolean = null
Without the restriction, this code would typecheck and expand to
val x: Boolean = Predef.Boolean2boolean(null)
since `null` counts as a value of type `java.kang.Boolean`.
|
| |
|
|
|
|
|
|
| |
We now check that classes do not inherit from refinement types
(unless they are an encoding of parameterized types), nor from
& or | types.
|
|\
| |
| | |
Fix/mixins
|
| |
| |
| |
| | |
The clause got accidentally dropped in the rebase.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The datarace happened because for method "transform" implemented
by ResolveSuper which disambiguated overridden methods.
Previously, there was a reference FirstTransform.this.transform
of type termRefWithSig to the method implemented in a super trait. Now the same
reference points to the newly implemented method.
Solved because ResolveSuper now generates symbolic references.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, a double definition errorfor `T` was produced in a case like this:
type T1 = C { T <: A }
type T2 = T1 { T <: B }
This was caused by the way T1 was treated in the refinement class
that is used to typecheck the type. Desugaring of T2 with `refinedTypeToClass`
would give
trait <refinement> extends T1 { type T <: B }
and `normalizeToClassRefs` would transform this to:
trait <refinement> extends C { type T <: A; type T <: B }
Hence the double definition. The new scheme desugars the rhs of `T2` to:
trait <refinement> extends C { this: T1 => type T <: B }
which avoids the problem.
Also, added tests that #232 (fix/boundsPropagation) indeed considers all refinements
together when comparing refined types.
|
|
|
|
| |
Now detects the cycles reported by @retronym
|
|
|
|
| |
to reflect last commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous scheme did not propagate bounds correctly. More generally,
given a comparison
T { X <: A } <: U { X <: B }
it would errenously decompose this to
T <: U, A <: B
But we really need to check whether the total constraint for X in T { X <: A }
subsumes the total constraint for X in T { X <: B }
The new scheme propagates only if the binding in the lower type is an alias.
E.g.
T { X = A } <: Y { X <: B }
decomposes to
T { A = A } <: U, A <: B
The change uncovered another bug, where in the slow path we too a member relative to a refined type;
We need to "narrow" the type to a RefinedThis instead. (See use of "narrow" in TypeComparer).
That change uncovered a third bug concerning the underlying type of a RefinedThis. The last bug was fixed in a previous commit (84f32cd814f2e07725b6ad1f6bff23d4ee38c397).
Two tests (1048, 1843) which were pos tests for scalac but failed compling in dotc have
changed their status and location. They typecheck now, but fail later. They have been
moved to pending.
There's a lot of diagnostic code in TypeComparer to figure out the various problems. I left it in
to be able to come back to the commit in case there are more problems. The checks and diagnostics
will be removed in a subsequent commit.
|
|
|
|
|
|
|
|
|
|
|
| |
Needed some fixes to lookup refined. The potential alias
type is now calculated by taking the member of the original
refined type, instead of by simply following the refined info.
This takes into account refinements that were defined after
the refinement type that contains the alias.
The change amde another test (transform) hit the deep subtype limit,
which is now disabled.
|
| |
|
|
|
|
|
|
| |
The dummy constructor is needed so that the real constructors see the import of the companion object.
The constructor has a parameter of type Unit so that no Java code can call it.
|
| |
|
|
|
|
| |
These tests work correctly since 222e9a478f7b851582550973df6a9d141766e49a
|
| |
|
|\
| |
| | |
Fix/overriding
|
| |
| |
| |
| |
| | |
Somehow this was lost in porting (or was this done somewhere else
in scalac?).
|
| |
| |
| |
| |
| |
| |
| |
| | |
OverridingPairs had several bugs which caused pairs to be lost, which caused
missing overrides checks. Fixing OverridingPairs revealed several test failures
(and a problem in Synthetics generation which was fixed in the last commit).
Tests that became negative are all moved into neg/overrides.scala, and the
original versions in pos were fixed.
|
|/
|
|
|
|
|
| |
One test (t2613) required lifting a hard recursion limit in findMember
(used for debug only, will be removed in the future). The same test
also requires -Yno-deep-subtypes to be reset, so it's in pos_special
instead of pos.
|
|
|
|
| |
Should replace destructive inits.
|
|\
| |
| | |
Refactor/def trees
|
| |
| |
| |
| | |
Typed MemberDef trees now take the modifiers from their symbol's data.
|
|/ |
|