| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Maps should not have TypeRefs as keys, yet symbols are not stable
for recompilation. Solution: Construct these maps over symbols but
move them to CapturedVars#Transform where they will be re-built
on each run.
|
|
|
|
| |
Was a lazy val, but this is not stable under recompilation.
|
| |
|
|
|
|
|
| |
Remve versions in Symbols, always go through version in
Denotations. Avoids having two equivalent ways to do the same thing.
|
| |
|
| |
|
|
|
|
|
| |
Can't be a lazy val, because one of the symbols it tests
(`newRefArray`) can be recomputed.
|
|
|
|
| |
Also, delete unused `uncheckedStableClassRef` entry.
|
|
|
|
|
| |
TypeRefs can have several representations for logically the
same type, so they don't make good keys.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Symbols are not stable between runs, so if some symbol referred
to from Definitions gets recompiled, there are then two Symbols
that are both visible, one referenced from Definitions, the other
the one that got compiled.
Thos led to a crash when e.g. compiling scala.Short, because the
newly compiled symbol was not recognized as a primitive value
class.
The present commit tries to make systematic changes without regard
to simplicity or aesthetics. This will be polished in future commits.
// ### comments signal areas that need further attention.
|
|\
| |
| | |
Require outer pointer also for proxies of enclosing classes.
|
| |
| |
| |
| | |
There was a missing case where an outer pointer is required.
|
|\ \
| | |
| | | |
Drop checking that lower bound is a subtype of upper bound.
|
| | | |
|
| | |
| | |
| | |
| | | |
Trying to hunt down the flakey build.
|
| | |
| | |
| | |
| | |
| | |
| | | |
As discussed in #780 and #525, the test is not needed. This makes
t1279a compile, which got moved now to pos. Fixes #780 and #915.
It also makes scala.List compile. Review by @smarter.
|
|\ \ \
| | | |
| | | | |
Fix nested pkg member 2
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The previous rules picked the once outer removed member rather than
the innermost one, of both members exist.
Seen in the wild in scala.sys.ShutdownHookThread. No separate test here,
because we'll include large parts of stdlib anyway as a build test.
|
|\| | |
| | | |
| | | | |
Fix numeric implicit args
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Dotty delivers an ambiguity error. The comment in the test argues why
this is OK.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Compiling scala.math.BigDecimal and scala.math.BigInteger shows a problem.
The conversion `int2bigInt` is not applicable to a Byte because `Byte -> Int`
requires another implicit conversion.
We fix that by using a new method relaxed_<:< for implicit compatibility checks,
which always admits numeric widenings.
This leads to another problem. Now the conversions
implicit def byteToInt(x: Byte): Int
implicit def byteToShort(x: Byte): Short
are ambiguous when we try to convert from Byte to Int.
We fix that by adding a "tie-break" to implicit search
where if several methods match a numeric value result type
and all have numeric value types as result types, we
pick the numerically largest type that matches.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The included test
pos-special/variances-constr.scala
demonstrates an unsoundness in the variance checking of scalac.
Scalac excludes symbols owned by constructors from the
checking. This is unsound, as can be demonstrated by compiling the test
and observing output of the program run:
Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
at Test$.main(variances-constr.scala:17)
at Test.main(variances-constr.scala)
Dotty allows this code only under -language:Scala2 and issues a migration warning.
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| | |
The idea is that whenever Dotty detects a migration problem under -language:Scala2,
it should issue a migration warning, so we know what needs to be rewritten.
|
|\ \
| | |
| | | |
Fix #877
|
| | |
| | |
| | |
| | | |
Needed to make builds deterministic.
|
| | |
| | |
| | |
| | | |
Use freshName to name evidence parameters.
|
|\ \ \
| | | |
| | | | |
Reorder unpickled type params if necessary
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When compiling Iterator.scala it was observed that
the type parameters of BufferedCanBuildFrom appeared
inm the wrong order. This fix corrects that, making
sure that type parameters appear in the decls scope
in the same order as they are given in the epxlicitly
unpickled type parameter list.
|
|\ \ \ \
| |/ / /
|/| | | |
Deal gracefully with missing return types of abstract menthods.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
1) Better error message: "missing return type" instead of `=' expected.
2) Allow them under language:Scala2
Fixes #871
|
|\ \ \
| | | |
| | | | |
Fix #851 Java parsing forgot type parameters
|
| | | |
| | | |
| | | |
| | | | |
Fixes #851.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
`parser` is strictly speaking not a phase, but it makes sense
to allow parsed trees being printed. Before this was only possible
if the `typr` printer was enabled, but this was cumbersome, non-intuitive,
and did too much.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These were disabled before, which means that having evidence
of S <:< T did not introduce a usable implicit conversion from
S to T. We do do it like scalac: just disable Predef.$conforms.
This makes TraversableOnce compile. Fixes #914.
|
| | |
| | |
| | |
| | |
| | | |
This will cause them to automatically implement a certain number
of synthetic methods.
|
| | |
| | |
| | |
| | |
| | | |
isDefined is now always auto-generated for case classes. It need to get an automatic override
if there is a version that's inherited.
|
|\ \ \
| | | |
| | | | |
Change allow ex in hk
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reason: An inner Scala2 class might be shadowed by a same-named class in a subtype.
In Dotty this is disallowed butin Scala 2 it is possible. For instance, math.Numeric
and math.Ordering both have an inner class "Ops". Normal TypeRef types could not
select the shadowed class in Ordering is the prefix is of type Numeric.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
isHK already does a dealias.
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Allow pattern matching anonymous functions of arity > 1
|
| | | | | |
|