mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 04:43:37 -05:00
Check whether we have a class before testing whether we have a super-class.
This commit is contained in:
@@ -15872,6 +15872,9 @@ namespace ts {
|
||||
* In that case we won't consider it used before its declaration, because it gets its value from the superclass' declaration.
|
||||
*/
|
||||
function isPropertyDeclaredInAncestorClass(prop: Symbol): boolean {
|
||||
if (!(prop.parent.flags & SymbolFlags.Class)) {
|
||||
return false;
|
||||
}
|
||||
let classType = getTypeOfSymbol(prop.parent) as InterfaceType;
|
||||
while (true) {
|
||||
classType = getSuperClass(classType);
|
||||
|
||||
Reference in New Issue
Block a user