diff --git a/ir/ts/tsInterfaceDeclaration.cpp b/ir/ts/tsInterfaceDeclaration.cpp index 6046a09be05b03b24637c0d023cd2bb763193834..4974d7282a1bb241b8148c4359e9b574e84f36e8 100644 --- a/ir/ts/tsInterfaceDeclaration.cpp +++ b/ir/ts/tsInterfaceDeclaration.cpp @@ -141,7 +141,8 @@ checker::Type *TSInterfaceDeclaration::InferType(checker::Checker *checker, bind binder::Variable *extendsVar = extends->Expr()->AsIdentifier()->Variable(); if (!extendsVar) { - checker->ThrowTypeError({"Cannot find name ", extendsVar->Name()}, extends->Start()); + checker->ThrowTypeError({"Cannot find name ", extends->Expr()->AsIdentifier()->Name()}, + extends->Start()); } if (!extendsVar->HasFlag(binder::VariableFlags::INTERFACE)) {