Record variable can not be initialized by named constant
Original Reporter info from Mantis: Ask
-
Reporter name: Alexander S. Klenin
Original Reporter info from Mantis: Ask
- Reporter name: Alexander S. Klenin
Description:
{$mode objfpc}
type t = record x: Integer; end;
const c: t = (x: 5);
var y: t = c;
begin
end.
Results in
Syntax error, "(" expected but "identifier C" found
Additional information:
Documentation is unclear on what kind of expression is allowed as initializer.
However, named constants of other types seem to work, so I assume
this is an oversight rather than a design feature.
Mantis conversion info:
- Mantis ID: 13256
- Version: 2.2.3