mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-15 10:50:44 +03:00
Fixed a bug in the "type printer" (the component responsible for translating a type into its textual form) for type aliases defined using PEP 695 syntax.
This commit is contained in:
parent
a03eb8492e
commit
6dc3b39902
@ -449,8 +449,19 @@ function printTypeInternal(
|
||||
typeToWrap = `Literal[${printLiteralValue(type)}]`;
|
||||
}
|
||||
} else {
|
||||
if (type.specialForm) {
|
||||
return printTypeInternal(
|
||||
type.specialForm,
|
||||
printTypeFlags,
|
||||
returnTypeCallback,
|
||||
uniqueNameMap,
|
||||
recursionTypes,
|
||||
recursionCount
|
||||
);
|
||||
}
|
||||
|
||||
typeToWrap = printObjectTypeForClassInternal(
|
||||
type.specialForm ?? type,
|
||||
type,
|
||||
printTypeFlags,
|
||||
returnTypeCallback,
|
||||
uniqueNameMap,
|
||||
|
Loading…
Reference in New Issue
Block a user