Use of IEquatable[of T] with value types can trigger NullReferenceExceptions
----------------------------------------------------------------------------
Key: BOO-1061
URL:
http://jira.codehaus.org/browse/BOO-1061 Project: Boo
Issue Type: Bug
Environment: Windows, SVN 3012
Reporter: Greg Nagel
Priority: Minor
{code}
import System
struct A(IEquatable[of A]):
_data as int
def Equals(other as A):
return _data == other._data
a = A()
b as IEquatable[of A] = A()
x as IEquatable[of A] = null
assert not a.Equals(x)
assert not b.Equals(x)
{code}
Both assertions fail above, whereas a == x and b == x work fine. Apparently the operator calls go through Boo.Lang.Runtime.RuntimeServices and are handled correctly, but a.Equals(x) and b.Equals(x) remain unchanged. It could be caused by the .net framework itself.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email