Skip to content

Commit 38b4a95

Browse files
authored
Merge pull request #4635 from svorenova/can-cast-nil
Add can_cast_expr for nil_exprt
2 parents a34c584 + 5083a34 commit 38b4a95

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/util/std_expr.h

+6
Original file line numberDiff line numberDiff line change
@@ -4131,6 +4131,12 @@ class nil_exprt : public nullary_exprt
41314131
}
41324132
};
41334133

4134+
template <>
4135+
inline bool can_cast_expr<nil_exprt>(const exprt &base)
4136+
{
4137+
return base.id() == ID_nil;
4138+
}
4139+
41344140
/// \brief The null pointer constant
41354141
class null_pointer_exprt:public constant_exprt
41364142
{

0 commit comments

Comments
 (0)