- edited description
Set of Enumerations
Issue #240
resolved
I cannot compile the code bellow in DWS:
type
TEnum = (eOne = 1, eTwo, eThree, eFor);
type
TEnumSet = set of TEnum;
type
TMyClass = class
private
v: Set of TEnum;
procedure setEnum(value: TEnumSet);
function getEnum(): TEnumSet;
public
property Val: Set of TEnum read getEnum write setEnum;
end;
procedure TMyClass.setEnum(value: TEnumSet);
begin
v:= value;
end;
function TMyClass.getEnum(): TEnumSet;
begin
result := v;
end;
Output is:
Syntax Error: Field/method "getEnum" has an incompatible type
Syntax Error: Method "setEnum" has incompatible parameters
Comments (3)
-
reporter -
reporter - marked as trivial
-
repo owner - changed status to resolved
Fixed Issue
#240more permissive type matching when checking property getter/setter + test→ <<cset 2506cc5792a9>>
- Log in to comment