Skip to content

Feature: Case statement for class introspection

Ryan Joseph requested to merge case_label_classref into main

For example:

  c := TInterfacedObject.Create;

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

Tests can be found at:

freepascal.org/fpc/source#39535

Merge request reports