mirror of
https://github.com/microsoft/pyright.git
synced 2024-08-17 03:40:44 +03:00
Fixed a bug that results in a false positive reportImplicitOverride
diagnostic if the class derives from an Unknown or Any class. This addresses #7560.
This commit is contained in:
parent
6ef2ca1b27
commit
1001904ff5
@ -6220,6 +6220,11 @@ export class Checker extends ParseTreeWalker {
|
||||
return;
|
||||
}
|
||||
|
||||
// If the base class is unknown, don't report a missing decorator.
|
||||
if (isAnyOrUnknown(baseMember.classType)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const funcNode = overrideFunction.details.declaration.node;
|
||||
this._evaluator.addDiagnostic(
|
||||
DiagnosticRule.reportImplicitOverride,
|
||||
|
Loading…
Reference in New Issue
Block a user