mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Fix types SoA usage in solve
This commit is contained in:
parent
6b5f632364
commit
a2e90c3709
6 changed files with 30 additions and 16 deletions
|
@ -586,6 +586,13 @@ impl Types {
|
|||
(tags, payload_slices)
|
||||
}
|
||||
|
||||
/// # Safety
|
||||
///
|
||||
/// May only be called if `var` is known to represent the type at `index`.
|
||||
pub unsafe fn set_variable(&mut self, index: Index<TypeTag>, var: Variable) {
|
||||
self.tags[index.index()] = TypeTag::Variable(var);
|
||||
}
|
||||
|
||||
fn reserve_type_tags(&mut self, length: usize) -> Slice<TypeTag> {
|
||||
use std::iter::repeat;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue