| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Remove unused functionality
|
| |
|
|
|
|
|
| |
Move fixed logic to FirstTransform, where the other constant
folding operations are also done.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If A method like:
override def foo(x: Object*)
overrides a Java method, it needs to be rewritten as:
def foo(x: Seq[Object])
override def foo(x: Array[Object]): Object = foo(Predef.wrapRefArray(x))
This should be handled by ElimRepeated but there were two bugs:
- `addVarArgsBridge` was called at phase `thisTransformer.next`, this is
too late to create the bridge since `T*` has already been rewritten as
`Seq[T]`
- The original method symbol needs to have the `override` flag dropped,
since it doesn't override anything.
Furthermore, RefChecks had to be moved after ElimRepeated, otherwise the
testcase would fail the overriding checks.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the [type T] syntax, and what's associated to make it work.
Motivation: It's an alternative way of doing things for which there seems
to be little need. The implementation was provisional and bitrotted during
the various iterations to introduce higher-kinded types. So in the end the
complxity-cost for language and compiler was not worth the added benefit
that [type T] parameters provide.
Noe that we still accept _named arguments_ [A = T] in expressions; these are useful
for specifying some parameters and letting others be inferred.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Change 'forward reference extending over the definition' to Message
* Change 'forward reference extending over the definition' to Message
* pesky file should not be included
* Change 'forward reference extending over the definition' to Message (test case)
|
|
|
|
|
|
| |
* Change 'overrides nothing' to report via Message, split into two different messages
* Change 'overrides nothing' to report via Message, split into two different messages
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Illegal class overrides are fundamentally at odds with the way dotty
represents types and therefore can cause lots of low-level problems.
Two measures in this commit
First, we detect direct illegal class overrides on completion instead of
during RefChecks. Break the override by making the previously
overriding type private.
This fixes i1750.scala, but still fails for indirect overrides between
two unrelated outer traits/classes that are inherited by the same class or trait.
We fix this by catching the previously thrown ClassCastException
in both ExtractAPI and RefChecks.
Test case for indirect overrides is in i1750a.scala.
|
|
|
|
|
| |
1. Overriding a Java-8 concrete method now produces a migration warning under -language:Scala2,
2. Overriding a normal with a lazy val is now a migration warning instead of an error.
|
|
|
|
|
|
| |
Under language:Scala2, don't require an explicit `override' when
overriding default methods of Java traits. `scalac` does currently
the same thing.
|
| |
|
| |
|
| |
|
|
|