Hi,
Any conditional define used in the local variable declaration section of a method produces the (E760) Attributes are not allowed on local variables error. Even if there aren’t any attributes used.
Elements version: RemObjects Elements with Water - 11.0.0.2767.exe.
procedure DoSomething;
{$IFNDEF ELEMENTS}
var
x: Integer;
{$ELSE}
var //Error; (E760) Attributes are not allowed on local variables
x: String;
{$ENDIF}
begin
{$IFNDEF ELEMENTS}
x := 5;
{$ELSE}
x := 'Hello World!';
{$ENDIF}
end;