Reference != None returns True, not an expression

Bug #244768 reported by Stuart Bishop
2
Affects Status Importance Assigned to Milestone
Storm
Fix Released
Undecided
James Henstridge

Bug Description

When Bar.foo is a reference, Bar.foo != None does not work. Not(Bar.foo == None) works, as does Ne(Bar.foo, None).

Bar.foo == None => <storm.expr.Eq object at 0x7fe141275490>
Bar.foo != None => True
Ne(Bar.foo, None) => <storm.expr.Ne object at 0x7fe141275490>
Ne(None, Bar.foo) => <storm.expr.Ne object at 0x7fe141275490>

Tags: tech-debt

Related branches

Revision history for this message
Stuart Bishop (stub) wrote :
Revision history for this message
James Henstridge (jamesh) wrote :

Storm's Reference class has an __eq__ method that allows the first form to work. It will need an __ne__ method to support the second form.

The last two examples probably won't compile since there is no compile function for Reference objects.

Revision history for this message
James Henstridge (jamesh) wrote :

Fixed in r281

Changed in storm:
assignee: nobody → jamesh
status: New → Fix Committed
Thomas Herve (therve)
Changed in storm:
status: Fix Committed → Fix Released
Curtis Hovey (sinzui)
tags: added: tech-debt
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.