mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-26 13:52:15 +00:00
Fix derive tests
This commit is contained in:
parent
a7b06fd7cf
commit
b782f013bd
3 changed files with 25 additions and 15 deletions
|
|
@ -150,7 +150,7 @@ impl DerivedModule {
|
|||
&self,
|
||||
lambda_set_var: Variable,
|
||||
target: &mut Subs,
|
||||
target_rank: Rank,
|
||||
_target_rank: Rank,
|
||||
) -> Variable {
|
||||
let ambient_function_var = self.subs.get_lambda_set(lambda_set_var).ambient_function;
|
||||
|
||||
|
|
@ -198,8 +198,19 @@ impl DerivedModule {
|
|||
.collect()
|
||||
}
|
||||
|
||||
pub fn decompose(self) -> IdentIds {
|
||||
self.derived_ident_ids
|
||||
/// # Safety
|
||||
///
|
||||
/// Prefer using a fresh Derived module with [`Derived::default`]. Use this only in testing.
|
||||
pub unsafe fn from_components(subs: Subs, ident_ids: IdentIds) -> Self {
|
||||
Self {
|
||||
map: Default::default(),
|
||||
subs,
|
||||
derived_ident_ids: ident_ids,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn decompose(self) -> (Subs, IdentIds) {
|
||||
(self.subs, self.derived_ident_ids)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue