Skip to content

Commit f762f97

Browse files
committed
Apply alias check for Boolean literals
1 parent b6e9af5 commit f762f97

File tree

1 file changed

+4
-1
lines changed
  • crates/ty_python_semantic/src/types

1 file changed

+4
-1
lines changed

crates/ty_python_semantic/src/types/enums.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ pub(crate) fn enum_metadata<'db>(
194194
// we don't know if it's a duplicate or not.
195195
if matches!(
196196
value_ty,
197-
Type::IntLiteral(_) | Type::StringLiteral(_) | Type::BytesLiteral(_)
197+
Type::BooleanLiteral(_)
198+
| Type::IntLiteral(_)
199+
| Type::StringLiteral(_)
200+
| Type::BytesLiteral(_)
198201
) {
199202
if let Some(previous) = enum_values.insert(value_ty, name.clone()) {
200203
aliases.insert(name.clone(), previous);

0 commit comments

Comments
 (0)