Skip to content

Conversation

dynst
Copy link
Contributor

@dynst dynst commented Oct 15, 2025

These did nothing; the discriminator type member is on the base type for this exact reason.

It's nonsensical to cast to the type before you check if it
actually is that type, inside the function for checking that.
@webmaster128
Copy link
Member

Oh they do something: avoid typos in the type name string literal

@dynst
Copy link
Contributor Author

dynst commented Oct 15, 2025

That does sound useful, at least when first writing the code. Added the missing unit tests to prevent potential future typos!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants