Otherwise the guard is let at `NULL` (aka uninitialized) and will
ironically fail at runtime because the lazy guard is not initialized.
Signed-off-by: Jean Privat <jean@pryen.org>
return super
end
end
+
+redef class AAttrPropdef
+ redef fun init_expr(v, recv)
+ do
+ super
+ if is_lazy and v.compiler.modelbuilder.toolcontext.opt_no_union_attribute.value then
+ var guard = self.mlazypropdef.mproperty
+ v.write_attribute(guard, recv, v.bool_instance(false))
+ end
+ end
+end