Skip to content

Commit

Permalink
fix: fix Alias and Error kinds (#6426)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljklein authored Nov 1, 2024
1 parent f8fd813 commit 3cb259f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions compiler/noirc_frontend/src/hir_def/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down

0 comments on commit 3cb259f

Please sign in to comment.