adds self canonicalization for static calls

This commit is contained in:
damirka 2021-08-02 18:25:12 +03:00
parent 15599c71ce
commit a9a684ef2b

View File

@ -276,6 +276,11 @@ impl Canonicalizer {
span: call.span.clone(),
});
}
Expression::Identifier(identifier) => {
if identifier.name.as_ref() == "Self" && self.circuit_name.is_some() {
return Expression::Identifier(self.circuit_name.as_ref().unwrap().clone());
}
}
_ => {}
}