| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Run now interprets correctly
-YstopBefore
-YstopAfter
-Yskip
-Tprint
phase settings. For now, we stop by default before
erasure, until erasure is fully debugged.
|
| |
| |
| |
| | |
Squash was accidenbtally turned off before. Is now on again.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Still missing: bridge method generation, signatures.
Other changes
- Turned around Checking and NoChecking. Checking is the default, NoChecking
disables it.
- Refactored Typer#typed to expose typedNamed, so that it can be overridden in
erasure.
- Made logging more forgiving wrt off-buy-one phase errors.
Conflicts:
src/dotty/tools/dotc/typer/Typer.scala
|
| |
| |
| |
| |
| |
| | |
Added general way to produce summaries when shwowing trees or types.
Summaries have limited, configrable recusion depth.
fix showSummary
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New method ensureApplied which will add a () parameter list if
a tree's widened type takes parameters.
Used in numericConversion, so that we are independent whether we
run before () insertion or after. With that change TypeTestCasts can stay enabled for
the whole build.
Conflicts:
src/dotty/tools/dotc/ast/tpd.scala
|
| |
| |
| |
| | |
To be executed before erasure.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now works for all combinations of
java/scala
sue ErasedValueClass/go directly to underlying type
constructors/others
wildcards ok/not
Signatures had to be refined as well, because the signature depends
on whether a type comes form Java or Scala (handling of intersections
is different).
Also, replaced splitArray method in TypeApplication by extractors for
single- and multi-dimensional array types in definitions.
|
|\ \
| |/
|/| |
Update to Scala 2.11.0-RC3.
|
| |
| |
| |
| | |
This was needed for running dotc.Main using latest Scala IDE 2.11 release.
|
|\ \
| |/
|/| |
Give phases periods, not only id's
|
| | |
|
| |
| |
| |
| | |
And avoid name clashes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The logic for dealing with periods in denotation histories did not
correctly take into account the case where the current validity period of
a denotation ends some phases before the next type transformer starts.
And there was an off-by-one error in startPid.
And Types#computeDenot erroneously tried to reload denotations even
the run did not change.
|
| |
| |
| |
| |
| |
| | |
Previous version was wrong because every context is a fresh context at runtime,
so the overriding version would always be executed, which means that withPhase
becomes a side-effecting operation!
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Aim: Avoid expensive scanning of definitions in denotations other than the initial one.
Technique:
1. If phase is erased, type params is Nil (except for Array class)
2. Otherwise, type params is the same as it was in initial phase.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Aims
1) next/prev should be context-independent. Phase now stores
its ContextBase in a field.
2) More robust handling of phaseNamed and the phase properties
erasedTypes, flattened, refchecked, etc. These were previously
dependent on when the first call to any of these methods was made, which
led to a data race.
There is now an init method in phases which centralizes all necessary intialization.
It is checked that a phase is initialized only once.
|
|\
| |
| |
| | |
Fix phase of context for denotation transformer
|
| |
| |
| |
| | |
The phase is now always the phase on which the denotation transformer is defined.
|
|\ \
| | |
| | | |
Fixes for various txxxx tickets
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fix of d6df293d2120f2247198cb6646a23c338f7dcbbf. It turned out the original commit
was faulty in that iterator.flatten did not typecheck. The problem is fixed in this
commit and flatten is added to the collections test.
|
| | |
| | |
| | |
| | | |
stripImplicits needs to take polytypes into account.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
test case t0273. Was positive in Scala 2, is now deemed to be negative.
Two two definitions
def a = () => ()
def a[T] = (p:A) => ()
do have matching signatures, so should constitute a double definition.
I previously thought that we can get away if the two definitions have
different result types, but then you immediately have a problem because
the denotations have matching signatures for the pruposes of "&" yet
cannot be merged. Which of the two definitions would override
a definition in a base class is then an arbitrary decision.
|
| | |
| | |
| | |
| | |
| | | |
baseTypeWithArgs now also keeps track of refinements in the subtypes. Without
that, the approximated lub in t1279a is too coarse and the program fails to typecheck.
|
| | |
| | |
| | |
| | | |
Turned parameter into receiver (reciever was not used before at all).
|
| | |
| | |
| | |
| | | |
Mostly Java interop tests which are not yet supported. The test infrastructure for Java ocmpilation and the java parser from Scala are still missing.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(and also of t0625, which reappeared).
Several fixes were made. In summary:
1. Naming and representation of KigherKinded traits changed. It's now $HigherKinded$NIP where
the letters after the second $ indicate variance (N)egative, (I)nvariant, (P)ositive. The HKtraits
themselves are always non-variant in their parameters.
2. When deriving refined types over higher-kinded types, the variance of a type alias
is the variance of the new type constructor.
3. isSubTypeHK was changed, as was the position from where it is called.
4. appliedTo also works for PolyTypes.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The type of self name "x" was taken to be the thisType of the current owner.
But the current owner was a local dummy of the class in question, so the ThisType
was NoPrefix. Inserting an enclosingClass fixes the problem.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The original test is now in error because the type Meta in the prefix Meta#Event
is not stable and contains an abstract member Slog.
Even after removing Slog, the test in pos was still in error because the bound type parameters
were incorrectly recognized as abstract members. This has been fixed by the changes to Types.
|
| | | |
|
| | |
| | |
| | |
| | | |
Need to do unit discarding also in selection prototypes.
|
| | |
| | |
| | |
| | | |
Needed an extra case in isSubType.
|
| | |
| | |
| | |
| | | |
type T was not recorgnized as a SAM type because a case was missing in zeroParamClass.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Method type comparison via <:< yielded false if the signatures of the two method types differed.
This is too strict, because methods can have the same parametyers but different result types and still
be in a subtype relationship. We now onyl demand that the sighatures have the same parameters.
|
| | |
| | |
| | |
| | | |
which all pass.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Was previously wrapped in a
package <empty>
but the resulting tree had no position, which caused a Typer assertion. If now
represented as EmptyTree.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, only implicit method types were eligible as views. This is too strict,
as it rules out view bounds. We now also consider types that derive from Function1.
The reason for not allowing any type is that this would cause us to check many more
types for applicability when an implicit view is searched.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Added more tests which all pass, except for tests in disabled and pending.
t0694 went from pos to neg, because the kind of alias type used in t0695 is no longer supported.
|
| | |
| | |
| | |
| | | |
A debug assertion in implicitSearch gave a false alarm and was removed.
|
| | |
| | |
| | |
| | | |
_root_ is now entered into an enclosing context.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Two fixes were needed
1) When typing a function value (x1: T1, ..., xN: Tn) => e, don't unconditionally issue an error
if the expected function type arity is different from N. Instead, issue an error only
if one of the types T1, ..., Tn is absent. The idea is that only then we need to
consult the expected type for the parameter type. This allows to fix the problem later
by an implicit conversion applied to the function value.
2) When eta-expanding, do not automtically take the arity of the expected function value as the
arity of the generated lambda. Instead, take the method's arity, and copy method parameters
into the lambda in case the arities are different.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Test t0288 moved to disabled due to lack of Java interop.
Test t0273 fixed by relaxing double def condition: We only regard two
definitions that define the same name and have exactly the same signature
as double definitions. Previously, signatures that defined the same parameters
were also excluded.
|
|\ \ \
| |/ /
|/| | |
ClassfileParser: Java8 bytecode (fixes #83)
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Make context available in TreeTransform.prepareForXX methods
|
| |/ |
|
|\ \
| |/
|/| |
Try/hygienic desugaring
|
| | |
|