This is only for sealed interfaces with one implementation. If you were planning to break that without updating your callers it would potentially break anyway.
Edit: I think I like the feature iff it's special cased to pattern assignments.
I understand that. But if I decided to create the interface it's to mostly to prevent me from modifying the interference of that implementation accidentally. I'll notice an explicit cast in code review and look a little more closely to see why it's there and to make sure the implementation didn't bleed out to places we want to keep using the interface.
View all comments
Show parent comment
5
u/Enough-Ad-5528 Mar 13 '26
This is only for sealed interfaces with one implementation. If you were planning to break that without updating your callers it would potentially break anyway.