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:
Eric Traut 2020-09-25 15:33:41 -07:00
parent a12449d45e
commit 693d10e3a1

View File

@ -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);