- changed status to resolved
Wrong implicit cast from "integer" to "JSONvariant".
Issue #181
resolved
Hi.
Please consider the following code:
var Output:=JSON.NewObject;
procedure Test(Value:JSONvariant);
begin
Output.Type:=Value.TypeName(); // TypeName returns "Undefined" but it's wrong.
end;
var Value:=10;
Test(Value);
As highlighted in the code comment above, when you call the Test procedure with a variable containing an integer value, the TypeName function returns the string "Undefined" but it's obviously wrong.
If you use it instead:
var Value:=10.0; // Value 10 writtes as float
Test(Value);
the function TypeName would correctly return the string "Number".
Comments (1)
-
repo owner - Log in to comment
Fixed Issue
#181added support for implicit conversions for connectors + test→ <<cset b1b07e360637>>