Signed-off-by: Jean Privat <jean@pryen.org>
self.add("\{")
end
if not self.compiler.modelbuilder.toolcontext.opt_no_shortcut_equate.value and (mmethod.name == "==" or mmethod.name == "!=") then
- if res == null then res = self.new_var(bool_type)
- # Recv is not null, thus is arg is, it is easy to conclude (and respect the invariants)
+ # Recv is not null, thus if arg is, it is easy to conclude (and respect the invariants)
var arg = arguments[1]
if arg.mcasttype isa MNullType then
+ if res == null then res = self.new_var(bool_type)
if mmethod.name == "==" then
self.add("{res} = 0; /* arg is null but recv is not */")
else