Fix #39535 Case statement for class introspection

I'm making a new merge request with freshly merged main since I corrupted the last branch trying to do a rebase.

Tests can be found at #39535

Merge request reports

Loading