Named arguments for invokeable variants may be mixed with positional arguments
Original Reporter info from Mantis: stjcottbus
-
Reporter name: Stephan Jaschke
Original Reporter info from Mantis: stjcottbus
- Reporter name: Stephan Jaschke
Description:
Hello.
Following snippet compiles fine with Fpc and fails with Delphi:
var
VarTest: Variant;
V := VarTest.Method(1, ArgX := 2, 3, ArgY := 4, 5)
Here positional and named arguments are mixed, but it's impossible to
match the argument names in DispInvoke to the corresponding values.
According to the response of PascalDragon in
https://forum.lazarus.freepascal.org/index.php/topic,45319.0.html
this should not compile.
"Positional arguments must be before named arguments."
Steps to reproduce:
A simple program:
program Test;
var
V, VarTest: Variant;
begin
V := VarTest.Method(1, ArgX := 2, 3, ArgY := 4, 5)
end.
This should NOT compile!
Mantis conversion info:
- Mantis ID: 35591
- Build: 3.0.4 [2018/10/29] for x86_64
- Version: 3.0.4