mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
fixup! Reproduce principality bug
This commit is contained in:
parent
452e59c7a3
commit
e23bff79ac
1 changed files with 14 additions and 2 deletions
|
@ -248,9 +248,21 @@ mod test_load {
|
|||
"Principal.identity" => "a -> a",
|
||||
};
|
||||
|
||||
assert_eq!(expected_types.len(), module.defs.len());
|
||||
assert_eq!(expected_types.len(), module.declarations.len());
|
||||
|
||||
for def in module.defs {
|
||||
for decl in module.declarations {
|
||||
let def = match decl {
|
||||
Declare(def) => def,
|
||||
rec_decl @ DeclareRec(_) => {
|
||||
panic!(
|
||||
"Unexpected recursive def in module declarations: {:?}",
|
||||
rec_decl
|
||||
);
|
||||
}
|
||||
cycle @ InvalidCycle(_, _) => {
|
||||
panic!("Unexpected cyclic def in module declarations: {:?}", cycle);
|
||||
}
|
||||
};
|
||||
for (symbol, expr_var) in def.pattern_vars {
|
||||
let content = subs.get(expr_var).content;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue