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
packageakka.eventsealedtraitLogEventobjectLogEvent:defmyOrdinal(e: LogEvent):Int= e matchcasee: Error=>0// case e: Warning => 1casee: LogEventWithMarker=>2caseclassError() extendsLogEventclassError2() extendsError() withLogEventWithMarker// case class Warning() extends LogEventsealedtraitLogEventWithMarkerextendsLogEvent
Output
compiles fine
Expectation
there should be an unreachable warning for case e: LogEventWithMarker, as which happens when we add another child to LogEvent (uncomment the lines in the example)