This commit is contained in:
Jeff 2024-06-18 18:54:17 -04:00
parent b0d80ab867
commit d5df74363a

View File

@ -50,10 +50,10 @@ impl<'a> Context<'a> {
}
pub fn get_type(&self, identifier: &Identifier) -> Result<Option<Type>, ValidationError> {
if let Some((value_data, _)) = self.variables.read()?.get(identifier) {
if let Some((data, _)) = self.variables.read()?.get(identifier) {
log::trace!("Getting {identifier}'s type.");
let r#type = match value_data {
let r#type = match data {
VariableData::Type(r#type) => r#type.clone(),
VariableData::Value(value) => value.r#type(self)?,
};