| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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 #518 - compute denotations
|
| |
| |
| |
| | |
Tests #518.
|
|\ \
| | |
| | | |
Expand SAM closures to anonymous classes if needed
|
| | |
| | |
| | |
| | | |
The test included here fails in backend.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also included are
- Closures implementing classes that inherit from a class other than Object
- Closures that implement traits which run initialization code.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
Fix of #503
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Added test for previous PR on super accessors.
Updated test for #503 to check both inner classes and inner traits.
|
| | |/
| |/|
| | |
| | | |
Previously, we considered only methods. #503 shows that this is wrong.
|
|\ \ \
| | | |
| | | | |
Fix compatibility of Java with value classes
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This avoids getting a runtime error when calling a Java-defined method
whose signature contains value classes. It happened because we erased
the value classes in this signature even though it comes from a
classfile.
Amusingly, this problem also exists in scalac:
<https://issues.scala-lang.org/browse/SI-9298>
|
|/ / |
|
|\ \
| | |
| | | |
Expand private members if necessary
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A late miniphase which resets private flag of all
members that are not accessed from within same class.
Replaces logic in RefChecks. Doing this late has two
advantages
- we can use name expansion, because references are
symbolic, so the names of symbols and references
to them do not need to correspond anymore.
- we can automatically correct for symbols moved in earlier
phases (e.g. lifted out by LambdaLift).
|
|\ \ \
| | | |
| | | | |
Fix #522.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
We were missing a substitution in full parameterization. Embarraingly, this
made even the example in the doc comment of `fullyParameterizedDef` fail.
|
|/ / /
| | |
| | |
| | |
| | | |
The test had to be slightly modified because of dotty's stricter
checking of type bounds validity, see #525 where this was discussed.
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
Lower bounds need to be instantiated just like upper bounds.
F-bounded polymorphism (which only applies too upper bounds)
is one reason for instantiating arguments, but parameters
referring to other parameters is another one. An the latter
applies to lower bounds as well.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Each test needs to have its own package because pos_all will try to
compile the whole valueclasses directory at once.
The remaining tests with "extends AnyVal" in tests/pending/pos are
related to separate compilation, except for:
- t6482.scala and t7022.scala which were fixed by
https://github.com/scala/scala/pull/1468 in scalac and seem to
trigger a similar bug in FullParameterization
- strip-tvars-for-lubbasetypes.scala which was fixed by
https://github.com/scala/scala/pull/1758 in scalac
|
| |
| |
| |
| |
| | |
Each test needs to have its own package because pos_all will try to
compile the whole valueclasses directory at once.
|
|/
|
|
| |
This fixes the issues reported in SI-5866 and SI-8097
|
|\
| |
| | |
Implement/i499
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Refactor/super accessors
|
| | |
| | |
| | |
| | |
| | |
| | | |
Was missing before. Needed a tweak in PlainPrinter for printing
import symbol references (their denotation is not current after pickling, so
they would have printed differently after and before pickling).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Not sure why we need to do this, and in any case it's not sure
what constitutes a pattern. There are certainly some parts of
patterns (e.g. prefixes of unapplies, or their implicit arguments)
that should be transformed under SuperAccessors, so the previous
condition was too coarse.
We include the test case that motivated the restriction. It looks like
it works now.
|
|\ \ \
| |_|/
|/| | |
Save TASTY in attribute of classfiles.
|
| |/
| |
| |
| |
| | |
Classfile parser now reads TASTY attributes or annotations and
unpickles them in order to allow for separate compilation.
|
| | |
|
|/ |
|
|\
| |
| | |
Alt/instantiation checks (2)
|
| |
| |
| |
| |
| |
| | |
- Abstract classes cannot be instantiated (exceptions:
parent news and Java annotations)
- Instantiateed class must conform to its self type.
|
| |
| |
| |
| | |
Check that the self type of a class conforms to the self types of its parent classes.
|
|\ \
| | |
| | | |
Partest for Dotty with pos tests and neg tests with error count
|
| |/ |
|
| |
| |
| |
| |
| | |
Idents of lifted symbols become class members, need to carry the right
reference with the right prefix as type.
|
|/
|
|
|
|
|
| |
Documentation around markFree and narrowLiftedOwner was added.
i480 was minimzed and dependencies on dotc were removed. (+1 squashed commit)
Squashed commits:
[1a84054] Test cases for #480
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|