From 3cb259f419cf352f768728b15f849e520fc233cb Mon Sep 17 00:00:00 2001 From: Michael J Klein Date: Fri, 1 Nov 2024 08:05:49 -0400 Subject: [PATCH] fix: fix Alias and Error kinds (#6426) --- compiler/noirc_frontend/src/hir_def/types.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/noirc_frontend/src/hir_def/types.rs b/compiler/noirc_frontend/src/hir_def/types.rs index 3d4f3e77792..0eed79348e2 100644 --- a/compiler/noirc_frontend/src/hir_def/types.rs +++ b/compiler/noirc_frontend/src/hir_def/types.rs @@ -1358,23 +1358,24 @@ impl Type { TypeBinding::Unbound(_, ref type_var_kind) => type_var_kind.clone(), }, Type::InfixExpr(lhs, _op, rhs) => lhs.infix_kind(rhs), + Type::Alias(def, generics) => def.borrow().get_type(generics).kind(), + // This is a concrete FieldElement, not an IntegerOrField Type::FieldElement + | Type::Integer(..) | Type::Array(..) | Type::Slice(..) - | Type::Integer(..) | Type::Bool | Type::String(..) | Type::FmtString(..) | Type::Unit | Type::Tuple(..) | Type::Struct(..) - | Type::Alias(..) | Type::TraitAsType(..) | Type::Function(..) | Type::MutableReference(..) | Type::Forall(..) - | Type::Quoted(..) - | Type::Error => Kind::Normal, + | Type::Quoted(..) => Kind::Normal, + Type::Error => Kind::Any, } }