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
I would understand it not being included in the docs if this was experimental feature, but it seems to work in both Scala 2 and Scala 3. Specifically I mean this extremely helpful @ operator which allows you to both unapply the object for matching and upcast it for use in the code branch:
case a @A(x) => a.classASpecificStuff()
case b @B(x) if x >0=> b.classBSpecificStuff()
The text was updated successfully, but these errors were encountered:
I would understand it not being included in the docs if this was experimental feature, but it seems to work in both Scala 2 and Scala 3. Specifically I mean this extremely helpful
@
operator which allows you to both unapply the object for matching and upcast it for use in the code branch:The text was updated successfully, but these errors were encountered: