mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Correct sorting of generated procs for mono test
This commit is contained in:
parent
42fe19541e
commit
c5dd688e3e
1 changed files with 7 additions and 4 deletions
|
@ -184,14 +184,17 @@ fn verify_procedures<'a>(
|
|||
.map(|proc| proc.to_pretty(&interner, 200, false))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
procs_string.sort();
|
||||
|
||||
if let Some(main_fn_symbol) = opt_main_fn_symbol {
|
||||
let opt_main_fn = opt_main_fn_symbol.map(|main_fn_symbol| {
|
||||
let index = procedures
|
||||
.keys()
|
||||
.position(|(s, _)| *s == main_fn_symbol)
|
||||
.unwrap();
|
||||
let main_fn = procs_string.swap_remove(index);
|
||||
procs_string.swap_remove(index)
|
||||
});
|
||||
|
||||
procs_string.sort();
|
||||
|
||||
if let Some(main_fn) = opt_main_fn {
|
||||
procs_string.push(main_fn);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue