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
Marking the Intermediate abstract class with sealed makes it show up.
Now, technically, the un-sealed abstract class could be extended by code elsewhere (and so all potential subclasses cannot be known), but I found this behavior of simply omitting the Bar very surprising... kind of dangerous because the omission is silent.
Could the macros be changed to include Bar (per the example), or maybe to emit a compiler warning/error about the missing 'sealed'?
The text was updated successfully, but these errors were encountered:
Hi,
This is perhaps not a bug, technically, but I found the behavior suprising.
It seems that 'intermediate' abstract classes in a hierarchy must themselves be explicitly marked as
sealed
forfindValues
to pick them up.Here's a little reproducer:
Will print
instead of the expected
Marking the
Intermediate
abstract class withsealed
makes it show up.Now, technically, the un-sealed abstract class could be extended by code elsewhere (and so all potential subclasses cannot be known), but I found this behavior of simply omitting the
Bar
very surprising... kind of dangerous because the omission is silent.Could the macros be changed to include
Bar
(per the example), or maybe to emit a compiler warning/error about the missing 'sealed'?The text was updated successfully, but these errors were encountered: