mirror of
https://github.com/microsoft/pyright.git
synced 2024-11-13 09:34:44 +03:00
Fixed a bug where spurious errors were generated when using an unannotated "self" as an argument to a constructor in a generic class.
This commit is contained in:
parent
a12449d45e
commit
693d10e3a1
@ -6242,6 +6242,8 @@ export function createTypeEvaluator(importLookup: ImportLookup, evaluatorOptions
|
||||
|
||||
let diag = new DiagnosticAddendum();
|
||||
|
||||
argType = makeTypeVarsConcrete(argType);
|
||||
|
||||
if (!canAssignType(argParam.paramType, argType, diag.createAddendum(), typeVarMap)) {
|
||||
if (!isDiagnosticSuppressedForNode(argParam.errorNode)) {
|
||||
const fileInfo = getFileInfo(argParam.errorNode);
|
||||
|
Loading…
Reference in New Issue
Block a user