diff --git a/dust-lang/src/abstract_tree/as.rs b/dust-lang/src/abstract_tree/as.rs
index 8742acd..537ed93 100644
--- a/dust-lang/src/abstract_tree/as.rs
+++ b/dust-lang/src/abstract_tree/as.rs
@@ -12,7 +12,7 @@ use crate::{
Value,
};
-use super::{AbstractNode, Evaluation, Expression, Type, TypeConstructor};
+use super::{AbstractNode, Evaluation, Expression, SourcePosition, Type, TypeConstructor};
#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord, Serialize, Deserialize)]
pub struct As {
@@ -34,9 +34,10 @@ impl AbstractNode for As {
&self,
_context: &Context,
_manage_memory: bool,
+ scope: SourcePosition,
) -> Result<(), ValidationError> {
self.expression
- .define_and_validate(_context, _manage_memory)?;
+ .define_and_validate(_context, _manage_memory, scope)?;
match self.constructor {
TypeConstructor::Raw(_) => {}
@@ -50,9 +51,10 @@ impl AbstractNode for As {
self,
context: &Context,
_manage_memory: bool,
+ scope: SourcePosition,
) -> Result