vyper Version (output of vyper --version OR linkable commit hash vyperlang/vyper@): vyperlang/vyper@b43fface148b45cbd2c90b5d24f77398a63745b5
Issue Description
The following creates an IR node for global attribute
expr.parse_Attribute(). However, with the introduction of modules, it
is no longer safe to assume that the attribute is from the self
object.
if (varinfo := self.expr._expr_info.var_info) is not None:
if varinfo.is_constant:
return Expr.parse_value_expr(varinfo.decl_node.value, self.context)
location = data_location_to_address_space(
varinfo.location, self.context.is_ctor_context
)
ret = IRnode.from_list(
varinfo.position.position,
typ=varinfo.typ,
location=location,
annotation="self." + self.expr.attr,
)
ret._referenced_variables = {varinfo}
return ret
Version Information
vyper --version
OR linkable commit hash vyperlang/vyper@Issue Description
The following creates an IR node for global attribute
expr.parse_Attribute()
. However, with the introduction of modules, it is no longer safe to assume that the attribute is from theself
object.