Skip to content

Commit

Permalink
Fixed bug with the provisional TypeForm support that breaks aliases…
Browse files Browse the repository at this point in the history
… of `Annotated`. This addresses #9092.
  • Loading branch information
erictraut committed Sep 26, 2024
1 parent cdcf40d commit 726b3a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pyright-internal/src/analyzer/typeEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ export function createTypeEvaluator(

updatedFlags &= ~EvalFlags.TypeFormArg;

if (node.d.annotation) {
if (node.d.annotation && (flags & EvalFlags.TypeExpression) !== 0) {
return getTypeOfExpression(node.d.annotation, updatedFlags);
}

Expand Down

0 comments on commit 726b3a0

Please sign in to comment.