Skip to content

Commit

Permalink
Improved misleading diagnostic message when attempting to call a spec…
Browse files Browse the repository at this point in the history
…ial type form.
  • Loading branch information
erictraut committed Feb 5, 2024
1 parent 626f655 commit ae4bc87
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 @@ -9086,7 +9086,7 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
addDiagnostic(
DiagnosticRule.reportCallIssue,
LocMessage.objectNotCallable().format({
type: printType(callTypeResult.type, { expandTypeAlias: true }),
type: printType(callTypeResult.type.specialForm, { expandTypeAlias: true }),
}),
exprNode
);
Expand Down

0 comments on commit ae4bc87

Please sign in to comment.