Bug? Null comparison results in error

wonder

Expert
Licensed User
Longtime User
Comparing an object with Null (or null object) works, but comparing Null with an object doesn't work.



Is this normal?

Here's Python for comparison (no errors):


It happens in both B4A and B4J.

Another example:
B4X:
Dim A As Object  
Dim B As Map
B.Initialize
Log(A == B.GetDefault("KEY", Null)) 'Works
Log(B.GetDefault("KEY", Null) == A) 'Crashes
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…