| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Debugs some cases where `tree.pos` wasn't initialised properly.
|
|
|
|
|
| |
Most tests were still commented out in last merge. Also,
an outdated comment in TreeTypeMap was removed.
|
| |
|
| |
|
|\
| |
| | |
Various fixes to LazyVals.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Otherwise Constructors is not able to see them and they get lost.
|
| | |
|
| |
| |
| |
| | |
Previous scheme did not work after erasure.
|
|\ \
| | |
| | | |
Fix #547: Vararg overload
|
| | |
| | |
| | |
| | |
| | | |
When comparing to types in isAsSpecific, onvert repeated parameters to their underlying type
only if both types are vararg methods. This mimics scalac behavior.
|
|\ \ \
| |_|/
|/| | |
Make dotty compile backend.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Up to now a NotDefinedHere exception was thrown if a denotation
was not defined at the current phase, but was defined elsewhere
in the current run. However, if the denotation is a SingleDenotation
or MultiDenotation it is possible that the particular Single- or Multi-Denotation
was not computed at the current phase, but the underlying SymDenotation
is valid. With the changes in this commit, we reaload the denotation as
a second try.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Implicit vals need explicit type, anonymous classes are widened.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We used to require that the result type of an extractor `get` is a product,
or else the type of the `get` itself would be taken as the result type of the
unapply. This is now relaxed so that we automatically select with _1, _2, ...
as soon as there are multiple argument patterns, and (1) the result type is not
a Seq, (2) the number of consecutive product conselectors matches the number
of arguments.
|
| | |
| | |
| | |
| | | |
See discussion in #544
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Symbols never change betwene terms and types. So we do not need to the current
denotation to decide what they are. Less forcing -> less potential for cyclic
references.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems wasteful to load the member classes even of classes that are not currently compiled.
It also makes us vulnerable to any misinterpretation of Java file formats. In th particular
case of #536, we parsed a class an anonymous Collection$1 which was referring to the type
parameter of its enclosing class, but was not diagnosed as an inner class of the enclosing class.
|
|\ \ \
| |_|/
|/| | |
Fix #540 - unbounded array test for wildcard array arguments
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Arrays with wildcard arguments such as Array[_ <: Foo] where Foo is a
universal trait are now diagnosed as unbounded generic arrays and are
erased to Object.
|
|\ \ \
| |_|/
|/| | |
Drop the requirement that extractors with `get` must implement Product
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
We used to require that the result type of an extractor `get` is a product,
or else the type of the `get` itself would be taken as the result type of the
unapply. This is now relaxed so that we automatically select with _1, _2, ...
as soon as there are multiple argument patterns, and (1) the result type is not
a Seq, (2) the number of consecutive product conselectors matches the number
of arguments.
|
|/
|
|
|
| |
Can now compile Predef/DottyPredef without -Yno-import option.
Achieved by making some parts of imports more lazy.
|
|\
| |
| | |
Fix #518 - compute denotations
|
| |
| |
| |
| |
| | |
isWeakRef was confusing because this has nothing to do with
weak pointers.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Allow to rebind a NmedType to refer to a symbol in a subclass
of where the previous symbol was defined. This generalizes the
previous rule that we allow to rebind from a root method to
its synthetic implementation.
The change is not necessary to make the new scheme of computeDenot pass
the tests, but it seems useful to avoid spurious errors elsehere.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Phase ExtensionMethods creates new symbols for extension methods
and then installs these symbols into the companion object of a value class.
It's important that the creation of these symbols is done in the phase
ExtensionMethods itself, and not in the next phase, as was done before.
If we do it in the next phase, we need the owner at the next phase
and with the new scheme of computeDenot that owner might be forced,
leading to an infinite cycle.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If previous denotation was a sym denotation, it might be overridden
by a different symbol in a new phase or run. So it is not correct to
simply return the current version of the symbol, as was done before.
We now recompute the member if there is a chance that the symbol could
be overridden.
|
|\ \
| | |
| | | |
Expand SAM closures to anonymous classes if needed
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also included are
- Closures implementing classes that inherit from a class other than Object
- Closures that implement traits which run initialization code.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
superClass was a duplicate; we already have one in SymDenotation,
so we delete the one in SymUtils.
superInterfaces is too easy to confused with the JVM notion, which
is different. I replaced with directlyInheritedTraits.
|
| | |
| | |
| | |
| | | |
Thanks for pointing it out, @smarter.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now takes a list of parent types. We needed only one parent for SAM implementation
but it makes sense to generalize this.
Also, removed redundant code accidentally left in.
|
| | |
| | |
| | |
| | | |
Removed the workaround of the original crasher which was addressed in the last commit.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Like all other variables, pattern-bound vars need a fully defined type. I was
thinking originally that demanding a fully defined selector type is sufficient
to ensure this, but that's not true: An outer pattern might call a polymorphic
unapply and its type variables need not be fully instantiated.
With the fix, the minimized test case from ExpandSAMs works.
|
| | |
| | |
| | |
| | | |
The phase replaces SAM closures with anonymous classes when necessary.
|
| | |
| | |
| | |
| | | |
See comment in the code.
|
| | |
| | |
| | |
| | | |
As the name implies, this creates an anonymous class.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The handling of the first parent of ClassDef was broken if
that parent had type parameters. This was exposed by following
commites which use ClassDef more intensively than before in
creating anonymous classes representing closures.
|
| | |
| | |
| | |
| | |
| | |
| | | |
It's common that one wants to create class symbols with arbitary parent types,
not just TypeRefs. But for the casual user it's non-obvious how to do it.
Hence the new creation method.
|