core: Deduplicate values in Literal
Matches the behavior with `typing.Literal`.
This commit is contained in:
parent
457d3b6cd7
commit
0bbc9ce6f5
@ -388,7 +388,7 @@ impl Unifier {
|
|||||||
loc: Option<Location>,
|
loc: Option<Location>,
|
||||||
) -> Type {
|
) -> Type {
|
||||||
let ty_enum = TypeEnum::TLiteral {
|
let ty_enum = TypeEnum::TLiteral {
|
||||||
values: values.clone(),
|
values: values.into_iter().dedup().collect(),
|
||||||
loc
|
loc
|
||||||
};
|
};
|
||||||
self.add_ty(ty_enum)
|
self.add_ty(ty_enum)
|
||||||
|
Loading…
Reference in New Issue
Block a user