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
The compiler emits an exhaustion error in the following code:
sealedtraitEthernetTypeobjectEthernetType {
finalcaseobjectGigabitextendsEthernetTypefinalcaseobjectFastEthernetextendsEthernetTypefinaldeftoInt(t: EthernetType) = t match {
caseGigabit=>1caseFastEthernet=>2
}
}
matching.scala:7: warning: match may not be exhaustive.
It would fail on the following inputs: FastEthernet, Gigabit
final def toInt(t: EthernetType) = t match {
^
one warning found
If the match code is moved outside of the companion object, there is no exhaustion error.
The text was updated successfully, but these errors were encountered:
Matt Hughes (mhughes) said:
I couldn't find where to download 2.10.2 RC1, but I was still able to reproduce this issue in 2.11.0-M2. Would 2.11 not be getting the patches from 2.10.2?
The compiler emits an exhaustion error in the following code:
If the match code is moved outside of the companion object, there is no exhaustion error.
The text was updated successfully, but these errors were encountered: