Hi, we have a bug report. The following code:

------------------------------------------------------------------
import sys
sys.LoadAssemblyByName("System.Windows.Forms")
from System.Windows.Forms import *

if 1 == None:
    print "won't happen"

if DialogResult.Cancel == None: # boom!
    print "won't happen"
------------------------------------------------------------------

...raises a NullReferenceException, as follows, at the marked line.

------------------------------------------------------------------
Unhandled Exception: System.NullReferenceException: Object reference not 
set to
an instance of an object.
   at IronPython.Objects.EnumOps.Equal(Object self, Object other)
   at IronPython.Objects.Ops.Equal(Object x, Object y)
   at __main__.Initialize() in H:\dev\current\sandbox\testenumnone.py:line 8
------------------------------------------------------------------

We feel the expression should just evaluate to False.

Incidentally, should we be bothering the list with these things, or 
should we put them directly into the bug tracker?

Cheers
William
_______________________________________________
users mailing list
users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to