Rename parent to signer

This commit is contained in:
Pranav Gaddamadugu 2023-09-28 02:01:06 -04:00
parent 4abec6b5fc
commit 44658ca917
3 changed files with 6 additions and 6 deletions

View File

@ -116,16 +116,16 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
))
}
return Some(Type::Address);
},
sym::parent => {
}
sym::signer => {
// Check that operation is not invoked in a `finalize` block.
if self.is_finalize {
self.handler.emit_err(TypeCheckerError::invalid_operation_inside_finalize(
"self.parent",
"self.signer",
access.name.span(),
))
}
return Some(Type::Address)
return Some(Type::Address);
}
_ => {
self.emit_err(TypeCheckerError::invalid_self_access(access.name.span()));

View File

@ -252,10 +252,10 @@ symbols! {
main,
mapping,
Mut: "mut",
parent,
Return: "return",
SelfLower: "self",
SelfUpper: "Self",
signer,
Star: "*",
then,
transition,

View File

@ -387,7 +387,7 @@ create_messages!(
@formatted
invalid_self_access {
args: (),
msg: format!("The allowed accesses to `self` are `self.caller` and `self.parent`."),
msg: format!("The allowed accesses to `self` are `self.caller` and `self.signer`."),
help: None,
}