When migrating from XSharp 2.6 to 2.7, the code with implicit casting for Nullable variables stopped compiling.
Error: XS0266 Cannot implicitly convert type 'int?' to 'dword'. An explicit conversion exists (are you missing a cast?)
Code example:
Code: Select all
LOCAL a AS BYTE[]
a := <BYTE>{ 1, 2, 3 }
LOCAL dwLength AS DWORD
dwLength := a?:Length
I was able to easily work around this problem by explicitly casting to DWORD.
Code: Select all
dwLength := (DWORD)a?:Length
Best regards,
Leonid