Hi
In wasm module using inc() (and maybe dec()) doesn’t work inside a with clause. Here is a test case :
namespace _Module;
type
TTest = record
i1 : Integer ;
i2 : Integer ;
end;
[Export]
Program = public class
public
method Main;
begin
writeLn('The magic happens here.');
var test : TTest ;
test.i1 := 10 ;
test.i2 := 10 ;
with test do begin
i1 := i1 + 1 ; // OK
i2 := i2 + 1 ; // OK
inc( i2 ) ; // ERROR - does not work !
end ;
assert( test.i1 = 11 ) ;
assert( test.i2 = 12 ) ;
end;
end;
end.
The module is compiled with Delphi Compatibility and Legacy “with” options.