Skip to content

Commit

Permalink
Fixed a bug that leads to incorrect type evaluation in certain specif…
Browse files Browse the repository at this point in the history
…ic conditions involving a function decorator with an return type inferred from an inner function parameterized by a ParamSpec. This addresses #8779. (#8780)
  • Loading branch information
erictraut authored Aug 17, 2024
1 parent bea4dc9 commit 48bb33b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/pyright-internal/src/analyzer/typeEvaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11743,6 +11743,8 @@ export function createTypeEvaluator(
return returnType;
}

inferReturnTypeIfNecessary(returnType);

// Create a new scope ID based on the caller's position. This
// will guarantee uniqueness. If another caller uses the same
// call and arguments, the type vars will not conflict.
Expand Down

0 comments on commit 48bb33b

Please sign in to comment.