Variable in method in record generates error
Issue #99
resolved
The following DWS script...
type TCountry = record
property Code: String;
property Name: String;
method Test;
var i: Integer; // <- Error
begin
end;
end;
...generates the error:
Syntax Error: Record fields must be declared before record methods [line: 6, column: 3]
Comments (2)
-
repo owner -
repo owner - changed status to resolved
- Log in to comment
Inline method implementations cannot be made with the legacy syntax (as it is too ambiguous in that context), you have to use the modern syntax: