Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TMyType1 = class
- public type
- TMyType1Enum = (unknown, val1, val2);
- public
- constructor Create();
- ...
- end;
- TMyType2 = class
- public type
- TMyType2Enum = (unknown, other1, other2, other3); // causes E2004
- public
- constructor Create();
- ...
- end;
- type
- TFoo = (A, B, Foo);
- {$SCOPEDENUMS ON}
- TBar = (A, B, Bar);
- {$SCOPEDENUMS OFF}
- begin
- WriteLn(Integer(Foo));
- WriteLn(Integer(A)); // TFoo.A
- WriteLn(Integer(TBar.B));
- WriteLn(Integer(TBar.Bar));
- WriteLn(Integer(Bar)); // Error
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement