/arkcompiler/ets_frontend/es2panda/typescript/core/ |
H A D | helpers.cpp | 41 ThrowTypeError("An expression of type void cannot be tested for truthiness", lineInfo); in CheckTruthinessOfType() 48 ThrowTypeError("Object is possibly 'null'.", lineInfo); in CheckNonNullType() 52 ThrowTypeError("Object is possibly 'undefined'.", lineInfo); in CheckNonNullType() 105 ThrowTypeError({"Cannot assign to '", name, "' because it is not a variable."}, expr->Start()); in CheckReferenceExpression() 109 ThrowTypeError(invalidOptionalChainMsg, expr->Start()); in CheckReferenceExpression() 112 ThrowTypeError(invalidReferenceMsg, expr->Start()); in CheckReferenceExpression() 284 ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", AsSrc(rightType)}, in ThrowBinaryLikeError() 288 ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", rightType}, lineInfo); in ThrowBinaryLikeError() 295 ThrowTypeError({"Type '", AsSrc(source), "' is not assignable to type '", target, "'."}, lineInfo); in ThrowAssignmentError() 298 ThrowTypeError({"Typ in ThrowAssignmentError() [all...] |
H A D | binaryLikeExpression.cpp | 54 ThrowTypeError( in CheckBinaryOperator() 61 ThrowTypeError( in CheckBinaryOperator() 69 ThrowTypeError( in CheckBinaryOperator() 83 ThrowTypeError({"operator ", op, " cannot be applied to types 'bigint' and 'bigint'"}, expr->Start()); in CheckBinaryOperator() 110 ThrowTypeError("object is of type 'unknown'", leftExpr->Start()); in CheckPlusOperator() 112 ThrowTypeError("object is of type 'unknown'", rightExpr->Start()); in CheckPlusOperator() 177 ThrowTypeError({"The left-hand side of an 'instanceof' expression must be of type 'any',", in CheckInstanceofExpression() 184 ThrowTypeError({"The right-hand side of an 'instanceof' expression must be of type 'any'", in CheckInstanceofExpression() 200 ThrowTypeError( in CheckInExpression() 207 ThrowTypeError("Th in CheckInExpression() [all...] |
H A D | function.cpp | 61 ThrowTypeError("A function returning 'never' cannot have a reachable end point.", in HandleFunctionReturn() 105 ThrowTypeError("Return type annotation circularly reference itself", func->ReturnTypeAnnotation()->Start()); in ThrowReturnTypeCircularityError() 109 ThrowTypeError({func->Id()->AsIdentifier()->Name(), in ThrowReturnTypeCircularityError() 115 ThrowTypeError( in ThrowReturnTypeCircularityError() 129 ThrowTypeError({"Parameter ", param->Name(), " implicitly has any type."}, param->Start()); in CheckFunctionIdentifierParameter() 289 ThrowTypeError("A rest parameter must be of an array type", param->Start()); in CheckFunctionRestParameter() 555 ThrowTypeError("Function implementation is missing or not immediately following the declaration.", in InferFunctionDeclarationType() 569 ThrowTypeError("Function implementation is missing or not immediately following the declaration.", in InferFunctionDeclarationType() 576 ThrowTypeError("Function implementation is missing or not immediately following the declaration.", in InferFunctionDeclarationType() 581 ThrowTypeError("Overloa in InferFunctionDeclarationType() [all...] |
H A D | destructuringContext.cpp | 58 checker_->ThrowTypeError({"Cannot find name '", ident->Name(), "'."}, ident->Start()); in HandleDestructuringAssignment() 119 checker_->ThrowTypeError({"Object literal may only specify known properties, and property '", sourceName, in ValidateObjectLiteralType() 204 checker_->ThrowTypeError( in ValidateInferedType() 212 checker_->ThrowTypeError( in ValidateInferedType() 247 checker_->ThrowTypeError({"Tuple type ", inferedType_, " of length ", in NextInferedType() 278 checker_->ThrowTypeError({"Property ", index_, " does not exist on type ", inferedType_, "."}, in NextInferedType() 579 checker_->ThrowTypeError("Rest types may only be created from object types.", loc); in GetRestType() 589 checker_->ThrowTypeError("Rest types may only be created from object types.", loc); in GetRestType() 641 checker_->ThrowTypeError({"Property ", searchName, " does not exist on type ", inferedType_, "."}, in NextInferedType()
|
H A D | object.cpp | 78 ThrowTypeError({"Number index info type ", numberInfo->GetType(), in CheckIndexConstraints() 260 ThrowTypeError("Duplicated index signature for type 'number'", it->Start()); in ResolveIndexInfosOfObjectType() 270 ThrowTypeError("Duplicated index signature for type 'string'", it->Start()); in ResolveIndexInfosOfObjectType() 365 ThrowTypeError( in CheckComputedPropertyName() 459 ThrowTypeError({"Type ", type->Name(), " recursively references itself as a base type."}, in GetBaseTypes() 472 ThrowTypeError( in GetBaseTypes() 486 ThrowTypeError({"Type ", type->Name(), " recursively references itself as a base type."}, in GetBaseTypes() 499 ThrowTypeError({"Type ", type->Name(), " recursively references itself as a base type."}, in GetBaseTypes()
|
/arkcompiler/ets_frontend/es2panda/ir/expressions/ |
H A D | memberExpression.cpp | 75 pg->ThrowTypeError(this, "Property is not defined with Getter"); in Compile() 116 checker->ThrowTypeError({"Type ", indexType, " cannot be used as index type"}, property_->Start()); in Check() 120 checker->ThrowTypeError("No index signature with a parameter of type 'string' was found on type this type", in Check() 125 checker->ThrowTypeError("No index signature with a parameter of type 'number' was found on type this type", in Check() 131 checker->ThrowTypeError( in Check() 136 checker->ThrowTypeError( in Check() 141 checker->ThrowTypeError( in Check() 175 checker->ThrowTypeError({"Property ", property_->AsIdentifier()->Name(), " does not exist on this type."}, in Check()
|
H A D | unaryExpression.cpp | 132 checker->ThrowTypeError("The operand of a delete operator must be a property reference.", in Check() 139 checker->ThrowTypeError("The operand of a delete operator cannot be a private identifier.", in Check() 146 checker->ThrowTypeError("The operand of a delete operator cannot be a readonly property.", in Check() 151 checker->ThrowTypeError("The operand of a delete operator must be a optional.", argument_->Start()); in Check() 183 checker->ThrowTypeError({"Operator '+' cannot be applied to type '", operandType, "'"}, Start()); in Check()
|
H A D | identifier.cpp | 85 checker->ThrowTypeError({"Cannot find name ", name_}, Start()); in Check() 91 checker->ThrowTypeError({name_, " only refers to a type, but is being used as a value here."}, Start()); in Check()
|
/arkcompiler/ets_frontend/ets2panda/checker/ts/ |
H A D | helpers.cpp | 40 ThrowTypeError("An expression of type void cannot be tested for truthiness", lineInfo); in CheckTruthinessOfType() 47 ThrowTypeError("Object is possibly 'null'.", lineInfo); in CheckNonNullType() 51 ThrowTypeError("Object is possibly 'undefined'.", lineInfo); in CheckNonNullType() 103 ThrowTypeError({"Cannot assign to '", name, "' because it is not a variable."}, expr->Start()); in CheckReferenceExpression() 107 ThrowTypeError(invalidOptionalChainMsg, expr->Start()); in CheckReferenceExpression() 110 ThrowTypeError(invalidReferenceMsg, expr->Start()); in CheckReferenceExpression() 283 ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", AsSrc(rightType)}, in ThrowBinaryLikeError() 287 ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", rightType}, lineInfo); in ThrowBinaryLikeError() 293 ThrowTypeError({"Type '", AsSrc(source), "' is not assignable to type '", target, "'."}, lineInfo); in ThrowAssignmentError() 296 ThrowTypeError({"Typ in ThrowAssignmentError() [all...] |
H A D | binaryLikeExpression.cpp | 50 ThrowTypeError( in CheckBooleanLikeType() 65 ThrowTypeError( in CheckBinaryOperator() 73 ThrowTypeError( in CheckBinaryOperator() 89 ThrowTypeError({"operator ", op, " cannot be applied to types 'bigint' and 'bigint'"}, expr->Start()); in CheckBinaryOperator() 120 ThrowTypeError("object is of type 'unknown'", leftExpr->Start()); in CheckPlusOperator() 122 ThrowTypeError("object is of type 'unknown'", rightExpr->Start()); in CheckPlusOperator() 188 ThrowTypeError({"The left-hand side of an 'instanceof' expression must be of type 'any',", in CheckInstanceofExpression() 195 ThrowTypeError({"The right-hand side of an 'instanceof' expression must be of type 'any'", in CheckInstanceofExpression() 211 ThrowTypeError( in CheckInExpression() 218 ThrowTypeError("Th in CheckInExpression() [all...] |
H A D | function.cpp | 59 ThrowTypeError("A function returning 'never' cannot have a reachable end point.", in HandleFunctionReturn() 103 ThrowTypeError("Return type annotation circularly reference itself", func->ReturnTypeAnnotation()->Start()); in ThrowReturnTypeCircularityError() 107 ThrowTypeError({func->Id()->AsIdentifier()->Name(), in ThrowReturnTypeCircularityError() 113 ThrowTypeError( in ThrowReturnTypeCircularityError() 127 ThrowTypeError({"Parameter ", param->Name(), " implicitly has any type."}, param->Start()); in CheckFunctionIdentifierParameter() 268 ThrowTypeError("A rest parameter must be of an array type", param->Start()); in CheckFunctionRestParameter() 532 ThrowTypeError("Function implementation is missing or not immediately following the declaration.", in ValidateSubsequentNode() 538 ThrowTypeError("Function implementation is missing or not immediately following the declaration.", in ValidateSubsequentNode() 543 ThrowTypeError("Overload signatures must all be ambient or non-ambient.", func->Id()->Start()); in ValidateSubsequentNode() 560 ThrowTypeError("Thi in CheckOverloadSignatureCompatibility() [all...] |
H A D | destructuringContext.cpp | 58 checker_->ThrowTypeError({"Cannot find name '", ident->Name(), "'."}, ident->Start()); in HandleDestructuringAssignment() 120 checker_->ThrowTypeError({"Object literal may only specify known properties, and property '", sourceName, in ValidateObjectLiteralType() 209 checker_->ThrowTypeError( in ValidateInferredType() 217 checker_->ThrowTypeError( in ValidateInferredType() 252 checker_->ThrowTypeError({"Tuple type ", inferredType_, " of length ", in NextInferredType() 283 checker_->ThrowTypeError({"Property ", index_, " does not exist on type ", inferredType_, "."}, in NextInferredType() 584 checker_->ThrowTypeError("Rest types may only be created from object types.", loc); in GetRestType() 594 checker_->ThrowTypeError("Rest types may only be created from object types.", loc); in GetRestType() 646 checker_->ThrowTypeError({"Property ", searchName, " does not exist on type ", inferredType_, "."}, in NextInferredType()
|
H A D | object.cpp | 76 ThrowTypeError({"Number index info type ", numberInfo->GetType(), in CheckIndexConstraints() 254 ThrowTypeError("Duplicated index signature for type 'number'", it->Start()); in ResolveIndexInfosOfObjectType() 264 ThrowTypeError("Duplicated index signature for type 'string'", it->Start()); in ResolveIndexInfosOfObjectType() 354 ThrowTypeError( in CheckComputedPropertyName() 461 ThrowTypeError( in GetBaseTypes() 475 ThrowTypeError({"Type ", type->Name(), " recursively references itself as a base type."}, in GetBaseTypes() 498 ThrowTypeError({"Type ", type->Name(), " recursively references itself as a base type."}, in CheckExtendsBases()
|
/arkcompiler/ets_frontend/es2panda/ir/ts/ |
H A D | tsIndexedAccessType.cpp | 50 checker->ThrowTypeError({"Type ", indexType, " cannot be used as index type"}, indexType_->Start()); in Check() 54 checker->ThrowTypeError("Type has no matching singature for type 'number'", Start()); in Check() 57 checker->ThrowTypeError("Type has no matching singature for type 'string'", Start()); in Check()
|
H A D | tsEnumDeclaration.cpp | 84 checker->ThrowTypeError({"Cannot find name ", expr->AsIdentifier()->Name()}, in EvaluateIdentifier() 91 checker->ThrowTypeError( in EvaluateIdentifier() 298 checker->ThrowTypeError("Enum member must have initializer.", variable->Declaration()->Node()->Start()); in InferEnumVariableType() 308 checker->ThrowTypeError("Computed values are not permitted in an enum with string valued members.", in InferEnumVariableType() 318 checker->ThrowTypeError("Computed values are not permitted in an enum with string valued members.", in InferEnumVariableType() 330 checker->ThrowTypeError( in InferEnumVariableType() 346 checker->ThrowTypeError("'const' enum member initializer was evaluated to disallowed value 'NaN'.", in InferEnumVariableType() 351 checker->ThrowTypeError("'const' enum member initializer was evaluated to a non-finite value.", in InferEnumVariableType()
|
H A D | tsSignatureDeclaration.cpp | 71 checker->ThrowTypeError( in Check() 75 checker->ThrowTypeError( in Check()
|
H A D | tsQualifiedName.cpp | 54 checker->ThrowTypeError({"Property ", right_->Name(), " does not exist on this type."}, right_->Start()); in Check()
|
H A D | tsPropertySignature.cpp | 62 checker->ThrowTypeError("Property implicitly has an 'any' type.", Start()); in Check()
|
/arkcompiler/ets_frontend/ets2panda/checker/ |
H A D | TSAnalyzer.cpp | 38 checker->ThrowTypeError("Catch clause variable type annotation must be 'any' or 'unknown' if specified", in Check() 104 checker->ThrowTypeError( in Check() 131 checker->ThrowTypeError("Property implicitly has an 'any' type.", node->Start()); in Check() 151 checker->ThrowTypeError( in Check() 156 checker->ThrowTypeError( in Check() 205 checker->ThrowTypeError( in GetSpreadElementType() 238 checker->ThrowTypeError( in GetSpreadElementType() 398 checker->ThrowTypeError( in Check() 406 checker->ThrowTypeError("Cannot assign to this property because it is readonly.", expr->Left()->Start()); in Check() 525 checker->ThrowTypeError("Thi in Check() [all...] |
H A D | checker.cpp | 78 void Checker::ThrowTypeError(std::initializer_list<TypeErrorMessageElement> list, const lexer::SourcePosition &pos) in ThrowTypeError() function in ark::es2panda::checker::Checker 80 ThrowTypeError(FormatMsg(list), pos); in ThrowTypeError() 83 void Checker::ThrowTypeError(std::string_view message, const lexer::SourcePosition &pos) in ThrowTypeError() function in ark::es2panda::checker::Checker
|
/arkcompiler/ets_frontend/ets2panda/checker/typeChecker/ |
H A D | TypeChecker.h | 41 void ThrowTypeError(std::initializer_list<TypeErrorMessageElement> list, const lexer::SourcePosition &pos) in ThrowTypeError() function in ark::es2panda::checker::TypeChecker 43 checker_->ThrowTypeError(list, pos); in ThrowTypeError()
|
/arkcompiler/ets_frontend/es2panda/typescript/ |
H A D | checker.cpp | 51 void Checker::ThrowTypeError(std::initializer_list<TypeErrorMessageElement> list, const lexer::SourcePosition &pos) in ThrowTypeError() function in panda::es2panda::checker::Checker 74 ThrowTypeError(err, pos); in ThrowTypeError() 77 void Checker::ThrowTypeError(std::string_view message, const lexer::SourcePosition &pos) in ThrowTypeError() function in panda::es2panda::checker::Checker
|
/arkcompiler/ets_frontend/ets2panda/compiler/lowering/ets/ |
H A D | recordLowering.cpp | 111 ctx->checker->AsETSChecker()->ThrowTypeError( in CheckDuplicateKey() 118 ctx->checker->AsETSChecker()->ThrowTypeError( in CheckDuplicateKey() 122 ctx->checker->AsETSChecker()->ThrowTypeError("Object literal may only specify known properties", in CheckDuplicateKey() 141 ctx->checker->AsETSChecker()->ThrowTypeError( in CheckLiteralsCompleteness() 178 checker->ThrowTypeError("Unexpected type error in Record object literal", expr->Start()); in UpdateObjectExpression()
|
/arkcompiler/ets_frontend/es2panda/typescript/types/ |
H A D | typeRelation.cpp | 164 checker_->ThrowTypeError(errMsg, loc); in RaiseError() 170 checker_->ThrowTypeError(list, loc); in RaiseError()
|
/arkcompiler/ets_runtime/ecmascript/builtins/ |
H A D | builtins_errors.h | 54 static JSTaggedValue ThrowTypeError(EcmaRuntimeCallInfo *argv);
|