From bd3c1e1949935657cb7380c691a62ebc0b3b52ae Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 1 Nov 2024 15:47:51 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit semver: chore --- src/passer/typing/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/passer/typing/mod.rs b/src/passer/typing/mod.rs index b59d56d..ec94ec7 100644 --- a/src/passer/typing/mod.rs +++ b/src/passer/typing/mod.rs @@ -1,6 +1,6 @@ use super::{Passer, PasserResult}; use crate::parser::{ - ast::{Expression, ExpressionValue, Statement, StatementValue, Symbol, Type}, + ast::{Expression, ExpressionValue, Spannable, Statement, StatementValue, Symbol, Type, TypeValue}, expression, }; use miette::{Error, LabeledSpan, Report, Result}; @@ -50,7 +50,7 @@ impl Typing for Expression<'_> { fn possible_types(&self) -> Vec<(Type, miette::SourceSpan)> { match &self.value { ExpressionValue::Primitive(primitive) => vec![match primitive { - crate::parser::ast::Primitive::Integer(_) => (Type::Integer, self.span), + crate::parser::ast::Primitive::Integer(_) => Type::at(self.span, TypeValue::Integer), crate::parser::ast::Primitive::Decimal(_) => (Type::Decimal, self.span), crate::parser::ast::Primitive::String(_) => (Type::String, self.span), crate::parser::ast::Primitive::Identifier(value) => {