Compiler uses [] as empty set instead of empty array in default procedure parameter declaration
Original Reporter info from Mantis: dmz73 @dmz73
-
Reporter name:
Original Reporter info from Mantis: dmz73 @dmz73
- Reporter name:
Description:
When declaring a procedure with dynamic array parameter and specifying empty array as the default value, compiler reports Error: Incompatible types: got "Empty Set" expected "&LtPos;array type>".
If empty array is used in procedure call the error is not reported.
Steps to reproduce:
Compile the example project below:
program Project1;
type
TA1 = array of integer;
procedure Test(A: integer; const B: TA1 = []);
begin end;
begin
Test(1, []);
end.
Mantis conversion info:
- Mantis ID: 37272
- OS: Windows
- OS Build: 10
- Platform: x86_64
- Version: 3.2.0
- Fixed in version: 3.3.1
- Fixed in revision: 45706 (#eaa2a200)