Feature: Case statement for class introspection

For example:

  c := TInterfacedObject.Create;

  case c of
    TObject:            result := 1;
    TInterfacedObject:  result := 2;
    TAggregatedObject:  result := 3;
    otherwise           result := 4;
  end;

Feature branch: https://gitlab.com/genericptr/free-pascal/-/commits/case_label_classref

class_case_tests.zip

Edited by Ryan Joseph
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information