| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Analogous to the previous situation where we do not report a data race
if the previous symbol comes from a superclass, we now do the same if
the previous symbol comes from a given self type. Makes overrideDataRace.scala pass,
and finally enables stdlib test with TraverableViewLike.scala added.
|
| |
|
|
|
|
|
| |
The change in subtyping led to a deep subtype recursion for sets.scala.
It seems legit, so the -Yno-deep-subtypes check is disabled.
|
|
|
|
|
|
| |
Previously adaptIfHK was performed on every type application. This made
t3152 fail. We now do this only on demand, in isSubType. t3152 now passes
again. But the change unmasked another error, which makes Iter2 fail to compile.
|
|
|
|
| |
Also: various cleanups to comments.
|
|
|
|
|
| |
Seems to be a hk-type inference issue. Needs further investigation but
is not high priority right now.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Done in order to keep the basics as simple as possible.
Treating existentially bound parameters as still instantiatable type
parameters does not seem to add anything fundamental, and makes the
type system less regular.
|
|
|
|
|
| |
Pickling/unpickling of STABLE modifier allows to fix problem with
unpickling of path-dependent types (#982)
|
|
|
|
|
|
|
| |
As demonstrated by tests/pos/hk-deep-subtype.scala, we can avoid some
deep subtype recursions that result in stack overflows by doing this.
Fix #943.
|
|
|
|
|
|
|
|
|
| |
Previously, `isAsSpecific(alt1, tp1, alt2, tp2)` did not handle
having `tp2` be a polymorphic non-method type like `[A]Foo[A]`.
Also update the documentation of `isAsSpecific` to account for this
change, the new documentation is based on SLS ยง 6.26.3 but
adapted to reflect the code.
|
|\
| |
| | |
Fix #938
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
... to show that we support implicit patterns.
|
|
|
|
|
|
| |
The previous test was too struct, missed cases where
some arguments of the function were unbound. i583a.scala
contains a test case.
|
|\
| |
| | |
Make Definitions survive recompilation of core definitions.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/ |
|
|\
| |
| | |
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.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
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 numeric implicit args
|
| | | |
| | | |
| | | |
| | | | |
and explain why it's different now.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|\ \
| | |
| | | |
Fix #877
|
| | |
| | |
| | |
| | | |
Use freshName to name evidence parameters.
|
|\ \ \
| | | |
| | | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There is still an issue because math uses inner classes named
Ops which shadow each other. Dotty can't handle it, so implicit
search in `range` goes wrong. The new test has been modified
to work around that issue.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Allow pattern matching anonymous functions of arity > 1
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
This is sepcified in Sec. 8.5 of the SLS. Fixes #873. Review by @smarter.
|
| | | | |
| | | | |
| | | | |
| | | | | |
As suggested by review.
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`(_)` and `(_: T)` should not be converted to functions
x => x
(x: T) => x
|