Store expects type index

This commit is contained in:
Ayaz Hafiz 2022-10-24 18:20:18 -05:00
parent 278754506f
commit bff3d534f6
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 34 additions and 19 deletions

View file

@ -600,12 +600,11 @@ impl Constraints {
pub fn store(
&mut self,
typ: Type,
type_index: TypeOrVar,
variable: Variable,
filename: &'static str,
line_number: u32,
) -> Constraint {
let type_index = self.push_type(typ);
let string_index = Index::push_new(&mut self.strings, filename);
Constraint::Store(type_index, variable, string_index, line_number)