Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use correct type for numeric generics #4386

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/monomorphization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,6 @@
let mutable = definition.mutable;
let location = Some(ident.location);
let name = definition.name.clone();
let typ = self.interner.id_type(expr_id);
let definition = self.lookup_function(*func_id, expr_id, &typ, None);
let typ = self.convert_type(&typ);
let ident = ast::Ident { location, mutable, definition, name, typ: typ.clone() };
Expand Down Expand Up @@ -753,7 +752,8 @@

let value = FieldElement::from(value as u128);
let location = self.interner.id_location(expr_id);
ast::Expression::Literal(ast::Literal::Integer(value, ast::Type::Field, location))
let typ = self.convert_type(&typ);
ast::Expression::Literal(ast::Literal::Integer(value, typ, location))
}
}
}
Expand Down Expand Up @@ -967,7 +967,7 @@
// The second argument is expected to always be an ident
self.append_printable_type_info(&hir_arguments[1], &mut arguments);
} else if name.as_str() == "assert_message" {
// The first argument to the `assert_message` oracle is the expression passed as a mesage to an `assert` or `assert_eq` statement

Check warning on line 970 in compiler/noirc_frontend/src/monomorphization/mod.rs

View workflow job for this annotation

GitHub Actions / Code

Unknown word (mesage)
self.append_printable_type_info(&hir_arguments[0], &mut arguments);
}
}
Expand Down
Loading