mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
cleanup
This commit is contained in:
parent
308b91153e
commit
3e640f78bf
2 changed files with 7 additions and 2 deletions
|
@ -454,7 +454,7 @@ fn can_annotation_help(
|
|||
None => Type::EmptyTagUnion,
|
||||
}
|
||||
} else {
|
||||
let tag_types = can_tags(
|
||||
let mut tag_types = can_tags(
|
||||
env,
|
||||
tags.items,
|
||||
region,
|
||||
|
@ -465,6 +465,11 @@ fn can_annotation_help(
|
|||
references,
|
||||
);
|
||||
|
||||
// sort here; we later instantiate type aliases, so this type might get duplicated
|
||||
// many times. Then, when inserting into the subs, the tags are sorted.
|
||||
// in theory we save a lot of time by sorting once here
|
||||
tag_types.sort_by(|a, b| a.0.cmp(&b.0));
|
||||
|
||||
Type::TagUnion(tag_types, Box::new(ext_type))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue