In WASM, if you use an object initializer to assign a value from a static property to one of the object properties it can cause a preceding 'if' statement to evaluate incorrectly.
'if' statements should behave predictably.
Launch the attached project in UWP and observe that clicking either button results in a "null tests passed" message. Launch in WASM and observe that clicking the button including object instantiation fails. In the console you can further observe that while string1 and string2 independently evaluate as not being null or empty, if evaluated together they will return that one of them was null or empty.
All logic behaves consistently in the method that does not assign a value from a static property in an object initializer.
Nuget Package:
Uno.UI
Package Version(s):
2.1.0-dev.1338
Affected platform(s):
Visual Studio:
Relevant plugins:
Thank you for the repro case.
From what I can see, this was a linker issue (adding <WasmShellILLinkerEnabled>false</WasmShellILLinkerEnabled> fixes the issue), but it has already been fixed in a more recent build of mono.
I'll make an update of the runtime in a bootstrapper update.
Thanks for taking care @jeromelaban. @peternary will look into asap.
Working for me as of latest version!
Most helpful comment
Thanks for taking care @jeromelaban. @peternary will look into asap.