-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I am not quite sure about he previous definition of superType in SuperType. I believe it's probably needed for something. But it's clearly wrong if the `supertpe` argument does not have a symbol. We now fall back to the default ``` def superType = underlying ``` in this case. Fixes #17555
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
class Root { | ||
override def toString() = "Root" | ||
} | ||
trait A extends Root with B { } | ||
trait B { | ||
override def toString() = "B" | ||
} | ||
case class C() extends A { | ||
override def toString() = super.toString() | ||
} | ||
class D() extends A, Serializable { | ||
override def toString() = super.toString() | ||
} | ||
|
||
@main def Test = | ||
assert(C().toString == "B") | ||
assert(D().toString == "B") |