From 44658ca9177e9529d2074fab058e4d1417078f74 Mon Sep 17 00:00:00 2001 From: Pranav Gaddamadugu Date: Thu, 28 Sep 2023 02:01:06 -0400 Subject: [PATCH] Rename parent to signer --- compiler/passes/src/type_checking/check_expressions.rs | 8 ++++---- compiler/span/src/symbol.rs | 2 +- errors/src/errors/type_checker/type_checker_error.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compiler/passes/src/type_checking/check_expressions.rs b/compiler/passes/src/type_checking/check_expressions.rs index b3a9ad0e78..03771fed26 100644 --- a/compiler/passes/src/type_checking/check_expressions.rs +++ b/compiler/passes/src/type_checking/check_expressions.rs @@ -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())); diff --git a/compiler/span/src/symbol.rs b/compiler/span/src/symbol.rs index ba32252e0c..789f8f3ec1 100644 --- a/compiler/span/src/symbol.rs +++ b/compiler/span/src/symbol.rs @@ -252,10 +252,10 @@ symbols! { main, mapping, Mut: "mut", - parent, Return: "return", SelfLower: "self", SelfUpper: "Self", + signer, Star: "*", then, transition, diff --git a/errors/src/errors/type_checker/type_checker_error.rs b/errors/src/errors/type_checker/type_checker_error.rs index f458c1adbd..c8b932225c 100644 --- a/errors/src/errors/type_checker/type_checker_error.rs +++ b/errors/src/errors/type_checker/type_checker_error.rs @@ -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, }