mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 19:22:01 +03:00
Rename parent to signer
This commit is contained in:
parent
4abec6b5fc
commit
44658ca917
@ -116,16 +116,16 @@ impl<'a> ExpressionVisitor<'a> for TypeChecker<'a> {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
return Some(Type::Address);
|
return Some(Type::Address);
|
||||||
},
|
}
|
||||||
sym::parent => {
|
sym::signer => {
|
||||||
// Check that operation is not invoked in a `finalize` block.
|
// Check that operation is not invoked in a `finalize` block.
|
||||||
if self.is_finalize {
|
if self.is_finalize {
|
||||||
self.handler.emit_err(TypeCheckerError::invalid_operation_inside_finalize(
|
self.handler.emit_err(TypeCheckerError::invalid_operation_inside_finalize(
|
||||||
"self.parent",
|
"self.signer",
|
||||||
access.name.span(),
|
access.name.span(),
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
return Some(Type::Address)
|
return Some(Type::Address);
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
self.emit_err(TypeCheckerError::invalid_self_access(access.name.span()));
|
self.emit_err(TypeCheckerError::invalid_self_access(access.name.span()));
|
||||||
|
@ -252,10 +252,10 @@ symbols! {
|
|||||||
main,
|
main,
|
||||||
mapping,
|
mapping,
|
||||||
Mut: "mut",
|
Mut: "mut",
|
||||||
parent,
|
|
||||||
Return: "return",
|
Return: "return",
|
||||||
SelfLower: "self",
|
SelfLower: "self",
|
||||||
SelfUpper: "Self",
|
SelfUpper: "Self",
|
||||||
|
signer,
|
||||||
Star: "*",
|
Star: "*",
|
||||||
then,
|
then,
|
||||||
transition,
|
transition,
|
||||||
|
@ -387,7 +387,7 @@ create_messages!(
|
|||||||
@formatted
|
@formatted
|
||||||
invalid_self_access {
|
invalid_self_access {
|
||||||
args: (),
|
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,
|
help: None,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user