| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Drop checking that lower bound is a subtype of upper bound.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
needed to turn some errors into warnings.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
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
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
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.
|
| | |
|
|\ \
| | |
| | | |
Fix #884 - misdiagnosed ambiguous definition.
|
| |/
| |
| |
| |
| | |
Universal equality strikes again. Caused a bug in
isDefinedInCurrentUnit.
|
|/
|
|
| |
If an error message was supressed to count it in the total.
|
|
|
|
| |
Enforces various restrictions of definitions.
|
| |
|
|\
| |
| | |
Check that some types are not higher-kinded.
|
| |
| |
| |
| | |
Invalidates #813. Review by @darkdimius.
|
|/
|
|
| |
Fixes #822
|
|
|
|
|
|
|
|
| |
Whenchecking whether two denotations match it is not enough
to look at the signatures. The signatures might match (on the
parameters) but the actual parametre types might be different.
The change always tests infos after signatures, effectively
turning the signature test into a pre-filter.
|
| |
|
|
|
|
| |
...unless the HK type can be eta-reduced to a class type.
|
| |
|
|\
| |
| | |
Fix #756 super accessors
|
| |
| |
| |
| |
| | |
There was a transcription error from scalac which caused the scope
of a `!` to be wrong.
|
| |
| |
| |
| |
| | |
Introduce a new non-terminal "SimpleLiteral". Only SimpleLiterals can be
types.
|
| |
| |
| |
| |
| | |
Tested are now other numeric values, strings, booleans, which are
all legal singleton types.
|
|/
|
|
|
|
| |
As the comment in pos/singletons.scala says, we currently
test only constant propagation during typer. We should also have a
test that literalize produces the literals in the right places.
|
|
|
|
| |
This reverts commit c8afd79b4c7f145ba090a2d936d627c3ab35b1c2.
|
|
|
|
|
| |
Phase lifts tries that would be illegal because they execute on non-empty
expression stacks.
|
|
|
|
|
| |
Disable the check because if fails for desugar.scala and also in some dotty files.
This test failed before the addition of NonLocalReturns.
|
|\
| |
| | |
Ycheck that methods defined in ClassInfo exist in tree.
|
| | |
|
|\ \
| | |
| | | |
Enable Ycheck after labelDef. Fixes #701
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Done by setting an environment variable and checking it in runtime.
This enables Ycheck:all for all kinds of tests, including partest.
|
| |/ |
|
|\ \
| | |
| | | |
Avoid crashes on double definitions
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
As the spec[1] says:
"The parts of a type T are [...] if T is an abstract type, the parts of
its upper bound;"
[1]: http://www.scala-lang.org/files/archive/spec/2.11/07-implicits.html#implicit-parameters
|
|\ \
| | |
| | | |
Check that dotty is reentrant
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
What is checked: A self type T is a subtype of all
selftypes of classes refernced by T. That is, a self type
has to subsume all self types of its required type. Ot,
otherwise said, requirements must be closed; you cannot
discover new ones in following them.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A TypeRef can have be unresolved, either because it refers to something that's missing
from the classpath or because of transitive self type references. Instead of crashing
in sigName, we now report the error.
Achieved by defining a new exception type, MissingType, which derives from TypeError.
This catches t7933.scala, now integrated in the neg/selfreq.scala. The problem there was
a reference to AbsSettings, which was not a member of StandardScalaSettings.this,
but was a member of the required type of AbsSettings, which itself appeared in the
required type of StandardScalaSettings. We will outlaw in the next commit such transitive
required references.
Also collapsed TypeError and FatalTypeError. It was a misnomer anyway. Fatal were those
type errors that were caught and reported!
Open: Where else we should check for unresolved NamedTypes.
|
|\ \
| |/
|/| |
Fix/dependent methods
|
| |
| |
| |
| | |
Previously, we could die with a <notype> when an implicit argument was not found.
|