forked from M-Labs/nac3
1
0
Fork 0

core: Deduplicate values in `Literal`

Matches the behavior with `typing.Literal`.
This commit is contained in:
David Mak 2023-12-15 12:26:43 +08:00 committed by sb10q
parent 457d3b6cd7
commit 0bbc9ce6f5
1 changed files with 1 additions and 1 deletions

View File

@ -388,7 +388,7 @@ impl Unifier {
loc: Option<Location>,
) -> Type {
let ty_enum = TypeEnum::TLiteral {
values: values.clone(),
values: values.into_iter().dedup().collect(),
loc
};
self.add_ty(ty_enum)