| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Make Definitions survive recompilation of core definitions.
|
| |
| |
| |
| |
| |
| | |
1) Check that searched scope is consistent
2) Do a linear search for symbol with name, and report
if something was found that way.
|
| |
| |
| |
| | |
Was stdout, but this gets mixed up with the exception printing on stderr.
|
| |
| |
| |
| |
| |
| |
| | |
Set info early in order to avoid cyclic reference errors.
Errors were observed when compiling
scala/Predef.scala scala/package.scala scala/collection/GenSeqLike.scala
|
| |
| |
| |
| |
| |
| |
| | |
Forces a bit less, and could be more efficient.
Did not seem to make a difference with current
CyclicReferences though, except that cyclic
error happened a bit later in the sequence.
|
| |
| |
| |
| | |
Track starts and ends of completions using indentation.
|
| |
| |
| |
| | |
Now also provides compilation unit.
|
| |
| |
| |
| | |
Again it dies without an exception trace. Is partest eating error output?
|
| |
| |
| |
| |
| | |
Just a grap at straws to get a handle for the
missing reference problem.
|
| |
| |
| |
| |
| |
| | |
Instead of simply dropping all Retyper error traces, we now
send them to the config.Printers.transforms printer, so what happens depends
on the value of that printer.
|
| |
| |
| |
| |
| |
| | |
I looked a some of the failures so far, and in each case we got
a huge "exception while typing" cascade but then no actual error!
Buffer overflow? To find out more I disabled the trace for now.
|
| |
| |
| |
| |
| | |
Needed for both ClassTags and instance of checks. This makes
scala/Array.scala compile.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Taking a reference means that the symbol will be brought forward into the current run,
then if the same symbol is entered from source, a datarace ensues.
This affected the ProductN symbols because these are automatically added to a case class
suring desugaring.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Otherwise they would always return the symbol in the original context
where Definitions was first created.
Also, cache two more arrays of symbols per run.
|
| | |
|
| |
| |
| |
| |
| | |
Since we now have two forms of (almost) everything in Definitions,
might as well profit from it.
|
| | |
|
| |
| |
| |
| |
| |
| | |
TypeRef becomes Type, thus removing duplicates. Where
...Type was used in an extraction (e.g. ArrayType(...),
FunctionType(...)), we now use ...Of.
|
| |
| |
| |
| |
| |
| | |
1) Have symbol sets cached per run
2) Use methods Denotation#isPrimitiveValueClass, Denotation#isNumericValueClass
instead of calling contains directly on symbol sets.
|
| |
| |
| |
| | |
Contains tests on thsoe sets would be flakey anyway.
|
| |
| |
| |
| |
| |
| |
| | |
Remove unneeded maps and make the ones that are needed
private. Reason: Maps indexed with TypeNames are prone
to misuse; should be accessed only with names of known
primitive classes.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Note that there is a slight difference in behaviour:
it will be unconditionally adding cast even if its not needed.
For example in callsFoo1 cast is not needed(erasure will insert a correct one).
```
class A{
private def foo = 1
def callsFoo1(other: A & B): Int = other.foo
def callsFoo2(other: B & A): Int = other.foo
}
trait B {
def foo(i: Int) = i
}
```
Though as AndTypes are uncommon I do not expect this to have
non-negligible impact on performance.
|
| |
| |
| |
| |
| | |
Right part of and type should not be widened,
as dotty could have used non-widened type to drive type inference.
|
| |
| |
| |
| |
| |
| |
| | |
This transform makes sure that all private member selections from
AndTypes are performed from the first component of AndType.
This is needed for correctness of erasure.
See `tests/run/PrivateAnd.scala`
|
|/
|
|
| |
Fixed #912
|
|\
| |
| | |
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.
|