Given this :-
type NodeLevel = (Hub=0,LocationType=1,Location=2);
In the following, lTreeNode.Level
is an Integer.
This fails to compile :-
case lTreeNode.Level = NodeLevel.Hub of
false : exit;
end;
Error (E64) Type mismatch, cannot find operator to evaluate “Int32” = “NodeLevel”
This compiles and works :-
case lTreeNode.Level of
NodeLevel.Hub : ;
else exit;
end;
Surely both variants are having to compare Int32 values or am I being dim and missing something simple ?