mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-24 10:41:57 +03:00
Address feedback
This commit is contained in:
parent
974e93cadf
commit
67f9890653
@ -322,11 +322,9 @@ impl<'a> TypeChecker<'a> {
|
|||||||
pub(crate) fn assert_type_is_valid(&self, span: Span, type_: &Type) {
|
pub(crate) fn assert_type_is_valid(&self, span: Span, type_: &Type) {
|
||||||
match type_ {
|
match type_ {
|
||||||
// Check that the named composite type has been defined.
|
// Check that the named composite type has been defined.
|
||||||
Type::Identifier(identifier) => {
|
Type::Identifier(identifier) if self.symbol_table.borrow().lookup_circuit(identifier.name).is_none() => {
|
||||||
if self.symbol_table.borrow().lookup_circuit(identifier.name).is_none() {
|
|
||||||
self.emit_err(TypeCheckerError::undefined_type(identifier.name, span));
|
self.emit_err(TypeCheckerError::undefined_type(identifier.name, span));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Check that the constituent types are valid.
|
// Check that the constituent types are valid.
|
||||||
Type::Tuple(tuple_type) => {
|
Type::Tuple(tuple_type) => {
|
||||||
for type_ in tuple_type.iter() {
|
for type_ in tuple_type.iter() {
|
||||||
|
Loading…
Reference in New Issue
Block a user