You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trait A {
def m() {}
}
trait B {
def m() {}
}
classCimplements A, B {
voidtest() {
m()
}
}
The method m() is defined by both traits A and B. Since C does not disambiguate by defining its own m(), the default conflict resolution policy states that m() comes from the last declared trait. However, type inferencing currently shows A as the declaring class.
The text was updated successfully, but these errors were encountered:
Consider the following:
The method
m()
is defined by both traitsA
andB
. SinceC
does not disambiguate by defining its ownm()
, the default conflict resolution policy states thatm()
comes from the last declared trait. However, type inferencing currently showsA
as the declaring class.The text was updated successfully, but these errors were encountered: