diff --git a/es2panda/BUILD.gn b/es2panda/BUILD.gn index 98c95e92bfa442cf059ebf91f7d637f2bb4f93b8..6bd30c9e88356a4c903933c014cfdfab79c0a1c9 100644 --- a/es2panda/BUILD.gn +++ b/es2panda/BUILD.gn @@ -194,13 +194,12 @@ es2panda_src = [ "parser/statementParser.cpp", "typescript/checker.cpp", "typescript/core/binaryLikeExpression.cpp", - "typescript/core/destructuring.cpp", + "typescript/core/destructuringContext.cpp", "typescript/core/function.cpp", - "typescript/core/generics.cpp", "typescript/core/helpers.cpp", "typescript/core/object.cpp", "typescript/core/typeCreation.cpp", - "typescript/core/typeElaboration.cpp", + "typescript/core/typeElaborationContext.cpp", "typescript/core/typeRelation.cpp", "typescript/core/util.cpp", "typescript/types/anyType.cpp", diff --git a/es2panda/CMakeLists.txt b/es2panda/CMakeLists.txt index 58cbe2c8239a7cbb78c70a5dbc43b452fb6f2587..c96649e60d19a3e3d386269896ee4fcfa3f82027 100644 --- a/es2panda/CMakeLists.txt +++ b/es2panda/CMakeLists.txt @@ -241,13 +241,12 @@ set(ES2PANDA_LIB_SRC parser/statementParser.cpp typescript/checker.cpp typescript/core/binaryLikeExpression.cpp - typescript/core/destructuring.cpp + typescript/core/destructuringContext.cpp typescript/core/function.cpp - typescript/core/generics.cpp typescript/core/helpers.cpp typescript/core/object.cpp typescript/core/typeCreation.cpp - typescript/core/typeElaboration.cpp + typescript/core/typeElaborationContext.cpp typescript/core/typeRelation.cpp typescript/core/util.cpp typescript/types/anyType.cpp diff --git a/es2panda/aot/options.cpp b/es2panda/aot/options.cpp index 0f430e302e17d235869cd32f6938f44d4baa09b8..616c544ef84f6a7c06f6f93044fcc48ba9667b1a 100644 --- a/es2panda/aot/options.cpp +++ b/es2panda/aot/options.cpp @@ -54,6 +54,7 @@ bool Options::Parse(int argc, const char **argv) panda::PandArg opModule("module", false, "Parse the input as module"); panda::PandArg opCommonjs("commonjs", false, "Parse the input as commonjs"); panda::PandArg opParseOnly("parse-only", false, "Parse the input only"); + panda::PandArg opEnableTypeCheck("enable-type-check", false, "Check the type in ts after parse"); panda::PandArg opDumpAst("dump-ast", false, "Dump the parsed AST"); // compiler @@ -78,6 +79,7 @@ bool Options::Parse(int argc, const char **argv) argparser_->Add(&opCommonjs); argparser_->Add(&opDumpAst); argparser_->Add(&opParseOnly); + argparser_->Add(&opEnableTypeCheck); argparser_->Add(&opDumpAssembly); argparser_->Add(&opDebugInfo); argparser_->Add(&opDumpDebugInfo); @@ -204,6 +206,7 @@ bool Options::Parse(int argc, const char **argv) compilerOptions_.dumpDebugInfo = opDumpDebugInfo.GetValue(); compilerOptions_.isDebug = opDebugInfo.GetValue(); compilerOptions_.parseOnly = opParseOnly.GetValue(); + compilerOptions_.enableTypeCheck = opEnableTypeCheck.GetValue(); compilerOptions_.dumpLiteralBuffer = opDumpLiteralBuffer.GetValue(); compilerOptions_.isDebuggerEvaluateExpressionMode = debuggerEvaluateExpression.GetValue(); diff --git a/es2panda/binder/binder.cpp b/es2panda/binder/binder.cpp index 3398132ee70311d98826e07a196fc02430acdb06..dc6319947090576b159aaa623e93835d2fedae44 100644 --- a/es2panda/binder/binder.cpp +++ b/es2panda/binder/binder.cpp @@ -42,6 +42,10 @@ #include #include #include +#include +#include +#include +#include namespace panda::es2panda::binder { void Binder::InitTopScope() @@ -169,7 +173,8 @@ void Binder::LookupIdentReference(ir::Identifier *ident) InstantiateArguments(); } - ScopeFindResult res = scope_->Find(ident->Name()); + ScopeFindResult res = scope_->Find(ident->Name(), bindingOptions_); + if (res.level != 0) { ASSERT(res.variable); res.variable->SetLexical(res.scope); @@ -225,25 +230,41 @@ void Binder::BuildVarDeclaratorId(const ir::AstNode *parent, ir::AstNode *childN switch (childNode->Type()) { case ir::AstNodeType::IDENTIFIER: { - const auto &name = childNode->AsIdentifier()->Name(); - if (util::Helpers::IsGlobalIdentifier(childNode->AsIdentifier()->Name())) { + auto *ident = childNode->AsIdentifier(); + const auto &name = ident->Name(); + + if (util::Helpers::IsGlobalIdentifier(name)) { break; } auto *variable = scope_->FindLocal(name); + + if (Program()->Extension() == ScriptExtension::TS) { + ident->SetVariable(variable); + BuildTSSignatureDeclarationBaseParams(ident->TypeAnnotation()); + } + variable->AddFlag(VariableFlags::INITIALIZED); break; } case ir::AstNodeType::OBJECT_PATTERN: { - for (auto *prop : childNode->AsObjectPattern()->Properties()) { + auto *objPattern = childNode->AsObjectPattern(); + + for (auto *prop : objPattern->Properties()) { BuildVarDeclaratorId(childNode, prop); } + + BuildTSSignatureDeclarationBaseParams(objPattern->TypeAnnotation()); break; } case ir::AstNodeType::ARRAY_PATTERN: { + auto *arrayPattern = childNode->AsArrayPattern(); + for (auto *element : childNode->AsArrayPattern()->Elements()) { BuildVarDeclaratorId(childNode, element); } + + BuildTSSignatureDeclarationBaseParams(arrayPattern->TypeAnnotation()); break; } case ir::AstNodeType::ASSIGNMENT_PATTERN: { @@ -265,6 +286,43 @@ void Binder::BuildVarDeclaratorId(const ir::AstNode *parent, ir::AstNode *childN } } +void Binder::BuildTSSignatureDeclarationBaseParams(const ir::AstNode *typeNode) +{ + if (!typeNode) { + return; + } + + Scope *scope = nullptr; + + switch (typeNode->Type()) { + case ir::AstNodeType::TS_FUNCTION_TYPE: { + scope = typeNode->AsTSFunctionType()->Scope(); + break; + } + case ir::AstNodeType::TS_CONSTRUCTOR_TYPE: { + scope = typeNode->AsTSConstructorType()->Scope(); + break; + } + case ir::AstNodeType::TS_SIGNATURE_DECLARATION: { + scope = typeNode->AsTSSignatureDeclaration()->Scope(); + break; + } + case ir::AstNodeType::TS_METHOD_SIGNATURE: { + scope = typeNode->AsTSMethodSignature()->Scope(); + break; + } + default: { + ResolveReferences(typeNode); + return; + } + } + + ASSERT(scope && scope->IsFunctionParamScope()); + + auto scopeCtx = LexicalScope::Enter(this, scope->AsFunctionParamScope()); + ResolveReferences(typeNode); +} + void Binder::BuildVarDeclarator(ir::VariableDeclarator *varDecl) { if (varDecl->Parent()->AsVariableDeclaration()->Kind() == ir::VariableDeclaration::VariableDeclarationKind::VAR) { @@ -396,6 +454,16 @@ void Binder::ResolveReference(const ir::AstNode *parent, ir::AstNode *childNode) } } + if (Program()->Extension() == ScriptExtension::TS) { + if (scriptFunc->ReturnTypeAnnotation()) { + ResolveReference(scriptFunc, scriptFunc->ReturnTypeAnnotation()); + } + + if (scriptFunc->IsOverload()) { + break; + } + } + auto scopeCtx = LexicalScope::Enter(this, funcScope); BuildScriptFunction(outerScope, scriptFunc); @@ -477,6 +545,14 @@ void Binder::ResolveReference(const ir::AstNode *parent, ir::AstNode *childNode) ResolveReferences(childNode); break; } + // TypeScript specific part + case ir::AstNodeType::TS_FUNCTION_TYPE: + case ir::AstNodeType::TS_CONSTRUCTOR_TYPE: + case ir::AstNodeType::TS_METHOD_SIGNATURE: + case ir::AstNodeType::TS_SIGNATURE_DECLARATION: { + BuildTSSignatureDeclarationBaseParams(childNode); + break; + } default: { ResolveReferences(childNode); break; diff --git a/es2panda/binder/binder.h b/es2panda/binder/binder.h index 97a7a0c735eb473289f59bcdc219ac02e57a32fd..7f07e686e203f76e8e12131625a62b5037b58526 100644 --- a/es2panda/binder/binder.h +++ b/es2panda/binder/binder.h @@ -34,6 +34,7 @@ class Identifier; class ScriptFunction; class Statement; class VariableDeclarator; +class TSFunctionType; } // namespace panda::es2panda::ir namespace panda::es2panda::binder { @@ -42,12 +43,19 @@ class VariableScope; class Binder { public: - explicit Binder(parser::Program *program) + explicit Binder(parser::Program *program, ScriptExtension extension) : program_(program), functionScopes_(Allocator()->Adapter()), functionNames_(Allocator()->Adapter()) { + if (extension == ScriptExtension::TS) { + bindingOptions_ = ResolveBindingOptions::ALL; + return; + } + + bindingOptions_ = ResolveBindingOptions::BINDINGS; } + NO_COPY_SEMANTIC(Binder); DEFAULT_MOVE_SEMANTIC(Binder); ~Binder() = default; @@ -169,10 +177,14 @@ private: void ResolveReferences(const ir::AstNode *parent); void ValidateExportDecl(const ir::ExportNamedDeclaration *exportDecl); + // TypeScript specific functions + void BuildTSSignatureDeclarationBaseParams(const ir::AstNode *typeNode); + parser::Program *program_ {}; FunctionScope *topScope_ {}; Scope *scope_ {}; ArenaVector functionScopes_; + ResolveBindingOptions bindingOptions_; ArenaSet functionNames_; size_t functionNameIndex_ {1}; }; diff --git a/es2panda/binder/declaration.h b/es2panda/binder/declaration.h index 372d697569b70346cc216a4d8330d7398c17ff81..84053347deb8fa23943c8c27200d4ee6943ba682 100644 --- a/es2panda/binder/declaration.h +++ b/es2panda/binder/declaration.h @@ -22,7 +22,7 @@ namespace panda::es2panda::ir { class AstNode; -class FunctionDeclaration; +class ScriptFunction; class TSInterfaceDeclaration; class ImportDeclaration; } // namespace panda::es2panda::ir @@ -171,7 +171,7 @@ public: } }; -class FunctionDecl : public MultiDecl { +class FunctionDecl : public MultiDecl { public: explicit FunctionDecl(ArenaAllocator *allocator, util::StringView name, const ir::AstNode *node) : MultiDecl(allocator, name) @@ -195,6 +195,26 @@ public: } }; +class PropertyDecl : public Decl { +public: + explicit PropertyDecl(util::StringView name) : Decl(name) {} + + DeclType Type() const override + { + return DeclType::PROPERTY; + } +}; + +class MethodDecl : public Decl { +public: + explicit MethodDecl(util::StringView name) : Decl(name) {} + + DeclType Type() const override + { + return DeclType::METHOD; + } +}; + class EnumDecl : public Decl { public: explicit EnumDecl(util::StringView name) : Decl(name) {} diff --git a/es2panda/binder/scope.cpp b/es2panda/binder/scope.cpp index 9d222e2cd9a1e2abe0fcf2f7c6d1a9b52b518ff3..21649a4b8c95046eb94d3c3392e067af5c7bd9fc 100644 --- a/es2panda/binder/scope.cpp +++ b/es2panda/binder/scope.cpp @@ -102,7 +102,8 @@ ScopeFindResult Scope::Find(const util::StringView &name, ResolveBindingOptions level++; auto *funcVariableScope = iter->AsFunctionParamScope()->GetFunctionScope(); - if (funcVariableScope->NeedLexEnv()) { + // we may only have function param scope without function scope in TS here + if ((funcVariableScope != nullptr) && (funcVariableScope->NeedLexEnv())) { lexLevel++; } @@ -253,6 +254,7 @@ std::tuple ParamScope::AddParamDecl(ArenaA } if (!pattern) { + decl->BindNode(param); return {decl, nullptr}; } diff --git a/es2panda/binder/variableFlags.h b/es2panda/binder/variableFlags.h index 2127e3eadefa7f173ee567988cdb66d21892e2fb..3b659009702173998eded906aef61e91cfd76d94 100644 --- a/es2panda/binder/variableFlags.h +++ b/es2panda/binder/variableFlags.h @@ -33,6 +33,8 @@ namespace panda::es2panda::binder { _(INTERFACE, InterfaceDecl) \ _(ENUM_LITERAL, EnumLiteralDecl) \ _(TYPE_PARAMETER, TypeParameterDecl) \ + _(PROPERTY, PropertyDecl) \ + _(METHOD, MethodDecl) \ _(ENUM, EnumDecl) enum class DeclType { @@ -107,6 +109,8 @@ enum class VariableFlags { LOCAL_EXPORT = 1 << 12, INFERED_IN_PATTERN = 1 << 13, REST_ARG = 1 << 14, + NUMERIC_NAME = 1 << 15, + TYPE = 1 << 16, INDEX_LIKE = COMPUTED_INDEX | INDEX_NAME, diff --git a/es2panda/compiler/core/compilerImpl.cpp b/es2panda/compiler/core/compilerImpl.cpp index 4501d4005f4d9dc9842755042e9aa3bc6508b9b6..dc4307469edcbcbaf1cb692bf8d73e45426daed6 100644 --- a/es2panda/compiler/core/compilerImpl.cpp +++ b/es2panda/compiler/core/compilerImpl.cpp @@ -38,12 +38,13 @@ panda::pandasm::Program *CompilerImpl::Compile(parser::Program *program, const e { CompilerContext context(program->Binder(), options.isDebug, options.isDebuggerEvaluateExpressionMode); - if (program->Extension() == ScriptExtension::TS) { + if (program->Extension() == ScriptExtension::TS && options.enableTypeCheck) { ArenaAllocator localAllocator(SpaceType::SPACE_TYPE_COMPILER, nullptr, true); auto checker = std::make_unique(&localAllocator, context.Binder()); checker->StartChecker(); + } - /* TODO(): TS files are not yet compiled */ + if (options.parseOnly) { return nullptr; } diff --git a/es2panda/es2panda.cpp b/es2panda/es2panda.cpp index 59fc0b90d050eb6f07de75a0a54807aa1de46f33..3e384a33548935bd72638f2f56cb561413b4cfa8 100644 --- a/es2panda/es2panda.cpp +++ b/es2panda/es2panda.cpp @@ -56,10 +56,6 @@ panda::pandasm::Program *Compiler::Compile(const SourceFile &input, const Compil std::cout << ast.Dump() << std::endl; } - if (options.parseOnly) { - return nullptr; - } - auto *prog = compiler_->Compile(&ast, options); return prog; diff --git a/es2panda/es2panda.h b/es2panda/es2panda.h index 602f77642cfd22ed9af92d51480c010896565365..2a90859e7d58621d07c04d84d3363c499307bde8 100644 --- a/es2panda/es2panda.h +++ b/es2panda/es2panda.h @@ -57,6 +57,7 @@ struct CompilerOptions { bool dumpAsm {false}; bool dumpDebugInfo {false}; bool parseOnly {false}; + bool enableTypeCheck {false}; bool dumpLiteralBuffer {false}; bool isDebuggerEvaluateExpressionMode {false}; }; diff --git a/es2panda/ir/astNode.h b/es2panda/ir/astNode.h index 31f55dacba36f5e7825847f95743c43a0a62c784..bdaf842d0368bb4488f657cc6c8eb9c068301bc9 100644 --- a/es2panda/ir/astNode.h +++ b/es2panda/ir/astNode.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -257,6 +258,16 @@ public: parent_ = parent; } + binder::Variable *Variable() const + { + return variable_; + } + + void SetVariable(binder::Variable *variable) + { + variable_ = variable; + } + virtual void Iterate(const NodeTraverser &cb) const = 0; virtual void Dump(ir::AstDumper *dumper) const = 0; virtual void Compile([[maybe_unused]] compiler::PandaGen *pg) const = 0; @@ -271,6 +282,7 @@ protected: const AstNode *parent_ {}; lexer::SourceRange range_ {}; AstNodeType type_; + binder::Variable *variable_ {nullptr}; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/base/catchClause.cpp b/es2panda/ir/base/catchClause.cpp index 59a91d30603f09bcfcb818a268254a090a5f9554..8b1144f6d0803e1d23ce09c571978170dc192b9c 100644 --- a/es2panda/ir/base/catchClause.cpp +++ b/es2panda/ir/base/catchClause.cpp @@ -43,7 +43,7 @@ void CatchClause::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "CatchClause"}, {"body", body_}, {"param", AstDumper::Nullable(param_)}}); } -void CatchClause::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void CatchClause::Compile(compiler::PandaGen *pg) const { compiler::LocalRegScope lrs(pg, scope_->ParamScope()); @@ -56,7 +56,7 @@ void CatchClause::Compile([[maybe_unused]] compiler::PandaGen *pg) const body_->Compile(pg); } -checker::Type *CatchClause::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *CatchClause::Check(checker::Checker *checker) const { const ir::Expression *typeAnnotation = nullptr; diff --git a/es2panda/ir/base/catchClause.h b/es2panda/ir/base/catchClause.h index ce770405954744adbd76ea3da644eb8245b1b901..950a62e090ed04a8dd260a27e84282801002f64a 100644 --- a/es2panda/ir/base/catchClause.h +++ b/es2panda/ir/base/catchClause.h @@ -70,8 +70,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: binder::CatchScope *scope_; diff --git a/es2panda/ir/base/classDefinition.cpp b/es2panda/ir/base/classDefinition.cpp index e249bcd7f80f8e0b91a341f345bf765c333c41bb..e947b8f01c70bf7d38b7fc90d7ef519cb2c5dd50 100644 --- a/es2panda/ir/base/classDefinition.cpp +++ b/es2panda/ir/base/classDefinition.cpp @@ -300,7 +300,7 @@ void ClassDefinition::Compile(compiler::PandaGen *pg) const CompileMissingProperties(pg, compiled, classReg); } -checker::Type *ClassDefinition::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *ClassDefinition::Check(checker::Checker *checker) const { // TODO(aszilagyi) return checker->GlobalAnyType(); diff --git a/es2panda/ir/base/classDefinition.h b/es2panda/ir/base/classDefinition.h index 6f02a09a70af50f9029de2b5aa9f66cb57265a8e..2d58a5e1ddac96bb1af18b576f9068eb0e149966 100644 --- a/es2panda/ir/base/classDefinition.h +++ b/es2panda/ir/base/classDefinition.h @@ -123,8 +123,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: compiler::VReg CompileHeritageClause(compiler::PandaGen *pg) const; diff --git a/es2panda/ir/base/metaProperty.cpp b/es2panda/ir/base/metaProperty.cpp index 17094ce6a53dfdb2a117771a3749cc00446c5fef..043ba395e34204318f3502636131a37a3cd82a64 100644 --- a/es2panda/ir/base/metaProperty.cpp +++ b/es2panda/ir/base/metaProperty.cpp @@ -44,7 +44,7 @@ void MetaProperty::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "MetaProperty"}, {"kind", kind}}); } -void MetaProperty::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void MetaProperty::Compile(compiler::PandaGen *pg) const { if (kind_ == ir::MetaProperty::MetaPropertyKind::NEW_TARGET) { pg->GetNewTarget(this); @@ -57,7 +57,7 @@ void MetaProperty::Compile([[maybe_unused]] compiler::PandaGen *pg) const } } -checker::Type *MetaProperty::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *MetaProperty::Check(checker::Checker *checker) const { // TODO(aszilagyi) return checker->GlobalAnyType(); diff --git a/es2panda/ir/base/metaProperty.h b/es2panda/ir/base/metaProperty.h index 769455fde8937556ee7c2d4bb728fe6c90c27923..91eef27dc5acea2a2431b047b2d29b8b364cc17a 100644 --- a/es2panda/ir/base/metaProperty.h +++ b/es2panda/ir/base/metaProperty.h @@ -42,8 +42,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: MetaPropertyKind kind_; diff --git a/es2panda/ir/base/scriptFunction.cpp b/es2panda/ir/base/scriptFunction.cpp index 5a5e2035b2c4d0edcec18210fb1ea71de6e8b0ad..3e2f39e87f9fa9a9055c1661dca1d87724c92eeb 100644 --- a/es2panda/ir/base/scriptFunction.cpp +++ b/es2panda/ir/base/scriptFunction.cpp @@ -67,6 +67,10 @@ void ScriptFunction::Iterate(const NodeTraverser &cb) const cb(it); } + if (returnTypeAnnotation_) { + cb(returnTypeAnnotation_); + } + if (body_) { cb(body_); } diff --git a/es2panda/ir/base/scriptFunction.h b/es2panda/ir/base/scriptFunction.h index 0353c259c3336f0e2463e286d0aa4431f25954cc..9eb543f4d0935305ceec061f210805ac0593e45d 100644 --- a/es2panda/ir/base/scriptFunction.h +++ b/es2panda/ir/base/scriptFunction.h @@ -94,6 +94,11 @@ public: return returnTypeAnnotation_; } + Expression *ReturnTypeAnnotation() + { + return returnTypeAnnotation_; + } + bool IsGenerator() const { return (flags_ & ir::ScriptFunctionFlags::GENERATOR) != 0; diff --git a/es2panda/ir/expression.h b/es2panda/ir/expression.h index 929e6c50e399d3228baaa650d62ac31676adef36..bcbf3b6b43dec6e972c505b8ce9c33eb80eae73f 100644 --- a/es2panda/ir/expression.h +++ b/es2panda/ir/expression.h @@ -21,6 +21,7 @@ namespace panda::es2panda::ir { class Literal; +class TypeNode; class Expression : public AstNode { public: @@ -61,6 +62,16 @@ public: return true; } + TypeNode *AsTypeNode() + { + return reinterpret_cast(this); + } + + const TypeNode *AsTypeNode() const + { + return reinterpret_cast(this); + } + protected: explicit Expression(AstNodeType type) : AstNode(type) {} diff --git a/es2panda/ir/expressions/arrayExpression.cpp b/es2panda/ir/expressions/arrayExpression.cpp index c2f56bb616224b2b7fc6e0a3c52960952cff0da7..906912f18ef794ed1bfce2d7cb40e95704ffcb11 100644 --- a/es2panda/ir/expressions/arrayExpression.cpp +++ b/es2panda/ir/expressions/arrayExpression.cpp @@ -17,12 +17,14 @@ #include #include +#include #include #include #include #include #include #include +#include namespace panda::es2panda::ir { @@ -142,44 +144,48 @@ void ArrayExpression::Compile(compiler::PandaGen *pg) const pg->CreateArray(this, elements_, arrayObj); } -checker::Type *GetSpreadElementTypeInArrayLiteral(checker::Checker *checker, const ir::SpreadElement *spreadElement) +void GetSpreadElementType(checker::Checker *checker, checker::Type *spreadType, + ArenaVector &elementTypes, const lexer::SourcePosition &loc) { - checker::Type *spreadType = spreadElement->Argument()->Check(checker); - - if (spreadType->IsArrayType()) { - return spreadType->AsArrayType()->ElementType(); - } + bool inConstContext = checker->HasStatus(checker::CheckerStatus::IN_CONST_CONTEXT); if (spreadType->IsObjectType() && spreadType->AsObjectType()->IsTupleType()) { - std::vector tupleElementTypes; + ArenaVector tupleElementTypes(checker->Allocator()->Adapter()); checker::TupleType *spreadTuple = spreadType->AsObjectType()->AsTupleType(); - auto *it = spreadTuple->Iterator()->Next(); - while (it) { - tupleElementTypes.push_back(it); - it = spreadTuple->Iterator()->Next(); + for (auto *it : spreadTuple->Properties()) { + if (inConstContext) { + elementTypes.push_back(it->TsType()); + continue; + } + + tupleElementTypes.push_back(it->TsType()); + } + + if (inConstContext) { + return; } - return checker->CreateUnionType(std::move(tupleElementTypes)); + elementTypes.push_back(checker->CreateUnionType(std::move(tupleElementTypes))); + return; } + // TODO(aszilagyi) handle const context cases in case of union spread type if (spreadType->IsUnionType()) { - std::vector spreadTypes; + ArenaVector spreadTypes(checker->Allocator()->Adapter()); bool throwError = false; - for (auto *it : spreadType->AsUnionType()->ConstituentTypes()) { - if (it->IsArrayType()) { - spreadTypes.push_back(it->AsArrayType()->ElementType()); + for (auto *type : spreadType->AsUnionType()->ConstituentTypes()) { + if (type->IsArrayType()) { + spreadTypes.push_back(type->AsArrayType()->ElementType()); continue; } - if (it->IsObjectType() && it->AsObjectType()->IsTupleType()) { - checker::TupleType *tuple = it->AsObjectType()->AsTupleType(); - auto *iter = tuple->Iterator()->Next(); + if (type->IsObjectType() && type->AsObjectType()->IsTupleType()) { + checker::TupleType *tuple = type->AsObjectType()->AsTupleType(); - while (iter) { - spreadTypes.push_back(iter); - iter = tuple->Iterator()->Next(); + for (auto *it : tuple->Properties()) { + spreadTypes.push_back(it->TsType()); } continue; @@ -190,153 +196,170 @@ checker::Type *GetSpreadElementTypeInArrayLiteral(checker::Checker *checker, con } if (!throwError) { - return checker->CreateUnionType(std::move(spreadTypes)); + elementTypes.push_back(checker->CreateUnionType(std::move(spreadTypes))); + return; } } checker->ThrowTypeError( - {"Type '", spreadType, "' must have a '[Symbol.Iterator]()' method that returns an iterator."}, - spreadElement->Start()); - - return nullptr; + {"Type '", spreadType, "' must have a '[Symbol.iterator]()' method that returns an iterator."}, loc); } -checker::Type *GetArrayLiteralElementType(checker::Checker *checker, const ir::Expression *expr, bool forceTuple, - bool noLiteralBaseType, bool destructuringSource, bool readonly) +checker::Type *ArrayExpression::Check(checker::Checker *checker) const { - if (expr->IsSpreadElement()) { - return GetSpreadElementTypeInArrayLiteral(checker, expr->AsSpreadElement()); - } + ArenaVector elementTypes(checker->Allocator()->Adapter()); + ArenaVector elementFlags(checker->Allocator()->Adapter()); + bool inConstContext = checker->HasStatus(checker::CheckerStatus::IN_CONST_CONTEXT); + bool createTuple = checker->HasStatus(checker::CheckerStatus::FORCE_TUPLE); - if (expr->IsOmittedExpression()) { - if (forceTuple) { - if (destructuringSource) { - return checker->GlobalAnyType(); + for (auto *it : elements_) { + if (it->IsSpreadElement()) { + checker::Type *spreadType = it->AsSpreadElement()->Argument()->Check(checker); + + if (spreadType->IsArrayType()) { + elementTypes.push_back(inConstContext ? spreadType : spreadType->AsArrayType()->ElementType()); + elementFlags.push_back(checker::ElementFlags::VARIADIC); + continue; } - return checker->GlobalUndefinedType(); + GetSpreadElementType(checker, spreadType, elementTypes, it->Start()); + elementFlags.push_back(checker::ElementFlags::REST); + continue; } - return nullptr; - } - - // TODO(aszilagyi): params force_tuple, readonly + checker::Type *elementType = it->Check(checker); - checker::Type *returnType = expr->Check(checker); - - if (noLiteralBaseType || readonly) { - return returnType; - } + if (!inConstContext) { + elementType = checker->GetBaseTypeOfLiteralType(elementType); + } - if (returnType->IsEnumType()) { - return returnType->AsEnumType()->EnumLiteralVar()->TsType(); + elementFlags.push_back(checker::ElementFlags::REQUIRED); + elementTypes.push_back(elementType); } - return checker->GetBaseTypeOfLiteralType(returnType); -} - -checker::Type *ArrayExpression::Check(checker::Checker *checker) const -{ - checker::ObjectDescriptor *desc = checker->Allocator()->New(); - checker::TupleElementFlagPool elementFlags; - std::vector elementTypes; - uint32_t index = 0; - bool forceTuple = (checker->Status() & checker::CheckerStatus::FORCE_TUPLE); - - for (auto *it : elements_) { - // TODO(aszilagyi): remove bool params - checker::Type *currentElementType = GetArrayLiteralElementType(checker, it, false, false, false, false); - - if (!currentElementType) { - continue; - } + if (inConstContext || createTuple) { + checker::ObjectDescriptor *desc = checker->Allocator()->New(checker->Allocator()); + uint32_t index = 0; - if (forceTuple) { + for (auto it = elementTypes.begin(); it != elementTypes.end(); it++, index++) { util::StringView memberIndex = util::Helpers::ToStringView(checker->Allocator(), index); + binder::LocalVariable *tupleMember = + binder::Scope::CreateVar(checker->Allocator(), memberIndex, binder::VariableFlags::PROPERTY, nullptr); - auto *memberVar = - binder::Scope::CreateVar(checker->Allocator(), memberIndex, binder::VariableFlags::PROPERTY, it); - - memberVar->AddFlag(binder::VariableFlags::PROPERTY); - memberVar->SetTsType(currentElementType); - elementFlags.insert({memberIndex, checker::ElementFlags::REQUIRED}); - desc->properties.push_back(memberVar); - index++; - } - - if (currentElementType->IsUnionType()) { - for (auto *iter : currentElementType->AsUnionType()->ConstituentTypes()) { - elementTypes.push_back(iter); + if (inConstContext) { + tupleMember->AddFlag(binder::VariableFlags::READONLY); } - continue; + tupleMember->SetTsType(*it); + desc->properties.push_back(tupleMember); } - elementTypes.push_back(currentElementType); + return checker->CreateTupleType(desc, std::move(elementFlags), checker::ElementFlags::REQUIRED, index, index, + inConstContext); } checker::Type *arrayElementType = nullptr; if (elementTypes.empty()) { arrayElementType = checker->GlobalAnyType(); - } else if (elementTypes.size() == 1) { - arrayElementType = elementTypes[0]; } else { arrayElementType = checker->CreateUnionType(std::move(elementTypes)); } - if (forceTuple) { - // TODO(aszilagyi): handle readonly when creating IndexInfo and TupleType - desc->numberIndexInfo = checker->Allocator()->New(arrayElementType, "x", false); - return checker->CreateTupleType(desc, std::move(elementFlags), checker::ElementFlags::REQUIRED, index, index, - false); - } - return checker->Allocator()->New(arrayElementType); } checker::Type *ArrayExpression::CheckPattern(checker::Checker *checker) const { - checker::ObjectDescriptor *desc = checker->Allocator()->New(); - checker::TupleElementFlagPool elementFlags; + checker::ObjectDescriptor *desc = checker->Allocator()->New(checker->Allocator()); + ArenaVector elementFlags(checker->Allocator()->Adapter()); checker::ElementFlags combinedFlags = checker::ElementFlags::NO_OPTS; uint32_t minLength = 0; - uint32_t index = 0; + uint32_t index = elements_.size(); + bool addOptional = true; - for (auto *it : elements_) { + for (auto it = elements_.rbegin(); it != elements_.rend(); it++) { checker::Type *elementType = nullptr; checker::ElementFlags memberFlag = checker::ElementFlags::NO_OPTS; - if (it->IsRestElement()) { - elementType = checker->Allocator()->New(checker->GlobalAnyType()); - memberFlag = checker::ElementFlags::REST; - } else if (it->IsObjectPattern()) { - // TODO(aszilagyi): handle inAssignment parameter - elementType = it->AsObjectPattern()->CheckPattern(checker, false); - memberFlag = checker::ElementFlags::REQUIRED; - } else if (it->IsArrayPattern()) { - elementType = it->AsArrayPattern()->CheckPattern(checker); - memberFlag = checker::ElementFlags::REQUIRED; - } else if (it->IsAssignmentPattern()) { - const ir::AssignmentExpression *assignmentPattern = it->AsAssignmentPattern(); - - if (!assignmentPattern->Left()->IsIdentifier()) { - elementType = checker->CreateInitializerTypeForPattern(assignmentPattern->Left()->Check(checker), - assignmentPattern->Right()); - checker->NodeCache().insert({assignmentPattern->Right(), elementType}); - } else { - elementType = checker->GetBaseTypeOfLiteralType(assignmentPattern->Right()->Check(checker)); + switch ((*it)->Type()) { + case ir::AstNodeType::REST_ELEMENT: { + elementType = checker->Allocator()->New(checker->GlobalAnyType()); + memberFlag = checker::ElementFlags::REST; + addOptional = false; + break; + } + case ir::AstNodeType::OBJECT_PATTERN: { + elementType = (*it)->AsObjectPattern()->CheckPattern(checker); + memberFlag = checker::ElementFlags::REQUIRED; + addOptional = false; + break; + } + case ir::AstNodeType::ARRAY_PATTERN: { + elementType = (*it)->AsArrayPattern()->CheckPattern(checker); + memberFlag = checker::ElementFlags::REQUIRED; + addOptional = false; + break; } + case ir::AstNodeType::ASSIGNMENT_PATTERN: { + const ir::AssignmentExpression *assignmentPattern = (*it)->AsAssignmentPattern(); + + if (assignmentPattern->Left()->IsIdentifier()) { + const ir::Identifier *ident = assignmentPattern->Left()->AsIdentifier(); + ASSERT(ident->Variable()); + binder::Variable *bindingVar = ident->Variable(); + checker::Type *initializerType = + checker->GetBaseTypeOfLiteralType(assignmentPattern->Right()->Check(checker)); + bindingVar->SetTsType(initializerType); + elementType = initializerType; + } else if (assignmentPattern->Left()->IsArrayPattern()) { + auto savedContext = checker::SavedCheckerContext(checker, checker::CheckerStatus::FORCE_TUPLE); + auto destructuringContext = + checker::ArrayDestructuringContext(checker, assignmentPattern->Left()->AsArrayPattern(), false, + true, nullptr, assignmentPattern->Right()); + destructuringContext.Start(); + elementType = destructuringContext.InferedType(); + } else { + ASSERT(assignmentPattern->Left()->IsObjectPattern()); + auto savedContext = checker::SavedCheckerContext(checker, checker::CheckerStatus::FORCE_TUPLE); + auto destructuringContext = + checker::ObjectDestructuringContext(checker, assignmentPattern->Left()->AsObjectPattern(), + false, true, nullptr, assignmentPattern->Right()); + destructuringContext.Start(); + elementType = destructuringContext.InferedType(); + } - memberFlag = checker::ElementFlags::OPTIONAL; - } else { - elementType = checker->GlobalAnyType(); - memberFlag = checker::ElementFlags::REQUIRED; + if (addOptional) { + memberFlag = checker::ElementFlags::OPTIONAL; + } else { + memberFlag = checker::ElementFlags::REQUIRED; + } + + break; + } + case ir::AstNodeType::OMITTED_EXPRESSION: { + elementType = checker->GlobalAnyType(); + memberFlag = checker::ElementFlags::REQUIRED; + addOptional = false; + break; + } + case ir::AstNodeType::IDENTIFIER: { + const ir::Identifier *ident = (*it)->AsIdentifier(); + ASSERT(ident->Variable()); + elementType = checker->GlobalAnyType(); + ident->Variable()->SetTsType(elementType); + memberFlag = checker::ElementFlags::REQUIRED; + addOptional = false; + break; + } + default: { + UNREACHABLE(); + } } - util::StringView memberIndex = util::Helpers::ToStringView(checker->Allocator(), index); + util::StringView memberIndex = util::Helpers::ToStringView(checker->Allocator(), index - 1); auto *memberVar = - binder::Scope::CreateVar(checker->Allocator(), memberIndex, binder::VariableFlags::PROPERTY, it); + binder::Scope::CreateVar(checker->Allocator(), memberIndex, binder::VariableFlags::PROPERTY, *it); if (memberFlag == checker::ElementFlags::OPTIONAL) { memberVar->AddFlag(binder::VariableFlags::OPTIONAL); @@ -345,11 +368,11 @@ checker::Type *ArrayExpression::CheckPattern(checker::Checker *checker) const } memberVar->SetTsType(elementType); - elementFlags.insert({memberIndex, memberFlag}); - desc->properties.push_back(memberVar); + elementFlags.push_back(memberFlag); + desc->properties.insert(desc->properties.begin(), memberVar); combinedFlags |= memberFlag; - index++; + index--; } return checker->CreateTupleType(desc, std::move(elementFlags), combinedFlags, minLength, desc->properties.size(), diff --git a/es2panda/ir/expressions/arrayExpression.h b/es2panda/ir/expressions/arrayExpression.h index eeefb58d668fc1b0b2e540108cb8aaa423b0b9a8..66ed5614cb37de958158fb88fa0f05b81d9c928b 100644 --- a/es2panda/ir/expressions/arrayExpression.h +++ b/es2panda/ir/expressions/arrayExpression.h @@ -34,10 +34,7 @@ namespace panda::es2panda::ir { class ArrayExpression : public Expression { public: explicit ArrayExpression(AstNodeType nodeType, ArenaVector &&elements, bool trailingComma) - : Expression(nodeType), - elements_(std::move(elements)), - typeAnnotation_(nullptr), - trailingComma_(trailingComma) + : Expression(nodeType), elements_(std::move(elements)), typeAnnotation_(nullptr), trailingComma_(trailingComma) { } @@ -51,6 +48,11 @@ public: return typeAnnotation_; } + Expression *TypeAnnotation() + { + return typeAnnotation_; + } + bool IsDeclaration() const { return isDeclaration_; diff --git a/es2panda/ir/expressions/arrowFunctionExpression.cpp b/es2panda/ir/expressions/arrowFunctionExpression.cpp index 0a3ac1816e785f9613e9e2218dc655ff057c6403..82e7ea038d154102be3ede8dbc37c3600fdd32b4 100644 --- a/es2panda/ir/expressions/arrowFunctionExpression.cpp +++ b/es2panda/ir/expressions/arrowFunctionExpression.cpp @@ -39,49 +39,35 @@ void ArrowFunctionExpression::Compile(compiler::PandaGen *pg) const pg->DefineFunction(func_, func_, func_->Scope()->InternalName()); } -checker::Type *ArrowFunctionExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *ArrowFunctionExpression::Check(checker::Checker *checker) const { binder::Variable *funcVar = nullptr; - const ir::VariableDeclarator *varDecl = nullptr; - if (func_->Parent()->Parent()->IsVariableDeclarator()) { - varDecl = func_->Parent()->Parent()->AsVariableDeclarator(); - } - - if (varDecl) { - ASSERT(varDecl->IsVariableDeclarator()); - if (varDecl->AsVariableDeclarator()->Id()->IsIdentifier() && !varDecl->Id()->AsIdentifier()->TypeAnnotation()) { - const util::StringView &varName = varDecl->AsVariableDeclarator()->Id()->AsIdentifier()->Name(); - - binder::ScopeFindResult result = checker->Scope()->Find(varName); - ASSERT(result.variable); - - funcVar = result.variable; - } + if (func_->Parent()->Parent() && func_->Parent()->Parent()->IsVariableDeclarator() && + func_->Parent()->Parent()->AsVariableDeclarator()->Id()->IsIdentifier()) { + funcVar = func_->Parent()->Parent()->AsVariableDeclarator()->Id()->AsIdentifier()->Variable(); } checker::ScopeContext scopeCtx(checker, func_->Scope()); - auto *signatureInfo = checker->Allocator()->New(); - - checker->CheckFunctionParameterDeclaration(func_->Params(), signatureInfo); + auto *signatureInfo = checker->Allocator()->New(checker->Allocator()); + checker->CheckFunctionParameterDeclarations(func_->Params(), signatureInfo); - checker::Type *returnType = nullptr; + auto *signature = + checker->Allocator()->New(signatureInfo, checker->GlobalResolvingReturnType()); + checker::Type *funcType = checker->CreateFunctionTypeWithSignature(signature); - if (funcVar) { - checker->HandleFunctionReturn(func_, signatureInfo, funcVar); - returnType = funcVar->TsType(); - } else { - checker::ObjectDescriptor *desc = checker->Allocator()->New(); - desc->callSignatures.push_back(checker->HandleFunctionReturn(func_, signatureInfo, funcVar)); - returnType = checker->Allocator()->New(desc); + if (funcVar && !funcVar->TsType()) { + funcVar->SetTsType(funcType); } - if (!func_->IsArrow() || !func_->Body()->IsExpression()) { + signature->SetReturnType(checker->HandleFunctionReturn(func_)); + + if (!func_->Body()->IsExpression()) { func_->Body()->Check(checker); } - return returnType; + return funcType; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/arrowFunctionExpression.h b/es2panda/ir/expressions/arrowFunctionExpression.h index d848f20284a7c94ee468be6de3a323c49b34e7e7..8c60759936428def9ce914489947282da5c1d6fc 100644 --- a/es2panda/ir/expressions/arrowFunctionExpression.h +++ b/es2panda/ir/expressions/arrowFunctionExpression.h @@ -50,8 +50,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: ScriptFunction *func_; diff --git a/es2panda/ir/expressions/assignmentExpression.cpp b/es2panda/ir/expressions/assignmentExpression.cpp index 623191b5f220e5f599858db35ca425871bf6aad9..0905c4fe2a367ffc1ca60eea09564f3bbce5611a 100644 --- a/es2panda/ir/expressions/assignmentExpression.cpp +++ b/es2panda/ir/expressions/assignmentExpression.cpp @@ -19,10 +19,12 @@ #include #include #include +#include #include #include #include #include +#include namespace panda::es2panda::ir { @@ -139,28 +141,34 @@ void AssignmentExpression::CompilePattern(compiler::PandaGen *pg) const checker::Type *AssignmentExpression::Check(checker::Checker *checker) const { if (left_->IsArrayPattern()) { - auto *leftType = left_->AsArrayPattern()->Check(checker); - auto *rightType = checker->CreateInitializerTypeForPattern(leftType, right_); - checker->HandleVariableDeclarationWithContext(left_, rightType, checker::VariableBindingContext::REGULAR, - checker::DestructuringType::ARRAY_DESTRUCTURING, false, true); - - return rightType; + auto savedContext = checker::SavedCheckerContext(checker, checker::CheckerStatus::FORCE_TUPLE); + auto destructuringContext = checker::ArrayDestructuringContext(checker, left_, true, true, nullptr, right_); + destructuringContext.Start(); + return destructuringContext.InferedType(); } if (left_->IsObjectPattern()) { - auto *leftType = left_->AsObjectPattern()->Check(checker); - auto *rightType = checker->CreateInitializerTypeForPattern(leftType, right_); - checker->HandleVariableDeclarationWithContext(left_, rightType, checker::VariableBindingContext::REGULAR, - checker::DestructuringType::OBJECT_DESTRUCTURING, false, true); + auto savedContext = checker::SavedCheckerContext(checker, checker::CheckerStatus::FORCE_TUPLE); + auto destructuringContext = checker::ObjectDestructuringContext(checker, left_, true, true, nullptr, right_); + destructuringContext.Start(); + return destructuringContext.InferedType(); + } - return rightType; + if (left_->IsIdentifier() && left_->AsIdentifier()->Variable() && + left_->AsIdentifier()->Variable()->Declaration()->IsConstDecl()) { + checker->ThrowTypeError({"Cannot assign to ", left_->AsIdentifier()->Name(), " because it is a constant."}, + left_->Start()); } auto *leftType = left_->Check(checker); - if (operator_ == lexer::TokenType::PUNCTUATOR_SUBSTITUTION && - checker->ElaborateElementwise(right_, leftType, left_->Start())) { - return right_->Check(checker); + if (leftType->HasTypeFlag(checker::TypeFlag::READONLY)) { + checker->ThrowTypeError("Cannot assign to this property because it is readonly.", left_->Start()); + } + + if (operator_ == lexer::TokenType::PUNCTUATOR_SUBSTITUTION) { + checker->ElaborateElementwise(leftType, right_, left_->Start()); + return checker->CheckTypeCached(right_); } auto *rightType = right_->Check(checker); diff --git a/es2panda/ir/expressions/assignmentExpression.h b/es2panda/ir/expressions/assignmentExpression.h index b9e7447e3b43d94aeecd91f5a0cba9fdda430b39..53b240cc355d182d4a8e7d0b883132afe6cc0b72 100644 --- a/es2panda/ir/expressions/assignmentExpression.h +++ b/es2panda/ir/expressions/assignmentExpression.h @@ -74,7 +74,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile(compiler::PandaGen *pg) const override; void CompilePattern(compiler::PandaGen *pg) const; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *left_; diff --git a/es2panda/ir/expressions/awaitExpression.cpp b/es2panda/ir/expressions/awaitExpression.cpp index 98e375c017f65da01db39303d212a85ab051315d..32b76645d99289b1a353851a6480cece40945a11 100644 --- a/es2panda/ir/expressions/awaitExpression.cpp +++ b/es2panda/ir/expressions/awaitExpression.cpp @@ -47,7 +47,7 @@ void AwaitExpression::Compile(compiler::PandaGen *pg) const pg->EmitAwait(this); } -checker::Type *AwaitExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *AwaitExpression::Check(checker::Checker *checker) const { // TODO(aszilagyi) return checker->GlobalAnyType(); diff --git a/es2panda/ir/expressions/binaryExpression.cpp b/es2panda/ir/expressions/binaryExpression.cpp index 5621dfe8e527df72cfb90a74986ce8464631a8d4..b34d315374d101bd1318826ee4e66f230cd3c16a 100644 --- a/es2panda/ir/expressions/binaryExpression.cpp +++ b/es2panda/ir/expressions/binaryExpression.cpp @@ -94,12 +94,6 @@ void BinaryExpression::Compile(compiler::PandaGen *pg) const checker::Type *BinaryExpression::Check(checker::Checker *checker) const { auto *leftType = left_->Check(checker); - - if (operator_ == lexer::TokenType::PUNCTUATOR_SUBSTITUTION && - checker->ElaborateElementwise(right_, leftType, left_->Start())) { - return right_->Check(checker); - } - auto *rightType = right_->Check(checker); switch (operator_) { diff --git a/es2panda/ir/expressions/callExpression.cpp b/es2panda/ir/expressions/callExpression.cpp index 24dcc81c234798e76e82c7e53322ab6318329e08..dc09961b5d94c2e2c318738f2fccf1956035c239 100644 --- a/es2panda/ir/expressions/callExpression.cpp +++ b/es2panda/ir/expressions/callExpression.cpp @@ -151,122 +151,18 @@ void CallExpression::Compile(compiler::PandaGen *pg) const pg->Call(this, callee, arguments_.size()); } -using ArgRange = std::pair; - -static ArgRange GetArgRange(const std::vector &signatures, - std::vector *potentialSignatures, uint32_t callArgsSize, - bool *haveSignatureWithRest) -{ - uint32_t minArg = UINT32_MAX; - uint32_t maxArg = 0; - - for (auto *it : signatures) { - if (it->RestVar()) { - *haveSignatureWithRest = true; - } - - if (it->MinArgCount() < minArg) { - minArg = it->MinArgCount(); - } - - if (it->Params().size() > maxArg) { - maxArg = it->Params().size(); - } - - if (callArgsSize >= it->MinArgCount() && (callArgsSize <= it->Params().size() || it->RestVar())) { - potentialSignatures->push_back(it); - } - } - - return {minArg, maxArg}; -} - -static bool CallMatchesSignature(checker::Checker *checker, const ArenaVector &args, - checker::Signature *signature, bool throwError) -{ - for (size_t index = 0; index < args.size(); index++) { - checker::Type *sigArgType = nullptr; - bool validateRestArg = false; - - if (index >= signature->Params().size()) { - ASSERT(signature->RestVar()); - validateRestArg = true; - sigArgType = signature->RestVar()->TsType(); - } else { - sigArgType = signature->Params()[index]->TsType(); - } - - if (validateRestArg || !throwError || - !checker->ElaborateElementwise(args[index], sigArgType, args[index]->Start())) { - checker::Type *callArgType = checker->GetBaseTypeOfLiteralType(args[index]->Check(checker)); - if (!checker->IsTypeAssignableTo(callArgType, sigArgType)) { - if (throwError) { - checker->ThrowTypeError({"Argument of type '", callArgType, - "' is not assignable to parameter of type '", sigArgType, "'."}, - args[index]->Start()); - } - - return false; - } - } - } - - return true; -} - checker::Type *CallExpression::Check(checker::Checker *checker) const { - auto *calleeType = callee_->Check(checker); + checker::Type *calleeType = callee_->Check(checker); // TODO(aszilagyi): handle optional chain if (calleeType->IsObjectType()) { checker::ObjectType *calleeObj = calleeType->AsObjectType(); - - const std::vector &signatures = calleeObj->CallSignatures(); - - if (!signatures.empty()) { - std::vector potentialSignatures; - bool haveSignatureWithRest = false; - - auto argRange = GetArgRange(signatures, &potentialSignatures, arguments_.size(), &haveSignatureWithRest); - - if (potentialSignatures.empty()) { - if (haveSignatureWithRest) { - checker->ThrowTypeError( - {"Expected at least ", argRange.first, " arguments, but got ", arguments_.size(), "."}, - Start()); - } - - if (signatures.size() == 1 && argRange.first == argRange.second) { - lexer::SourcePosition loc = - (argRange.first > arguments_.size()) ? Start() : arguments_[argRange.second]->Start(); - checker->ThrowTypeError( - {"Expected ", argRange.first, " arguments, but got ", arguments_.size(), "."}, loc); - } - - checker->ThrowTypeError( - {"Expected ", argRange.first, "-", argRange.second, " arguments, but got ", arguments_.size()}, - Start()); - } - - checker::Type *returnType = nullptr; - for (auto *it : potentialSignatures) { - if (CallMatchesSignature(checker, arguments_, it, potentialSignatures.size() == 1)) { - returnType = it->ReturnType(); - break; - } - } - - if (!returnType) { - checker->ThrowTypeError("No overload matches this call.", Start()); - } - - return returnType; - } + return checker->resolveCallOrNewExpression(calleeObj->CallSignatures(), arguments_, Start()); } checker->ThrowTypeError("This expression is not callable.", Start()); - return checker->GlobalAnyType(); + return nullptr; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/callExpression.h b/es2panda/ir/expressions/callExpression.h index c49d17f3d3bf36792718544c849a72e90f5a8c79..406496b71f3d881daa76c70e3ff828feab49db1e 100644 --- a/es2panda/ir/expressions/callExpression.h +++ b/es2panda/ir/expressions/callExpression.h @@ -71,8 +71,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: compiler::VReg CreateSpreadArguments(compiler::PandaGen *pg) const; diff --git a/es2panda/ir/expressions/chainExpression.cpp b/es2panda/ir/expressions/chainExpression.cpp index 6a49a01d90213510913f81c5c937c38d0c1e8fe2..3bf58ae577860f249ab15dbc6165e49193063434 100644 --- a/es2panda/ir/expressions/chainExpression.cpp +++ b/es2panda/ir/expressions/chainExpression.cpp @@ -65,7 +65,7 @@ void ChainExpression::Compile(compiler::PandaGen *pg) const pg->SetLabel(this, endLabel); } -checker::Type *ChainExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *ChainExpression::Check(checker::Checker *checker) const { return expression_->Check(checker); } diff --git a/es2panda/ir/expressions/chainExpression.h b/es2panda/ir/expressions/chainExpression.h index e31ed7c3910a70ac0a822cfc013eb5d0be74bdf4..faafcdef3e0d21f7a0336acb45ed6f963df9a51a 100644 --- a/es2panda/ir/expressions/chainExpression.h +++ b/es2panda/ir/expressions/chainExpression.h @@ -44,7 +44,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile(compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *expression_; diff --git a/es2panda/ir/expressions/classExpression.cpp b/es2panda/ir/expressions/classExpression.cpp index 587b573961d183af96775153526dabaf63292c3b..20580662a214c06f3a4af45ca7ff7be548063337 100644 --- a/es2panda/ir/expressions/classExpression.cpp +++ b/es2panda/ir/expressions/classExpression.cpp @@ -30,7 +30,7 @@ void ClassExpression::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "ClassExpression"}, {"definition", def_}}); } -void ClassExpression::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ClassExpression::Compile(compiler::PandaGen *pg) const { def_->Compile(pg); } diff --git a/es2panda/ir/expressions/classExpression.h b/es2panda/ir/expressions/classExpression.h index d18df201baf7127725fccfb806845d1ba1946443..b478ab42297232a64347e7fda53ac2985042a53e 100644 --- a/es2panda/ir/expressions/classExpression.h +++ b/es2panda/ir/expressions/classExpression.h @@ -42,7 +42,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; private: diff --git a/es2panda/ir/expressions/conditionalExpression.h b/es2panda/ir/expressions/conditionalExpression.h index 322802a586fc86be0260159596fd7fd0576922c3..10fb8c4e95b96eb400d752921b2607f1903fa11f 100644 --- a/es2panda/ir/expressions/conditionalExpression.h +++ b/es2panda/ir/expressions/conditionalExpression.h @@ -63,8 +63,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *test_; diff --git a/es2panda/ir/expressions/functionExpression.cpp b/es2panda/ir/expressions/functionExpression.cpp index c8a28b2946e372c30b3111ecca52b89e5ad6ebec..a4e5d34126187beaa24031e6f35262dad5d66f1c 100644 --- a/es2panda/ir/expressions/functionExpression.cpp +++ b/es2panda/ir/expressions/functionExpression.cpp @@ -42,45 +42,30 @@ void FunctionExpression::Compile(compiler::PandaGen *pg) const checker::Type *FunctionExpression::Check(checker::Checker *checker) const { binder::Variable *funcVar = nullptr; - const ir::VariableDeclarator *varDecl = nullptr; - if (func_->Parent()->Parent()->IsVariableDeclarator()) { - varDecl = func_->Parent()->Parent()->AsVariableDeclarator(); - } - - if (varDecl) { - ASSERT(varDecl->IsVariableDeclarator()); - if (varDecl->AsVariableDeclarator()->Id()->IsIdentifier() && !varDecl->Id()->AsIdentifier()->TypeAnnotation()) { - const util::StringView &varName = varDecl->AsVariableDeclarator()->Id()->AsIdentifier()->Name(); - - binder::ScopeFindResult result = checker->Scope()->Find(varName); - ASSERT(result.variable); - - funcVar = result.variable; - } + if (func_->Parent()->Parent() && func_->Parent()->Parent()->IsVariableDeclarator() && + func_->Parent()->Parent()->AsVariableDeclarator()->Id()->IsIdentifier()) { + funcVar = func_->Parent()->Parent()->AsVariableDeclarator()->Id()->AsIdentifier()->Variable(); } checker::ScopeContext scopeCtx(checker, func_->Scope()); - auto *signatureInfo = checker->Allocator()->New(); - checker->CheckFunctionParameterDeclaration(func_->Params(), signatureInfo); + auto *signatureInfo = checker->Allocator()->New(checker->Allocator()); + checker->CheckFunctionParameterDeclarations(func_->Params(), signatureInfo); - checker::Type *returnType = nullptr; + auto *signature = + checker->Allocator()->New(signatureInfo, checker->GlobalResolvingReturnType()); + checker::Type *funcType = checker->CreateFunctionTypeWithSignature(signature); - if (funcVar) { - checker->HandleFunctionReturn(func_, signatureInfo, funcVar); - returnType = funcVar->TsType(); - } else { - checker::ObjectDescriptor *desc = checker->Allocator()->New(); - desc->callSignatures.push_back(checker->HandleFunctionReturn(func_, signatureInfo, funcVar)); - returnType = checker->Allocator()->New(desc); + if (funcVar && !funcVar->TsType()) { + funcVar->SetTsType(funcType); } - if (!func_->IsArrow() || !func_->Body()->IsExpression()) { - func_->Body()->Check(checker); - } + signature->SetReturnType(checker->HandleFunctionReturn(func_)); + + func_->Body()->Check(checker); - return returnType; + return funcType; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/functionExpression.h b/es2panda/ir/expressions/functionExpression.h index e94b7fb0f0bc29db604321a635e95b175f854964..23555b6416837edc626a220c23fdafeab8c306b8 100644 --- a/es2panda/ir/expressions/functionExpression.h +++ b/es2panda/ir/expressions/functionExpression.h @@ -42,8 +42,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: ScriptFunction *func_; diff --git a/es2panda/ir/expressions/identifier.cpp b/es2panda/ir/expressions/identifier.cpp index 0132d87cec62dc460508a3a0b7b120f9dd7c0b15..7662a99ac0bc771a621d8ede217408ddc002cb89 100644 --- a/es2panda/ir/expressions/identifier.cpp +++ b/es2panda/ir/expressions/identifier.cpp @@ -19,7 +19,12 @@ #include #include #include +#include #include +#include +#include +#include +#include #include namespace panda::es2panda::ir { @@ -77,7 +82,7 @@ void Identifier::Compile(compiler::PandaGen *pg) const checker::Type *Identifier::Check(checker::Checker *checker) const { - if (!variable_) { + if (!Variable()) { if (name_.Is("undefined")) { return checker->GlobalUndefinedType(); } @@ -85,67 +90,13 @@ checker::Type *Identifier::Check(checker::Checker *checker) const checker->ThrowTypeError({"Cannot find name ", name_}, Start()); } - const binder::Decl *decl = variable_->Declaration(); + const binder::Decl *decl = Variable()->Declaration(); - if (decl->IsConstDecl() && checker::Checker::InAssignment(this)) { - checker->ThrowTypeError({"Cannot assign to '", name_, "' because it is a constant"}, Start()); + if (decl->IsTypeAliasDecl() || decl->IsInterfaceDecl()) { + checker->ThrowTypeError({name_, " only refers to a type, but is being used as a value here."}, Start()); } - if (!variable_->TsType()) { - checker::Type *bindingType = checker->GlobalAnyType(); - switch (decl->Type()) { - case binder::DeclType::CONST: - case binder::DeclType::LET: { - if (!parent_->IsTSTypeQuery()) { - checker->ThrowTypeError({"Block-scoped variable '", name_, "' used before its declaration"}, - Start()); - break; - } - - [[fallthrough]]; - } - case binder::DeclType::PARAM: - case binder::DeclType::VAR: { - bindingType = checker->InferVariableDeclarationType(decl->Node()->AsIdentifier()); - break; - } - case binder::DeclType::FUNC: { - checker->InferFunctionDeclarationType(decl->AsFunctionDecl(), variable_); - return variable_->TsType(); - } - case binder::DeclType::ENUM: { - ASSERT(variable_->IsEnumVariable()); - binder::EnumVariable *enumVar = variable_->AsEnumVariable(); - - if (std::holds_alternative(enumVar->Value())) { - checker->ThrowTypeError( - "A member initializer in a enum declaration cannot reference members declared after it, " - "including " - "members defined in other enums.", - Start()); - } - - bindingType = std::holds_alternative(enumVar->Value()) ? checker->GlobalNumberType() - : checker->GlobalStringType(); - break; - } - case binder::DeclType::ENUM_LITERAL: { - UNREACHABLE(); // TODO(aszilagyi) - } - default: { - break; - } - } - - bindingType->SetVariable(variable_); - variable_->SetTsType(bindingType); - } - - if (decl->IsInterfaceDecl() || decl->IsTypeAliasDecl()) { - checker->ThrowTypeError({name_, " only refers to a type , but is being used as a value here"}, Start()); - } - - return variable_->TsType(); + return checker->GetTypeOfVariable(Variable()); } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/identifier.h b/es2panda/ir/expressions/identifier.h index 2cfdf042edaa05909e89191c055afcba1a38fee8..fce780b661feb691480d2f651d95d9138f520292 100644 --- a/es2panda/ir/expressions/identifier.h +++ b/es2panda/ir/expressions/identifier.h @@ -68,6 +68,11 @@ public: return typeAnnotation_; } + Expression *TypeAnnotation() + { + return typeAnnotation_; + } + const util::StringView &Name() const { return name_; @@ -117,27 +122,16 @@ public: typeAnnotation_ = typeAnnotation; } - binder::Variable *Variable() const - { - return variable_; - } - - void SetVariable(binder::Variable *variable) - { - variable_ = variable; - } - void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: util::StringView name_; Expression *typeAnnotation_ {}; IdentifierFlags flags_ {IdentifierFlags::NONE}; ArenaVector decorators_; - binder::Variable *variable_ {nullptr}; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/importExpression.cpp b/es2panda/ir/expressions/importExpression.cpp index 11baf3efeb7c87b8cbb54369fa46e94349e26408..4e41f9f4fe6357559ec3ffc06201cf17f32e2874 100644 --- a/es2panda/ir/expressions/importExpression.cpp +++ b/es2panda/ir/expressions/importExpression.cpp @@ -30,7 +30,7 @@ void ImportExpression::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "ImportExpression"}, {"source", source_}}); } -void ImportExpression::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ImportExpression::Compile(compiler::PandaGen *pg) const { pg->Unimplemented(); } diff --git a/es2panda/ir/expressions/importExpression.h b/es2panda/ir/expressions/importExpression.h index 37328c0b49d11394808de5187de2d14a01ca35ea..efee65dcc47a8f09987ec0ef633b2624ae15b2a6 100644 --- a/es2panda/ir/expressions/importExpression.h +++ b/es2panda/ir/expressions/importExpression.h @@ -35,7 +35,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; private: diff --git a/es2panda/ir/expressions/literals/bigIntLiteral.h b/es2panda/ir/expressions/literals/bigIntLiteral.h index 69a2fc99bcc0388decea42fd5e116f47dd427957..2890dbab670bfc2f62467de10e6194f563953f11 100644 --- a/es2panda/ir/expressions/literals/bigIntLiteral.h +++ b/es2panda/ir/expressions/literals/bigIntLiteral.h @@ -46,8 +46,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: util::StringView src_; diff --git a/es2panda/ir/expressions/memberExpression.cpp b/es2panda/ir/expressions/memberExpression.cpp index 98a0923059aab6dfbd8872f6ee2ffbb818dba3ae..db2fcb5136bd6d0c455f5e91ce265ca27af77b7e 100644 --- a/es2panda/ir/expressions/memberExpression.cpp +++ b/es2panda/ir/expressions/memberExpression.cpp @@ -18,6 +18,9 @@ #include #include #include +#include +#include +#include namespace panda::es2panda::ir { @@ -75,9 +78,79 @@ void MemberExpression::Compile(compiler::PandaGen *pg, compiler::VReg objReg) co checker::Type *MemberExpression::Check(checker::Checker *checker) const { - auto *baseType = object_->Check(checker); + checker::Type *baseType = checker->CheckNonNullType(object_->Check(checker), object_->Start()); - return checker->ResolveBaseProp(baseType, property_, computed_, Start()); + if (computed_) { + checker::Type *indexType = property_->Check(checker); + checker::Type *indexedAccessType = checker->GetPropertyTypeForIndexType(baseType, indexType); + + if (indexedAccessType) { + return indexedAccessType; + } + + if (!indexType->HasTypeFlag(checker::TypeFlag::STRING_LIKE | checker::TypeFlag::NUMBER_LIKE)) { + checker->ThrowTypeError({"Type ", indexType, " cannot be used as index type"}, property_->Start()); + } + + if (indexType->IsNumberType()) { + checker->ThrowTypeError("No index signature with a parameter of type 'string' was found on type this type", + Start()); + } + + if (indexType->IsStringType()) { + checker->ThrowTypeError("No index signature with a parameter of type 'number' was found on type this type", + Start()); + } + + switch (property_->Type()) { + case ir::AstNodeType::IDENTIFIER: { + checker->ThrowTypeError( + {"Property ", property_->AsIdentifier()->Name(), " does not exist on this type."}, + property_->Start()); + } + case ir::AstNodeType::NUMBER_LITERAL: { + checker->ThrowTypeError( + {"Property ", property_->AsNumberLiteral()->Str(), " does not exist on this type."}, + property_->Start()); + } + case ir::AstNodeType::STRING_LITERAL: { + checker->ThrowTypeError( + {"Property ", property_->AsStringLiteral()->Str(), " does not exist on this type."}, + property_->Start()); + } + default: { + UNREACHABLE(); + } + } + } + + binder::Variable *prop = checker->GetPropertyOfType(baseType, property_->AsIdentifier()->Name()); + + if (prop) { + checker::Type *propType = checker->GetTypeOfVariable(prop); + if (prop->HasFlag(binder::VariableFlags::READONLY)) { + propType->AddTypeFlag(checker::TypeFlag::READONLY); + } + + return propType; + } + + if (baseType->IsObjectType()) { + checker::ObjectType *objType = baseType->AsObjectType(); + + if (objType->StringIndexInfo()) { + checker::Type *indexType = objType->StringIndexInfo()->GetType(); + if (objType->StringIndexInfo()->Readonly()) { + indexType->AddTypeFlag(checker::TypeFlag::READONLY); + } + + return indexType; + } + } + + checker->ThrowTypeError({"Property ", property_->AsIdentifier()->Name(), " does not exist on this type."}, + property_->Start()); + return nullptr; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/newExpression.cpp b/es2panda/ir/expressions/newExpression.cpp index f0836eafe9adc2ee6599202e1b6d7fa13e1e9c68..071e44f32ec69cad41d670ed2a48e45087859274 100644 --- a/es2panda/ir/expressions/newExpression.cpp +++ b/es2panda/ir/expressions/newExpression.cpp @@ -65,10 +65,18 @@ void NewExpression::Compile(compiler::PandaGen *pg) const } } -checker::Type *NewExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *NewExpression::Check(checker::Checker *checker) const { - // TODO(aszilagyi) - return checker->GlobalAnyType(); + checker::Type *calleeType = callee_->Check(checker); + + // TODO(aszilagyi): handle optional chain + if (calleeType->IsObjectType()) { + checker::ObjectType *calleeObj = calleeType->AsObjectType(); + return checker->resolveCallOrNewExpression(calleeObj->ConstructSignatures(), arguments_, Start()); + } + + checker->ThrowTypeError("This expression is not callable.", Start()); + return nullptr; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/objectExpression.cpp b/es2panda/ir/expressions/objectExpression.cpp index e6b35dcb3a6b4946d659864f0fbae8441311adc1..b68364ffc11f98a685a7691688c1ab0e3d34b3c6 100644 --- a/es2panda/ir/expressions/objectExpression.cpp +++ b/es2panda/ir/expressions/objectExpression.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -430,7 +431,7 @@ void ObjectExpression::CompileRemainingProperties(compiler::PandaGen *pg, const pg->LoadAccumulator(this, objReg); } -void ObjectExpression::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ObjectExpression::Compile(compiler::PandaGen *pg) const { if (properties_.empty()) { pg->CreateEmptyObject(this); @@ -448,119 +449,305 @@ void ObjectExpression::Compile([[maybe_unused]] compiler::PandaGen *pg) const CompileRemainingProperties(pg, &compiled, objReg); } -static void CheckPatternProperty(checker::Checker *checker, bool inAssignment, checker::ObjectDescriptor *desc, - ir::Expression *exp) +checker::Type *ObjectExpression::CheckPattern(checker::Checker *checker) const { - ASSERT(exp->IsProperty()); - const ir::Property *prop = exp->AsProperty(); - checker::Type *propType = checker->GlobalAnyType(); - bool optional = false; - util::StringView propName = checker->ToPropertyName(prop->Key(), checker::TypeFlag::COMPUTED_TYPE_LITERAL_NAME); - - if (prop->Value()->IsObjectPattern()) { - propType = prop->Value()->AsObjectPattern()->CheckPattern(checker, inAssignment); - } else if (prop->Value()->IsArrayPattern()) { - propType = prop->Value()->AsArrayPattern()->CheckPattern(checker); - } else if (prop->Value()->IsAssignmentPattern()) { - const ir::AssignmentExpression *assignmentPattern = prop->Value()->AsAssignmentPattern(); - - if (!assignmentPattern->Left()->IsIdentifier()) { - propType = checker->CreateInitializerTypeForPattern(assignmentPattern->Left()->Check(checker), - assignmentPattern->Right()); - checker->NodeCache().insert({assignmentPattern->Right(), propType}); + checker::ObjectDescriptor *desc = checker->Allocator()->New(checker->Allocator()); + + bool isOptional = false; + + for (auto it = properties_.rbegin(); it != properties_.rend(); it++) { + if ((*it)->IsRestElement()) { + ASSERT((*it)->AsRestElement()->Argument()->IsIdentifier()); + util::StringView indexInfoName("x"); + auto *newIndexInfo = + checker->Allocator()->New(checker->GlobalAnyType(), indexInfoName, false); + desc->stringIndexInfo = newIndexInfo; + continue; + } + + ASSERT((*it)->IsProperty()); + const ir::Property *prop = (*it)->AsProperty(); + + if (prop->IsComputed()) { + // TODO(aszilagyi) + continue; + } + + binder::LocalVariable *foundVar = desc->FindProperty(prop->Key()->AsIdentifier()->Name()); + checker::Type *patternParamType = checker->GlobalAnyType(); + binder::Variable *bindingVar = nullptr; + + if (prop->IsShorthand()) { + switch (prop->Value()->Type()) { + case ir::AstNodeType::IDENTIFIER: { + const ir::Identifier *ident = prop->Value()->AsIdentifier(); + ASSERT(ident->Variable()); + bindingVar = ident->Variable(); + break; + } + case ir::AstNodeType::ASSIGNMENT_PATTERN: { + const ir::AssignmentExpression *assignmentPattern = prop->Value()->AsAssignmentPattern(); + patternParamType = assignmentPattern->Right()->Check(checker); + ASSERT(assignmentPattern->Left()->AsIdentifier()->Variable()); + bindingVar = assignmentPattern->Left()->AsIdentifier()->Variable(); + isOptional = true; + break; + } + default: { + UNREACHABLE(); + } + } } else { - propType = checker->GetBaseTypeOfLiteralType(assignmentPattern->Right()->Check(checker)); + switch (prop->Value()->Type()) { + case ir::AstNodeType::IDENTIFIER: { + bindingVar = prop->Value()->AsIdentifier()->Variable(); + break; + } + case ir::AstNodeType::ARRAY_PATTERN: { + patternParamType = prop->Value()->AsArrayPattern()->CheckPattern(checker); + break; + } + case ir::AstNodeType::OBJECT_PATTERN: { + patternParamType = prop->Value()->AsObjectPattern()->CheckPattern(checker); + break; + } + case ir::AstNodeType::ASSIGNMENT_PATTERN: { + const ir::AssignmentExpression *assignmentPattern = prop->Value()->AsAssignmentPattern(); + + if (assignmentPattern->Left()->IsIdentifier()) { + bindingVar = assignmentPattern->Left()->AsIdentifier()->Variable(); + patternParamType = + checker->GetBaseTypeOfLiteralType(assignmentPattern->Right()->Check(checker)); + isOptional = true; + break; + } + + if (assignmentPattern->Left()->IsArrayPattern()) { + auto savedContext = checker::SavedCheckerContext(checker, checker::CheckerStatus::FORCE_TUPLE); + auto destructuringContext = + checker::ArrayDestructuringContext(checker, assignmentPattern->Left()->AsArrayPattern(), + false, true, nullptr, assignmentPattern->Right()); + + if (foundVar) { + destructuringContext.SetInferedType( + checker->CreateUnionType({foundVar->TsType(), destructuringContext.InferedType()})); + } + + destructuringContext.Start(); + patternParamType = destructuringContext.InferedType(); + isOptional = true; + break; + } + + ASSERT(assignmentPattern->Left()->IsObjectPattern()); + auto savedContext = checker::SavedCheckerContext(checker, checker::CheckerStatus::FORCE_TUPLE); + auto destructuringContext = + checker::ObjectDestructuringContext(checker, assignmentPattern->Left()->AsObjectPattern(), + false, true, nullptr, assignmentPattern->Right()); + + if (foundVar) { + destructuringContext.SetInferedType( + checker->CreateUnionType({foundVar->TsType(), destructuringContext.InferedType()})); + } + + destructuringContext.Start(); + patternParamType = destructuringContext.InferedType(); + isOptional = true; + break; + } + default: { + UNREACHABLE(); + } + } + } + + if (bindingVar) { + bindingVar->SetTsType(patternParamType); + } + + if (foundVar) { + continue; } - optional = true; - } else if (inAssignment) { - binder::ScopeFindResult result = checker->Scope()->Find(propName); - if (result.variable) { - propType = result.variable->TsType(); + binder::LocalVariable *patternVar = binder::Scope::CreateVar( + checker->Allocator(), prop->Key()->AsIdentifier()->Name(), binder::VariableFlags::PROPERTY, *it); + patternVar->SetTsType(patternParamType); + + if (isOptional) { + patternVar->AddFlag(binder::VariableFlags::OPTIONAL); } + + desc->properties.insert(desc->properties.begin(), patternVar); } - auto *newProp = binder::Scope::CreateVar(checker->Allocator(), propName, binder::VariableFlags::PROPERTY, prop); + checker::Type *returnType = checker->Allocator()->New(desc); + returnType->AsObjectType()->AddObjectFlag(checker::ObjectFlags::RESOLVED_MEMBERS); + return returnType; +} + +const util::StringView &GetPropertyName(const ir::Expression *key) +{ + if (key->IsIdentifier()) { + return key->AsIdentifier()->Name(); + } - if (optional) { - newProp->AddFlag(binder::VariableFlags::OPTIONAL); + if (key->IsStringLiteral()) { + return key->AsStringLiteral()->Str(); } - newProp->SetTsType(propType); - desc->properties.push_back(newProp); + ASSERT(key->IsNumberLiteral()); + return key->AsNumberLiteral()->Str(); } -checker::Type *ObjectExpression::CheckPattern(checker::Checker *checker, bool inAssignment) const +binder::VariableFlags GetFlagsForProperty(const ir::Property *prop) { - checker::ObjectDescriptor *desc = checker->Allocator()->New(); - bool haveRest = false; + if (!prop->IsMethod()) { + return binder::VariableFlags::PROPERTY; + } - for (auto *it : properties_) { - if (it->IsRestElement()) { - ASSERT(it->AsRestElement()->Argument()->IsIdentifier()); - haveRest = true; - util::StringView indexInfoName("x"); - auto *newIndexInfo = checker->Allocator()->New(checker->GlobalAnyType(), indexInfoName); - desc->stringIndexInfo = newIndexInfo; - } else { - CheckPatternProperty(checker, inAssignment, desc, it); - } + binder::VariableFlags propFlags = binder::VariableFlags::METHOD; + + if (prop->IsAccessor() && prop->Kind() == PropertyKind::GET) { + propFlags |= binder::VariableFlags::READONLY; } - checker::Type *returnType = checker->Allocator()->New(desc); + return propFlags; +} + +checker::Type *GetTypeForProperty(const ir::Property *prop, checker::Checker *checker) +{ + if (prop->IsAccessor()) { + checker::Type *funcType = prop->Value()->Check(checker); - if (haveRest) { - returnType->AsObjectType()->AddObjectFlag(checker::ObjectType::ObjectFlags::HAVE_REST); + if (prop->Kind() == PropertyKind::SET) { + return checker->GlobalAnyType(); + } + + ASSERT(funcType->IsObjectType() && funcType->AsObjectType()->IsFunctionType()); + return funcType->AsObjectType()->CallSignatures()[0]->ReturnType(); } - return returnType; + if (prop->IsShorthand()) { + return prop->Key()->Check(checker); + } + + return prop->Value()->Check(checker); } checker::Type *ObjectExpression::Check(checker::Checker *checker) const { - checker::ObjectDescriptor *desc = checker->Allocator()->New(); - std::vector stringIndexTypes; - - /* TODO(dbatyai) */ - bool readonly = false; + checker::ObjectDescriptor *desc = checker->Allocator()->New(checker->Allocator()); + std::unordered_map allPropertiesMap; + bool inConstContext = checker->HasStatus(checker::CheckerStatus::IN_CONST_CONTEXT); + ArenaVector computedNumberPropTypes(checker->Allocator()->Adapter()); + ArenaVector computedStringPropTypes(checker->Allocator()->Adapter()); + bool hasComputedNumberProperty = false; + bool hasComputedStringProperty = false; + bool seenSpread = false; for (const auto *it : properties_) { if (it->IsProperty()) { - checker::ObjectLiteralPropertyInfo propInfo = - checker->HandleObjectLiteralProperty(it->AsProperty(), desc, &stringIndexTypes, readonly); - if (propInfo.handleNextProp) { + const ir::Property *prop = it->AsProperty(); + + if (prop->IsComputed()) { + checker::Type *computedNameType = checker->CheckComputedPropertyName(prop->Key()); + + if (computedNameType->IsNumberType()) { + hasComputedNumberProperty = true; + computedNumberPropTypes.push_back(prop->Value()->Check(checker)); + continue; + } + + if (computedNameType->IsStringType()) { + hasComputedStringProperty = true; + computedStringPropTypes.push_back(prop->Value()->Check(checker)); + continue; + } + } + + checker::Type *propType = GetTypeForProperty(prop, checker); + binder::VariableFlags flags = GetFlagsForProperty(prop); + const util::StringView &propName = GetPropertyName(prop->Key()); + + auto *memberVar = binder::Scope::CreateVar(checker->Allocator(), propName, flags, it); + + if (inConstContext) { + memberVar->AddFlag(binder::VariableFlags::READONLY); + } else { + propType = checker->GetBaseTypeOfLiteralType(propType); + } + + memberVar->SetTsType(propType); + + if (prop->Key()->IsNumberLiteral()) { + memberVar->AddFlag(binder::VariableFlags::NUMERIC_NAME); + } + + binder::LocalVariable *foundMember = desc->FindProperty(propName); + allPropertiesMap.insert({propName, it->Start()}); + + if (foundMember) { + foundMember->SetTsType(propType); continue; } - if (desc->FindProperty(propInfo.propName)) { - checker->ThrowTypeError({"Duplicate identifier '", propInfo.propName, "'."}, it->Start()); + desc->properties.push_back(memberVar); + continue; + } + + ASSERT(it->IsSpreadElement()); + + checker::Type *spreadType = it->AsSpreadElement()->Argument()->Check(checker); + seenSpread = true; + + // TODO(aszilagyi): handle union of object types + if (!spreadType->IsObjectType()) { + checker->ThrowTypeError("Spread types may only be created from object types.", it->Start()); + } + + for (auto *spreadProp : spreadType->AsObjectType()->Properties()) { + auto found = allPropertiesMap.find(spreadProp->Name()); + + if (found != allPropertiesMap.end()) { + checker->ThrowTypeError( + {found->first, " is specified more than once, so this usage will be overwritten."}, found->second); } - propInfo.propType = checker->GetBaseTypeOfLiteralType(propInfo.propType); - binder::VariableFlags propFlag = - it->AsProperty()->IsMethod() ? binder::VariableFlags::METHOD : binder::VariableFlags::PROPERTY; - auto *newProp = binder::Scope::CreateVar(checker->Allocator(), propInfo.propName, propFlag, it); + binder::LocalVariable *foundMember = desc->FindProperty(spreadProp->Name()); - propInfo.propType->SetVariable(newProp); - newProp->SetTsType(propInfo.propType); - if (readonly) { - propInfo.propType->Variable()->AddFlag(binder::VariableFlags::READONLY); + if (foundMember) { + foundMember->SetTsType(spreadProp->TsType()); + continue; } - desc->properties.push_back(newProp); - } else { - ASSERT(it->IsSpreadElement()); - checker->HandleSpreadElement(it->AsSpreadElement(), desc, it->Start(), readonly); + + desc->properties.push_back(spreadProp); } } - checker::Type *stringIndexType = checker->CollectStringIndexInfoTypes(desc, stringIndexTypes); + if (!seenSpread && (hasComputedNumberProperty || hasComputedStringProperty)) { + for (auto *it : desc->properties) { + computedStringPropTypes.push_back(it->TsType()); + + if (hasComputedNumberProperty && it->HasFlag(binder::VariableFlags::NUMERIC_NAME)) { + computedNumberPropTypes.push_back(it->TsType()); + } + } - if (stringIndexType) { - auto *strIndexInfo = checker->Allocator()->New(stringIndexType, "x", readonly); - desc->stringIndexInfo = strIndexInfo; + if (hasComputedNumberProperty) { + desc->numberIndexInfo = checker->Allocator()->New( + checker->CreateUnionType(std::move(computedNumberPropTypes)), "x", inConstContext); + } + + if (hasComputedStringProperty) { + desc->stringIndexInfo = checker->Allocator()->New( + checker->CreateUnionType(std::move(computedStringPropTypes)), "x", inConstContext); + } } - return checker->Allocator()->New(desc); + checker::Type *returnType = checker->Allocator()->New(desc); + returnType->AsObjectType()->AddObjectFlag(checker::ObjectFlags::RESOLVED_MEMBERS | + checker::ObjectFlags::CHECK_EXCESS_PROPS); + return returnType; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/objectExpression.h b/es2panda/ir/expressions/objectExpression.h index 39a43bf285346d872d73c9285e1f41922ca6a46b..16f497400514f496bf80486fb2386618e848240a 100644 --- a/es2panda/ir/expressions/objectExpression.h +++ b/es2panda/ir/expressions/objectExpression.h @@ -56,6 +56,11 @@ public: return typeAnnotation_; } + Expression *TypeAnnotation() + { + return typeAnnotation_; + } + bool IsDeclaration() const { return isDeclaration_; @@ -76,7 +81,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile(compiler::PandaGen *pg) const override; checker::Type *Check(checker::Checker *checker) const override; - checker::Type *CheckPattern(checker::Checker *checker, bool inAssignment) const; + checker::Type *CheckPattern(checker::Checker *checker) const; private: void FillInLiteralBuffer(compiler::LiteralBuffer *buf, diff --git a/es2panda/ir/expressions/omittedExpression.cpp b/es2panda/ir/expressions/omittedExpression.cpp index 92149492dee5e92920a11a48d0e366f489896824..05f4f3f56ba1f5914e8c22e9983fc79918502bf2 100644 --- a/es2panda/ir/expressions/omittedExpression.cpp +++ b/es2panda/ir/expressions/omittedExpression.cpp @@ -15,6 +15,7 @@ #include "omittedExpression.h" +#include #include namespace panda::es2panda::ir { @@ -28,9 +29,9 @@ void OmittedExpression::Dump(ir::AstDumper *dumper) const void OmittedExpression::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *OmittedExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *OmittedExpression::Check(checker::Checker *checker) const { - return nullptr; + return checker->GlobalUndefinedType(); } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/omittedExpression.h b/es2panda/ir/expressions/omittedExpression.h index 47ed43dbf7957b5226b0b459c2ccb6966ea1be1b..f8e0ab40945a8ef2ed78314e6ed892213efec50b 100644 --- a/es2panda/ir/expressions/omittedExpression.h +++ b/es2panda/ir/expressions/omittedExpression.h @@ -36,7 +36,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/expressions/sequenceExpression.cpp b/es2panda/ir/expressions/sequenceExpression.cpp index 47dd83ec827f869f72616283324c0081a1e25870..c2f276f1f7a96c55ea2842f5d54d67978a14221b 100644 --- a/es2panda/ir/expressions/sequenceExpression.cpp +++ b/es2panda/ir/expressions/sequenceExpression.cpp @@ -32,14 +32,14 @@ void SequenceExpression::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "SequenceExpression"}, {"expressions", sequence_}}); } -void SequenceExpression::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void SequenceExpression::Compile(compiler::PandaGen *pg) const { for (const auto *it : sequence_) { it->Compile(pg); } } -checker::Type *SequenceExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *SequenceExpression::Check(checker::Checker *checker) const { // TODO(aszilagyi) return checker->GlobalAnyType(); diff --git a/es2panda/ir/expressions/sequenceExpression.h b/es2panda/ir/expressions/sequenceExpression.h index b6b41bebd56ddb09e4bec5f5eb5753c3efe2b1d9..e2d1f2c9423977c959040223ccb1776d82ebde3c 100644 --- a/es2panda/ir/expressions/sequenceExpression.h +++ b/es2panda/ir/expressions/sequenceExpression.h @@ -47,8 +47,8 @@ public: } void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: ArenaVector sequence_; diff --git a/es2panda/ir/expressions/taggedTemplateExpression.h b/es2panda/ir/expressions/taggedTemplateExpression.h index f1a0131631801066a51f6c44e4ae384bbce7ae3f..c2d48e52541be7340164ad87211d726b47b1bf7b 100644 --- a/es2panda/ir/expressions/taggedTemplateExpression.h +++ b/es2panda/ir/expressions/taggedTemplateExpression.h @@ -57,8 +57,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: Expression *tag_; diff --git a/es2panda/ir/expressions/templateLiteral.cpp b/es2panda/ir/expressions/templateLiteral.cpp index e1ba4bce01f7fb6a42e1af169288a16b8b4635e2..6519cad1bfc32ce7fd85dc71ac0b72fecc71db9f 100644 --- a/es2panda/ir/expressions/templateLiteral.cpp +++ b/es2panda/ir/expressions/templateLiteral.cpp @@ -38,7 +38,7 @@ void TemplateLiteral::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "TemplateLiteral"}, {"expressions", expressions_}, {"quasis", quasis_}}); } -void TemplateLiteral::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void TemplateLiteral::Compile(compiler::PandaGen *pg) const { auto quasisIt = quasis_.begin(); auto expressionIt = expressions_.begin(); @@ -79,7 +79,7 @@ void TemplateLiteral::Compile([[maybe_unused]] compiler::PandaGen *pg) const } } -checker::Type *TemplateLiteral::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TemplateLiteral::Check(checker::Checker *checker) const { // TODO(aszilagyi) return checker->GlobalAnyType(); diff --git a/es2panda/ir/expressions/templateLiteral.h b/es2panda/ir/expressions/templateLiteral.h index 751b26d5e567a614c7ad5d695fd5d136b503e282..31bf6761d1aa45e3254c686e151d30cbcf449ffc 100644 --- a/es2panda/ir/expressions/templateLiteral.h +++ b/es2panda/ir/expressions/templateLiteral.h @@ -49,8 +49,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: ArenaVector quasis_; diff --git a/es2panda/ir/expressions/thisExpression.h b/es2panda/ir/expressions/thisExpression.h index 2b7b416230bdb559653f201a0d2926d3f2e58f28..6e3f0e4ea27a14ac754c2efa50654105f8d0ee4d 100644 --- a/es2panda/ir/expressions/thisExpression.h +++ b/es2panda/ir/expressions/thisExpression.h @@ -35,8 +35,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: }; diff --git a/es2panda/ir/expressions/unaryExpression.cpp b/es2panda/ir/expressions/unaryExpression.cpp index 14ea7f45d3fed86c6f38c349bd2e00ca4094cac7..6eb17d0c3d6421548cbb68244aad930a1cfbd6db 100644 --- a/es2panda/ir/expressions/unaryExpression.cpp +++ b/es2panda/ir/expressions/unaryExpression.cpp @@ -117,7 +117,7 @@ void UnaryExpression::Compile(compiler::PandaGen *pg) const } } -checker::Type *UnaryExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *UnaryExpression::Check(checker::Checker *checker) const { checker::Type *operandType = argument_->Check(checker); @@ -126,6 +126,8 @@ checker::Type *UnaryExpression::Check([[maybe_unused]] checker::Checker *checker } if (operator_ == lexer::TokenType::KEYW_DELETE) { + checker::Type *propType = argument_->Check(checker); + if (!argument_->IsMemberExpression()) { checker->ThrowTypeError("The operand of a delete operator must be a property reference.", argument_->Start()); @@ -138,15 +140,14 @@ checker::Type *UnaryExpression::Check([[maybe_unused]] checker::Checker *checker argument_->Start()); } - binder::Variable *argVar = checker->ResolveObjectProperty(argument_->AsMemberExpression()); - ASSERT(argVar); + ASSERT(propType->Variable()); - if (argVar->HasFlag(binder::VariableFlags::READONLY)) { + if (propType->Variable()->HasFlag(binder::VariableFlags::READONLY)) { checker->ThrowTypeError("The operand of a delete operator cannot be a readonly property.", argument_->Start()); } - if (!argVar->HasFlag(binder::VariableFlags::OPTIONAL)) { + if (!propType->Variable()->HasFlag(binder::VariableFlags::OPTIONAL)) { checker->ThrowTypeError("The operand of a delete operator must be a optional.", argument_->Start()); } diff --git a/es2panda/ir/expressions/updateExpression.h b/es2panda/ir/expressions/updateExpression.h index 30514793684f53515cf5022b0bee57b420e792b3..4344eaa28a918e00255655539b0ddbe979f79673 100644 --- a/es2panda/ir/expressions/updateExpression.h +++ b/es2panda/ir/expressions/updateExpression.h @@ -57,8 +57,8 @@ public: } void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *argument_; diff --git a/es2panda/ir/expressions/yieldExpression.cpp b/es2panda/ir/expressions/yieldExpression.cpp index 604db00478dc648203015ce3ff2c7b8d0cce56f2..b47907270679674c4e7d7eda393ba24ba89980a7 100644 --- a/es2panda/ir/expressions/yieldExpression.cpp +++ b/es2panda/ir/expressions/yieldExpression.cpp @@ -34,7 +34,7 @@ void YieldExpression::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "YieldExpression"}, {"delegate", delegate_}, {"argument", AstDumper::Nullable(argument_)}}); } -void YieldExpression::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void YieldExpression::Compile(compiler::PandaGen *pg) const { compiler::RegScope rs(pg); @@ -52,7 +52,7 @@ void YieldExpression::Compile([[maybe_unused]] compiler::PandaGen *pg) const } } -checker::Type *YieldExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *YieldExpression::Check(checker::Checker *checker) const { // TODO(aszilagyi) return checker->GlobalAnyType(); diff --git a/es2panda/ir/module/exportDefaultDeclaration.cpp b/es2panda/ir/module/exportDefaultDeclaration.cpp index 948b0d54e16c1856d2587d3fc0eef6285476554d..1a7f06a213d9e545741c4b87685c233ba2879cbd 100644 --- a/es2panda/ir/module/exportDefaultDeclaration.cpp +++ b/es2panda/ir/module/exportDefaultDeclaration.cpp @@ -31,7 +31,7 @@ void ExportDefaultDeclaration::Dump(ir::AstDumper *dumper) const {{"type", IsExportEquals() ? "TSExportAssignment" : "ExportDefaultDeclaration"}, {"declaration", decl_}}); } -void ExportDefaultDeclaration::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ExportDefaultDeclaration::Compile(compiler::PandaGen *pg) const { decl_->Compile(pg); if (decl_->IsExpression()) { diff --git a/es2panda/ir/module/exportDefaultDeclaration.h b/es2panda/ir/module/exportDefaultDeclaration.h index 997a8e89fb31d7d8fa4f1b9a6813a4f27ddf34c1..624555363c500a5b4ae2d6ff1033c8c6539b361b 100644 --- a/es2panda/ir/module/exportDefaultDeclaration.h +++ b/es2panda/ir/module/exportDefaultDeclaration.h @@ -48,7 +48,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; private: diff --git a/es2panda/ir/module/exportNamedDeclaration.cpp b/es2panda/ir/module/exportNamedDeclaration.cpp index 62b9db7c68296f460b6aa4e5c408a773b9f32752..1b5f8511045324620279160db5bf25db2b8afd0c 100644 --- a/es2panda/ir/module/exportNamedDeclaration.cpp +++ b/es2panda/ir/module/exportNamedDeclaration.cpp @@ -45,7 +45,7 @@ void ExportNamedDeclaration::Dump(ir::AstDumper *dumper) const {"specifiers", specifiers_}}); } -void ExportNamedDeclaration::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ExportNamedDeclaration::Compile(compiler::PandaGen *pg) const { if (!decl_) { return; diff --git a/es2panda/ir/module/exportNamedDeclaration.h b/es2panda/ir/module/exportNamedDeclaration.h index 0d01116149f16317382d61c6fc3457f3ae192740..05c4089f71b8d2629576a74a696c0444f75b0ab2 100644 --- a/es2panda/ir/module/exportNamedDeclaration.h +++ b/es2panda/ir/module/exportNamedDeclaration.h @@ -67,7 +67,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; private: diff --git a/es2panda/ir/statements/blockStatement.cpp b/es2panda/ir/statements/blockStatement.cpp index e9c49907da3131fa9a19eb2ab53e9206da54e547..f69f29f2c6928dfbb0dc7340a28c95a4e555690e 100644 --- a/es2panda/ir/statements/blockStatement.cpp +++ b/es2panda/ir/statements/blockStatement.cpp @@ -34,7 +34,7 @@ void BlockStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", IsProgram() ? "Program" : "BlockStatement"}, {"statements", statements_}}); } -void BlockStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void BlockStatement::Compile(compiler::PandaGen *pg) const { compiler::LocalRegScope lrs(pg, scope_); @@ -43,7 +43,7 @@ void BlockStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const } } -checker::Type *BlockStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *BlockStatement::Check(checker::Checker *checker) const { checker::ScopeContext scopeCtx(checker, scope_); diff --git a/es2panda/ir/statements/blockStatement.h b/es2panda/ir/statements/blockStatement.h index 53e4369f01a6b6319a6d8d0176a16b144b30895a..ce567d4227a04d1ccdf9c53fde076eb379b4f8df 100644 --- a/es2panda/ir/statements/blockStatement.h +++ b/es2panda/ir/statements/blockStatement.h @@ -52,8 +52,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: binder::Scope *scope_; diff --git a/es2panda/ir/statements/breakStatement.cpp b/es2panda/ir/statements/breakStatement.cpp index 75fc07a23fc6bd378fd777903ed21b2fb5df848e..5ba38a1b3326657feeb83bf1b52997c49e8e99e8 100644 --- a/es2panda/ir/statements/breakStatement.cpp +++ b/es2panda/ir/statements/breakStatement.cpp @@ -33,7 +33,7 @@ void BreakStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "BreakStatement"}, {"label", AstDumper::Nullable(ident_)}}); } -void BreakStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void BreakStatement::Compile(compiler::PandaGen *pg) const { compiler::Label *target = pg->ControlFlowChangeBreak(ident_); pg->Branch(this, target); diff --git a/es2panda/ir/statements/breakStatement.h b/es2panda/ir/statements/breakStatement.h index b0fa68ba55194c929aed634cc64ac8120a035f21..255b8944d1ee62e3d531f011f266641c27491b61 100644 --- a/es2panda/ir/statements/breakStatement.h +++ b/es2panda/ir/statements/breakStatement.h @@ -43,7 +43,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; protected: diff --git a/es2panda/ir/statements/classDeclaration.cpp b/es2panda/ir/statements/classDeclaration.cpp index 3c3893e44a16751daadba6a9c61bbabba83f9176..bc46317eceff4da8dbd8d29ce33845a0330e4054 100644 --- a/es2panda/ir/statements/classDeclaration.cpp +++ b/es2panda/ir/statements/classDeclaration.cpp @@ -39,7 +39,7 @@ void ClassDeclaration::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "ClassDeclaration"}, {"definition", def_}, {"decorators", decorators_}}); } -void ClassDeclaration::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ClassDeclaration::Compile(compiler::PandaGen *pg) const { // [ClassDeclaration] without [Identifier] must have parent node // of [ExportDefaultDeclaration] during compiling phase. So we use diff --git a/es2panda/ir/statements/classDeclaration.h b/es2panda/ir/statements/classDeclaration.h index 1a42cf09d673adae518b7bdfa4f9b5f871b1e2c6..d983604e69ba7e26382ec87f0b3601b7f35d358c 100644 --- a/es2panda/ir/statements/classDeclaration.h +++ b/es2panda/ir/statements/classDeclaration.h @@ -47,7 +47,7 @@ public: } void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; private: diff --git a/es2panda/ir/statements/continueStatement.cpp b/es2panda/ir/statements/continueStatement.cpp index 9f27358ffbdc47a66faa1d51eba90393b8fd3945..016cdce977fd8755e216de171c9aac1097f6ed75 100644 --- a/es2panda/ir/statements/continueStatement.cpp +++ b/es2panda/ir/statements/continueStatement.cpp @@ -32,7 +32,7 @@ void ContinueStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "ContinueStatement"}, {"label", AstDumper::Nullable(ident_)}}); } -void ContinueStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ContinueStatement::Compile(compiler::PandaGen *pg) const { compiler::Label *target = pg->ControlFlowChangeContinue(ident_); pg->Branch(this, target); diff --git a/es2panda/ir/statements/continueStatement.h b/es2panda/ir/statements/continueStatement.h index 9b5d2357f836666fa2e6c08c8554ff710ff00ae6..a4148db8380b1265dec19c1dec3aebe631cd1a2e 100644 --- a/es2panda/ir/statements/continueStatement.h +++ b/es2panda/ir/statements/continueStatement.h @@ -42,7 +42,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; protected: diff --git a/es2panda/ir/statements/doWhileStatement.cpp b/es2panda/ir/statements/doWhileStatement.cpp index ba7e4250cabaae871f7d16fcd25e0aa910c12547..f10c2b0db504d87b70dd023fb78f5ea26caff745 100644 --- a/es2panda/ir/statements/doWhileStatement.cpp +++ b/es2panda/ir/statements/doWhileStatement.cpp @@ -36,7 +36,7 @@ void DoWhileStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "DoWhileStatement"}, {"body", body_}, {"test", test_}}); } -void DoWhileStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void DoWhileStatement::Compile(compiler::PandaGen *pg) const { auto *startLabel = pg->AllocLabel(); compiler::LabelTarget labelTarget(pg); @@ -56,7 +56,7 @@ void DoWhileStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const pg->SetLabel(this, labelTarget.BreakTarget()); } -checker::Type *DoWhileStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *DoWhileStatement::Check(checker::Checker *checker) const { checker::ScopeContext scopeCtx(checker, scope_); diff --git a/es2panda/ir/statements/doWhileStatement.h b/es2panda/ir/statements/doWhileStatement.h index a5e5812ed9ec044c32c63b59df2e2e7ccfb15ae0..098f66542f9a9f637db7a679cc19d0a2f5f2cb0a 100644 --- a/es2panda/ir/statements/doWhileStatement.h +++ b/es2panda/ir/statements/doWhileStatement.h @@ -64,8 +64,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: Statement *body_; diff --git a/es2panda/ir/statements/expressionStatement.cpp b/es2panda/ir/statements/expressionStatement.cpp index e09ebfc6d42ec1c079b88da634d277e364716712..55e6e76ded4672630c0c547d5ef197b698a87321 100644 --- a/es2panda/ir/statements/expressionStatement.cpp +++ b/es2panda/ir/statements/expressionStatement.cpp @@ -30,14 +30,14 @@ void ExpressionStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "ExpressionStatement"}, {"expression", expression_}}); } -void ExpressionStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ExpressionStatement::Compile(compiler::PandaGen *pg) const { expression_->Compile(pg); } -checker::Type *ExpressionStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *ExpressionStatement::Check(checker::Checker *checker) const { - return nullptr; + return expression_->Check(checker); } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/statements/expressionStatement.h b/es2panda/ir/statements/expressionStatement.h index aa319c7ac7e0be5ea3179f70e067d4f483d68d77..d670b015b55f6505e99c654cdc90c02ece536bd0 100644 --- a/es2panda/ir/statements/expressionStatement.h +++ b/es2panda/ir/statements/expressionStatement.h @@ -42,8 +42,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *expression_; diff --git a/es2panda/ir/statements/forInStatement.cpp b/es2panda/ir/statements/forInStatement.cpp index 1ab3d527fb86792af6a17ee43eb52f9d374c8250..22ad7f7476b3a7781104839027f08c1a9380ea97 100644 --- a/es2panda/ir/statements/forInStatement.cpp +++ b/es2panda/ir/statements/forInStatement.cpp @@ -38,7 +38,7 @@ void ForInStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "ForInStatement"}, {"left", left_}, {"right", right_}, {"body", body_}}); } -void ForInStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ForInStatement::Compile(compiler::PandaGen *pg) const { compiler::LabelTarget labelTarget(pg); diff --git a/es2panda/ir/statements/forInStatement.h b/es2panda/ir/statements/forInStatement.h index c6701d87dac806f3dedf7aafeb0ede5212574af9..668688a269f66610bc0221de1835af5bbcf2be46 100644 --- a/es2panda/ir/statements/forInStatement.h +++ b/es2panda/ir/statements/forInStatement.h @@ -74,7 +74,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; private: diff --git a/es2panda/ir/statements/forOfStatement.cpp b/es2panda/ir/statements/forOfStatement.cpp index 241a63e7c03751ed8cf2a48707b8c838410b3838..2edd29bda0f2d1601b17b58af3a3f713557b14d1 100644 --- a/es2panda/ir/statements/forOfStatement.cpp +++ b/es2panda/ir/statements/forOfStatement.cpp @@ -38,7 +38,7 @@ void ForOfStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "ForOfStatement"}, {"await", isAwait_}, {"left", left_}, {"right", right_}, {"body", body_}}); } -void ForOfStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ForOfStatement::Compile(compiler::PandaGen *pg) const { compiler::LocalRegScope declRegScope(pg, scope_->DeclScope()->InitScope()); diff --git a/es2panda/ir/statements/forOfStatement.h b/es2panda/ir/statements/forOfStatement.h index c48b5ea9be8c7b05f16995c32ef6f75f0c370575..4e639ef2e8e2e7ebbc87e71509b44747da75048e 100644 --- a/es2panda/ir/statements/forOfStatement.h +++ b/es2panda/ir/statements/forOfStatement.h @@ -83,7 +83,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; private: diff --git a/es2panda/ir/statements/forUpdateStatement.cpp b/es2panda/ir/statements/forUpdateStatement.cpp index 7b6abd3b0c903c7b9dd1d5de07b41ff145842235..780fe7f448333e89a5895d8567b55127e42d644e 100644 --- a/es2panda/ir/statements/forUpdateStatement.cpp +++ b/es2panda/ir/statements/forUpdateStatement.cpp @@ -51,7 +51,7 @@ void ForUpdateStatement::Dump(ir::AstDumper *dumper) const {"body", body_}}); } -void ForUpdateStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ForUpdateStatement::Compile(compiler::PandaGen *pg) const { compiler::LocalRegScope declRegScope(pg, scope_->DeclScope()->InitScope()); @@ -87,7 +87,7 @@ void ForUpdateStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const pg->SetLabel(this, labelTarget.BreakTarget()); } -checker::Type *ForUpdateStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *ForUpdateStatement::Check(checker::Checker *checker) const { checker::ScopeContext scopeCtx(checker, scope_); diff --git a/es2panda/ir/statements/forUpdateStatement.h b/es2panda/ir/statements/forUpdateStatement.h index a607f222662727e9c5b23cee2e4a57596797680d..923313adb6f45ead145ad15bff0c09ec87effeb7 100644 --- a/es2panda/ir/statements/forUpdateStatement.h +++ b/es2panda/ir/statements/forUpdateStatement.h @@ -89,8 +89,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: AstNode *init_; diff --git a/es2panda/ir/statements/functionDeclaration.cpp b/es2panda/ir/statements/functionDeclaration.cpp index e07fe784ab2e4eaebd2d8525a3122ad13a82e90e..f032a28d4067665a68617f9a1150016a9aac27d7 100644 --- a/es2panda/ir/statements/functionDeclaration.cpp +++ b/es2panda/ir/statements/functionDeclaration.cpp @@ -36,10 +36,8 @@ void FunctionDeclaration::Dump(ir::AstDumper *dumper) const void FunctionDeclaration::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *FunctionDeclaration::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *FunctionDeclaration::Check(checker::Checker *checker) const { - checker::ScopeContext scopeCtx(checker, func_->Scope()); - if (func_->IsOverload()) { return nullptr; } @@ -48,6 +46,8 @@ checker::Type *FunctionDeclaration::Check([[maybe_unused]] checker::Checker *che binder::ScopeFindResult result = checker->Scope()->Find(funcName); ASSERT(result.variable); + checker::ScopeContext scopeCtx(checker, func_->Scope()); + if (!result.variable->TsType()) { checker->InferFunctionDeclarationType(result.variable->Declaration()->AsFunctionDecl(), result.variable); } diff --git a/es2panda/ir/statements/functionDeclaration.h b/es2panda/ir/statements/functionDeclaration.h index c0eafe17eaf152314b8795c83d82bd84576d2b14..aff9ae022ea8c5f7a954289d35877df449d1d36c 100644 --- a/es2panda/ir/statements/functionDeclaration.h +++ b/es2panda/ir/statements/functionDeclaration.h @@ -43,7 +43,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: ScriptFunction *func_; diff --git a/es2panda/ir/statements/ifStatement.cpp b/es2panda/ir/statements/ifStatement.cpp index 34944a0dcdce0a1657738f2018a09d059ebf81e9..8404cc16e60450a3dbb0aa8b030183ac67fe2a64 100644 --- a/es2panda/ir/statements/ifStatement.cpp +++ b/es2panda/ir/statements/ifStatement.cpp @@ -41,7 +41,7 @@ void IfStatement::Dump(ir::AstDumper *dumper) const {"alternate", AstDumper::Nullable(alternate_)}}); } -void IfStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void IfStatement::Compile(compiler::PandaGen *pg) const { auto *consequentEnd = pg->AllocLabel(); compiler::Label *statementEnd = consequentEnd; @@ -60,7 +60,7 @@ void IfStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const pg->SetLabel(this, statementEnd); } -checker::Type *IfStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *IfStatement::Check(checker::Checker *checker) const { checker::Type *testType = test_->Check(checker); checker->CheckTruthinessOfType(testType, Start()); diff --git a/es2panda/ir/statements/ifStatement.h b/es2panda/ir/statements/ifStatement.h index eca6a401a89a506733c66fb34ef079e9dd58ecec..ac4dd2f01f6a7e0f086aa3fe5f2e843a6c18203a 100644 --- a/es2panda/ir/statements/ifStatement.h +++ b/es2panda/ir/statements/ifStatement.h @@ -54,8 +54,8 @@ public: } void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: Expression *test_; diff --git a/es2panda/ir/statements/labelledStatement.cpp b/es2panda/ir/statements/labelledStatement.cpp index a799e8e05c584bdf0456bca894c1e9a7fbb07cf6..021c3f650b9176ba58499cb164ca621aec201e55 100644 --- a/es2panda/ir/statements/labelledStatement.cpp +++ b/es2panda/ir/statements/labelledStatement.cpp @@ -33,7 +33,7 @@ void LabelledStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "LabelledStatement"}, {"label", ident_}, {"body", body_}}); } -void LabelledStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void LabelledStatement::Compile(compiler::PandaGen *pg) const { compiler::LabelContext labelCtx(pg, this); body_->Compile(pg); diff --git a/es2panda/ir/statements/labelledStatement.h b/es2panda/ir/statements/labelledStatement.h index e52c51793d814bf92ded2cc317c953971d77696a..2b0d4d9a32154e2964b739ce06f120aacc93f67f 100644 --- a/es2panda/ir/statements/labelledStatement.h +++ b/es2panda/ir/statements/labelledStatement.h @@ -51,7 +51,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; protected: diff --git a/es2panda/ir/statements/returnStatement.cpp b/es2panda/ir/statements/returnStatement.cpp index f9a8200699ca4efe0406937d35586df015292c40..5d65a90860f58332ddc04961b2ff286f272ed61d 100644 --- a/es2panda/ir/statements/returnStatement.cpp +++ b/es2panda/ir/statements/returnStatement.cpp @@ -22,6 +22,7 @@ #include #include +#include namespace panda::es2panda::ir { @@ -37,7 +38,7 @@ void ReturnStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "ReturnStatement"}, {"argument", AstDumper::Nullable(argument_)}}); } -void ReturnStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void ReturnStatement::Compile(compiler::PandaGen *pg) const { if (argument_) { argument_->Compile(pg); @@ -62,7 +63,7 @@ void ReturnStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const } } -checker::Type *ReturnStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *ReturnStatement::Check(checker::Checker *checker) const { const ir::AstNode *ancestor = checker::Checker::FindAncestorGivenByType(this, ir::AstNodeType::SCRIPT_FUNCTION); ASSERT(ancestor && ancestor->IsScriptFunction()); @@ -77,14 +78,11 @@ checker::Type *ReturnStatement::Check([[maybe_unused]] checker::Checker *checker if (containingFunc->ReturnTypeAnnotation()) { checker::Type *returnType = checker->GlobalUndefinedType(); - checker::Type *funcReturnType = containingFunc->ReturnTypeAnnotation()->Check(checker); + checker::Type *funcReturnType = containingFunc->ReturnTypeAnnotation()->AsTypeNode()->GetType(checker); if (argument_) { - if (checker->ElaborateElementwise(argument_, funcReturnType, Start())) { - return nullptr; - } - - returnType = argument_->Check(checker); + checker->ElaborateElementwise(funcReturnType, argument_, Start()); + returnType = checker->CheckTypeCached(argument_); } checker->IsTypeAssignableTo(returnType, funcReturnType, diff --git a/es2panda/ir/statements/returnStatement.h b/es2panda/ir/statements/returnStatement.h index 65e772940c6e16528de4bf5c8ee5493507b80e58..827f8634c97dc198251b5c302388e639bb690fae 100644 --- a/es2panda/ir/statements/returnStatement.h +++ b/es2panda/ir/statements/returnStatement.h @@ -41,8 +41,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: Expression *argument_ {}; diff --git a/es2panda/ir/statements/switchStatement.cpp b/es2panda/ir/statements/switchStatement.cpp index 86ea76041aac9fdd2e73815af6df6709ba0dbdf9..fb9be5f8ed81f7fbc0414b6f542601cea357af26 100644 --- a/es2panda/ir/statements/switchStatement.cpp +++ b/es2panda/ir/statements/switchStatement.cpp @@ -40,7 +40,7 @@ void SwitchStatement::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "SwitchStatement"}, {"discriminant", discriminant_}, {"cases", cases_}}); } -void SwitchStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void SwitchStatement::Compile(compiler::PandaGen *pg) const { compiler::LocalRegScope lrs(pg, scope_); compiler::SwitchBuilder builder(pg, this); @@ -72,7 +72,7 @@ void SwitchStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const } } -checker::Type *SwitchStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *SwitchStatement::Check(checker::Checker *checker) const { checker::ScopeContext scopeCtx(checker, scope_); diff --git a/es2panda/ir/statements/switchStatement.h b/es2panda/ir/statements/switchStatement.h index 6e85ce9b04ac56903ad8dc4b3776fadcc20fb44b..3389f5bd0e39b27492650806f1f60bc12dcc769f 100644 --- a/es2panda/ir/statements/switchStatement.h +++ b/es2panda/ir/statements/switchStatement.h @@ -61,8 +61,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: binder::LocalScope *scope_; diff --git a/es2panda/ir/statements/throwStatement.h b/es2panda/ir/statements/throwStatement.h index 0372d8046f7a3729a60b90b17191831f236b43fa..e657ecab9130b3d3ec1e48e61cf2ce462f2b53e6 100644 --- a/es2panda/ir/statements/throwStatement.h +++ b/es2panda/ir/statements/throwStatement.h @@ -42,7 +42,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; + void Compile(compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; protected: diff --git a/es2panda/ir/statements/tryStatement.cpp b/es2panda/ir/statements/tryStatement.cpp index b5733e1af3b86c9a58aa338960ea60fb6401e0eb..6ec2774bdb8c4f78c26085125971e37f1f20b7e4 100644 --- a/es2panda/ir/statements/tryStatement.cpp +++ b/es2panda/ir/statements/tryStatement.cpp @@ -142,7 +142,7 @@ void TryStatement::CompileTryCatch(compiler::PandaGen *pg) const pg->SetLabel(this, labelSet.CatchEnd()); } -void TryStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void TryStatement::Compile(compiler::PandaGen *pg) const { if (finalizer_) { if (catchClause_) { @@ -155,7 +155,7 @@ void TryStatement::Compile([[maybe_unused]] compiler::PandaGen *pg) const } } -checker::Type *TryStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TryStatement::Check(checker::Checker *checker) const { block_->Check(checker); diff --git a/es2panda/ir/statements/tryStatement.h b/es2panda/ir/statements/tryStatement.h index c824b99db3b96e553fb9cc0c5d22731f765ca3e2..7cd7b3ef4a81c715080b83f3db0b7773c03ea57b 100644 --- a/es2panda/ir/statements/tryStatement.h +++ b/es2panda/ir/statements/tryStatement.h @@ -58,8 +58,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: void CompileTryCatch(compiler::PandaGen *pg) const; diff --git a/es2panda/ir/statements/variableDeclaration.cpp b/es2panda/ir/statements/variableDeclaration.cpp index 0e987e9889eb65c24416c8a6913b4eaa8dfbd242..aab386285aa4b310577141c0b44c1c8db01cd392 100644 --- a/es2panda/ir/statements/variableDeclaration.cpp +++ b/es2panda/ir/statements/variableDeclaration.cpp @@ -19,9 +19,6 @@ #include #include #include -#include -#include -#include #include namespace panda::es2panda::ir { @@ -68,63 +65,12 @@ void VariableDeclaration::Compile(compiler::PandaGen *pg) const } } -using TypeAnnotationDestructuringType = - std::tuple; - -static TypeAnnotationDestructuringType GetTypeAnnotationNodeAndDestructuringType(checker::Checker *checker, - const ir::VariableDeclarator *decl) -{ - if (decl->Id()->IsArrayPattern()) { - if (!decl->Init()) { - checker->ThrowTypeError("A destructuring declaration must have an initializer", decl->Id()->Start()); - } - - return {nullptr, decl->Id()->AsArrayPattern()->TypeAnnotation(), - checker::DestructuringType::ARRAY_DESTRUCTURING}; - } - - if (decl->Id()->IsObjectPattern()) { - if (!decl->Init()) { - checker->ThrowTypeError("A destructuring declaration must have an initializer", decl->Id()->Start()); - } - - return {nullptr, decl->Id()->AsObjectPattern()->TypeAnnotation(), - checker::DestructuringType::OBJECT_DESTRUCTURING}; - } - - ASSERT(decl->Id()->IsIdentifier()); - binder::ScopeFindResult result = checker->Scope()->Find(decl->Id()->AsIdentifier()->Name()); - ASSERT(result.variable); - return {result.variable, decl->Id()->AsIdentifier()->TypeAnnotation(), - checker::DestructuringType::NO_DESTRUCTURING}; -} - checker::Type *VariableDeclaration::Check(checker::Checker *checker) const { for (auto *it : declarators_) { - auto [bindingVar, typeAnnotation, destucturingType] = GetTypeAnnotationNodeAndDestructuringType(checker, it); - - // TODO(aszilagyi): binding_var - (void)bindingVar; - checker::Type *annotationType = typeAnnotation ? checker->CheckTypeCached(typeAnnotation) : nullptr; - - checker::Type *initType = it->Init() ? checker->CheckTypeCached(it->Init()) : nullptr; - - checker::Type *patternType = - destucturingType != checker::DestructuringType::NO_DESTRUCTURING ? it->Id()->Check(checker) : nullptr; - - if (initType && kind_ != ir::VariableDeclaration::VariableDeclarationKind::CONST) { - initType = checker->GetBaseTypeOfLiteralType(initType); - } - - checker->ValidateTypeAnnotationAndInitType(it->Init(), &initType, annotationType, patternType, - it->Id()->Start()); - - /* TODO(aszilagyi) */ - auto context = checker::VariableBindingContext::REGULAR; - checker->HandleVariableDeclarationWithContext(it->Id(), annotationType ? annotationType : initType, context, - destucturingType, annotationType); + it->Check(checker); } + return nullptr; } diff --git a/es2panda/ir/statements/variableDeclaration.h b/es2panda/ir/statements/variableDeclaration.h index 3c17ce25366484aa4fe63e3666b526a18ab78257..42a70da3a48fc5e413f13b1250e0d05b8a6e6aba 100644 --- a/es2panda/ir/statements/variableDeclaration.h +++ b/es2panda/ir/statements/variableDeclaration.h @@ -61,8 +61,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: VariableDeclarationKind kind_; diff --git a/es2panda/ir/statements/variableDeclarator.cpp b/es2panda/ir/statements/variableDeclarator.cpp index 64ebc7c354f1b2ecaa8591a8d34c5ef146a89dc3..7018207f6037a78be79aa3cbbcd8c29aa5a6f3aa 100644 --- a/es2panda/ir/statements/variableDeclarator.cpp +++ b/es2panda/ir/statements/variableDeclarator.cpp @@ -19,7 +19,13 @@ #include #include #include +#include #include +#include +#include +#include +#include +#include namespace panda::es2panda::ir { @@ -37,7 +43,7 @@ void VariableDeclarator::Dump(ir::AstDumper *dumper) const dumper->Add({{"type", "VariableDeclarator"}, {"id", id_}, {"init", AstDumper::Nullable(init_)}}); } -void VariableDeclarator::Compile([[maybe_unused]] compiler::PandaGen *pg) const +void VariableDeclarator::Compile(compiler::PandaGen *pg) const { compiler::LReference lref = compiler::LReference::CreateLRef(pg, id_, true); const ir::VariableDeclaration *decl = parent_->AsVariableDeclaration(); @@ -56,8 +62,84 @@ void VariableDeclarator::Compile([[maybe_unused]] compiler::PandaGen *pg) const lref.SetValue(); } -checker::Type *VariableDeclarator::Check([[maybe_unused]] checker::Checker *checker) const +static void CheckSimpleVariableDeclaration(checker::Checker *checker, const ir::VariableDeclarator *declarator) { + binder::Variable *bindingVar = declarator->Id()->AsIdentifier()->Variable(); + checker::Type *previousType = bindingVar->TsType(); + const ir::Expression *typeAnnotation = declarator->Id()->AsIdentifier()->TypeAnnotation(); + const ir::Expression *initializer = declarator->Init(); + bool isConst = declarator->Parent()->AsVariableDeclaration()->Kind() == + ir::VariableDeclaration::VariableDeclarationKind::CONST; + + if (isConst) { + checker->AddStatus(checker::CheckerStatus::IN_CONST_CONTEXT); + } + + if (typeAnnotation) { + typeAnnotation->Check(checker); + } + + if (typeAnnotation && initializer) { + checker::Type *annotationType = typeAnnotation->AsTypeNode()->GetType(checker); + checker->ElaborateElementwise(annotationType, initializer, declarator->Id()->Start()); + bindingVar->SetTsType(annotationType); + } else if (typeAnnotation) { + bindingVar->SetTsType(typeAnnotation->AsTypeNode()->GetType(checker)); + } else if (initializer) { + checker::Type *initializerType = checker->CheckTypeCached(initializer); + + if (!isConst) { + initializerType = checker->GetBaseTypeOfLiteralType(initializerType); + } + + bindingVar->SetTsType(initializerType); + } else { + checker->ThrowTypeError({"Variable ", declarator->Id()->AsIdentifier()->Name(), " implicitly has an any type."}, + declarator->Id()->Start()); + } + + if (previousType) { + checker->IsTypeIdenticalTo(bindingVar->TsType(), previousType, + {"Subsequent variable declaration must have the same type. Variable '", + bindingVar->Name(), "' must be of type '", previousType, "', but here has type '", + bindingVar->TsType(), "'."}, + declarator->Id()->Start()); + } + + checker->RemoveStatus(checker::CheckerStatus::IN_CONST_CONTEXT); +} + +checker::Type *VariableDeclarator::Check(checker::Checker *checker) const +{ + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return nullptr; + } + + if (id_->IsIdentifier()) { + CheckSimpleVariableDeclaration(checker, this); + checker->NodeCache().insert({this, nullptr}); + return nullptr; + } + + if (id_->IsArrayPattern()) { + auto context = checker::SavedCheckerContext(checker, checker::CheckerStatus::FORCE_TUPLE); + checker::ArrayDestructuringContext(checker, id_, false, id_->AsArrayPattern()->TypeAnnotation() == nullptr, + id_->AsArrayPattern()->TypeAnnotation(), init_) + .Start(); + + checker->NodeCache().insert({this, nullptr}); + return nullptr; + } + + ASSERT(id_->IsObjectPattern()); + auto context = checker::SavedCheckerContext(checker, checker::CheckerStatus::FORCE_TUPLE); + checker::ObjectDestructuringContext(checker, id_, false, id_->AsObjectPattern()->TypeAnnotation() == nullptr, + id_->AsObjectPattern()->TypeAnnotation(), init_) + .Start(); + + checker->NodeCache().insert({this, nullptr}); return nullptr; } diff --git a/es2panda/ir/statements/variableDeclarator.h b/es2panda/ir/statements/variableDeclarator.h index 1962474e23711b0c822de38db597ca9c8585479d..dd73f305eadcda0a2ca15680e7cf118538568528 100644 --- a/es2panda/ir/statements/variableDeclarator.h +++ b/es2panda/ir/statements/variableDeclarator.h @@ -66,8 +66,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *id_; diff --git a/es2panda/ir/statements/whileStatement.cpp b/es2panda/ir/statements/whileStatement.cpp index 158cdc258081fa284b8b5d1232da70c24f1aaa7d..258cd447ffe39ea53ec22236ba336c98e01ed162 100644 --- a/es2panda/ir/statements/whileStatement.cpp +++ b/es2panda/ir/statements/whileStatement.cpp @@ -54,7 +54,7 @@ void WhileStatement::Compile(compiler::PandaGen *pg) const pg->SetLabel(this, labelTarget.BreakTarget()); } -checker::Type *WhileStatement::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *WhileStatement::Check(checker::Checker *checker) const { checker::ScopeContext scopeCtx(checker, scope_); diff --git a/es2panda/ir/statements/whileStatement.h b/es2panda/ir/statements/whileStatement.h index 4ecd528c16271caf777f0ebd662491acbb9506cc..680389ab21bacb4a335defa6dc131a91b9df7749 100644 --- a/es2panda/ir/statements/whileStatement.h +++ b/es2panda/ir/statements/whileStatement.h @@ -64,8 +64,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; - void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + void Compile(compiler::PandaGen *pg) const override; + checker::Type *Check(checker::Checker *checker) const override; protected: Expression *test_; diff --git a/es2panda/ir/ts/tsAnyKeyword.cpp b/es2panda/ir/ts/tsAnyKeyword.cpp index 84ca60b157e466975d5e91d0934ae9eea0ab89aa..18572a52ac3e62e91ac3ac3faf39a511a52315f0 100644 --- a/es2panda/ir/ts/tsAnyKeyword.cpp +++ b/es2panda/ir/ts/tsAnyKeyword.cpp @@ -15,6 +15,7 @@ #include "tsAnyKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSAnyKeyword::Check([[maybe_unused]] checker::Checker *checker) c return nullptr; } +checker::Type *TSAnyKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalAnyType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsAnyKeyword.h b/es2panda/ir/ts/tsAnyKeyword.h index 4b91322a284c40710b7d6a2644d626f516025cc4..438466758e2a5afd5433472dcb09c902a795a186 100644 --- a/es2panda/ir/ts/tsAnyKeyword.h +++ b/es2panda/ir/ts/tsAnyKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_ANY_KEYWORD_H #define ES2PANDA_IR_TS_ANY_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSAnyKeyword : public Expression { +class TSAnyKeyword : public TypeNode { public: - explicit TSAnyKeyword() : Expression(AstNodeType::TS_ANY_KEYWORD) {} + explicit TSAnyKeyword() : TypeNode(AstNodeType::TS_ANY_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsArrayType.cpp b/es2panda/ir/ts/tsArrayType.cpp index 85fb3294f7f113a9fdee08d5d02dfa3280a32d3e..7e5d86c56397edf52acb0da2115a834627274804 100644 --- a/es2panda/ir/ts/tsArrayType.cpp +++ b/es2panda/ir/ts/tsArrayType.cpp @@ -15,6 +15,7 @@ #include "tsArrayType.h" +#include #include namespace panda::es2panda::ir { @@ -31,9 +32,15 @@ void TSArrayType::Dump(ir::AstDumper *dumper) const void TSArrayType::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSArrayType::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSArrayType::Check(checker::Checker *checker) const { + elementType_->Check(checker); return nullptr; } +checker::Type *TSArrayType::GetType(checker::Checker *checker) const +{ + return checker->Allocator()->New(elementType_->AsTypeNode()->GetType(checker)); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsArrayType.h b/es2panda/ir/ts/tsArrayType.h index 6d1e68363ab1f0630fb60e82c6542d54bb6c7644..1c6e1337dde7f607f18ead3472941b0bc7e2a877 100644 --- a/es2panda/ir/ts/tsArrayType.h +++ b/es2panda/ir/ts/tsArrayType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_ARRAY_TYPE_H #define ES2PANDA_IR_TS_ARRAY_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,11 +29,9 @@ class Type; namespace panda::es2panda::ir { -class TSArrayType : public Expression { +class TSArrayType : public TypeNode { public: - explicit TSArrayType(Expression *elementType) : Expression(AstNodeType::TS_ARRAY_TYPE), elementType_(elementType) - { - } + explicit TSArrayType(Expression *elementType) : TypeNode(AstNodeType::TS_ARRAY_TYPE), elementType_(elementType) {} const Expression *ElementType() const { @@ -43,7 +41,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: Expression *elementType_; diff --git a/es2panda/ir/ts/tsAsExpression.cpp b/es2panda/ir/ts/tsAsExpression.cpp index 1e32fa7b86c39c8a47ead8f092f4df2dc33e6cb6..a4e6e08db60e44e48ee4752ea69accde24948027 100644 --- a/es2panda/ir/ts/tsAsExpression.cpp +++ b/es2panda/ir/ts/tsAsExpression.cpp @@ -21,6 +21,7 @@ #include #include #include +#include namespace panda::es2panda::ir { @@ -75,12 +76,12 @@ static bool IsValidConstAssertionArgument(checker::Checker *checker, const ir::A } } -checker::Type *TSAsExpression::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSAsExpression::Check(checker::Checker *checker) const { - // TODO(aszilagyi): params is_const_, is_const_ - checker::Type *exprType = expression_->Check(checker); - if (isConst_) { + auto context = checker::SavedCheckerContext(checker, checker::CheckerStatus::IN_CONST_CONTEXT); + checker::Type *exprType = expression_->Check(checker); + if (!IsValidConstAssertionArgument(checker, expression_)) { checker->ThrowTypeError( "A 'const' assertions can only be applied to references to enum members, or string, number, " @@ -91,12 +92,11 @@ checker::Type *TSAsExpression::Check([[maybe_unused]] checker::Checker *checker) return exprType; } - exprType = checker->GetBaseTypeOfLiteralType(exprType); - if (exprType->IsObjectType() && exprType->AsObjectType()->IsObjectLiteralType()) { - exprType->AsObjectType()->RemoveObjectFlag(checker::ObjectType::ObjectFlags::CHECK_EXCESS_PROPS); - } + auto context = checker::SavedCheckerContext(checker, checker::CheckerStatus::NO_OPTS); - checker::Type *targetType = typeAnnotation_->Check(checker); + typeAnnotation_->Check(checker); + checker::Type *exprType = checker->GetBaseTypeOfLiteralType(expression_->Check(checker)); + checker::Type *targetType = typeAnnotation_->AsTypeNode()->GetType(checker); checker->IsTypeComparableTo( targetType, exprType, diff --git a/es2panda/ir/ts/tsAsExpression.h b/es2panda/ir/ts/tsAsExpression.h index 43b5c8d311d974e176e064eef39b249a8db35a79..698a431bf8130fba7d40198142d3ab0a6229d3e8 100644 --- a/es2panda/ir/ts/tsAsExpression.h +++ b/es2panda/ir/ts/tsAsExpression.h @@ -58,7 +58,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *expression_; diff --git a/es2panda/ir/ts/tsBigintKeyword.cpp b/es2panda/ir/ts/tsBigintKeyword.cpp index 7ae93c99520f11d73bc68ca8ec6b23457e570cde..53c0ee42405e9372756996df3895d63914ec239a 100644 --- a/es2panda/ir/ts/tsBigintKeyword.cpp +++ b/es2panda/ir/ts/tsBigintKeyword.cpp @@ -15,6 +15,7 @@ #include "tsBigintKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSBigintKeyword::Check([[maybe_unused]] checker::Checker *checker return nullptr; } +checker::Type *TSBigintKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalBigintType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsBigintKeyword.h b/es2panda/ir/ts/tsBigintKeyword.h index f978de99cd6e9b96699beaf15e8691a516080255..174253b416aa4f16ed2dfc61ee992e289022b0d0 100644 --- a/es2panda/ir/ts/tsBigintKeyword.h +++ b/es2panda/ir/ts/tsBigintKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_BIGINT_KEYWORD_H #define ES2PANDA_IR_TS_BIGINT_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSBigintKeyword : public Expression { +class TSBigintKeyword : public TypeNode { public: - explicit TSBigintKeyword() : Expression(AstNodeType::TS_BIGINT_KEYWORD) {} + explicit TSBigintKeyword() : TypeNode(AstNodeType::TS_BIGINT_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsBooleanKeyword.cpp b/es2panda/ir/ts/tsBooleanKeyword.cpp index cf452c958d50390fd88fdab097a5ea66c4391ba7..179e4e1942c150d6e665f2505a81446cbbd46746 100644 --- a/es2panda/ir/ts/tsBooleanKeyword.cpp +++ b/es2panda/ir/ts/tsBooleanKeyword.cpp @@ -15,6 +15,7 @@ #include "tsBooleanKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSBooleanKeyword::Check([[maybe_unused]] checker::Checker *checke return nullptr; } +checker::Type *TSBooleanKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalBooleanType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsBooleanKeyword.h b/es2panda/ir/ts/tsBooleanKeyword.h index e1bbc321990a6c3f98b0cd7372d4cc9e0cf56c15..4e6056d729f765518dfc844149ee5cd6d880b1bb 100644 --- a/es2panda/ir/ts/tsBooleanKeyword.h +++ b/es2panda/ir/ts/tsBooleanKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_BOOLEAN_KEYWORD_H #define ES2PANDA_IR_TS_BOOLEAN_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSBooleanKeyword : public Expression { +class TSBooleanKeyword : public TypeNode { public: - explicit TSBooleanKeyword() : Expression(AstNodeType::TS_BOOLEAN_KEYWORD) {} + explicit TSBooleanKeyword() : TypeNode(AstNodeType::TS_BOOLEAN_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsConditionalType.cpp b/es2panda/ir/ts/tsConditionalType.cpp index cbf616e0f879c0e971417a5030a8b1871b0d7626..ffe89a8fbbf94531499fe0839f7ffca2db92847d 100644 --- a/es2panda/ir/ts/tsConditionalType.cpp +++ b/es2panda/ir/ts/tsConditionalType.cpp @@ -43,4 +43,9 @@ checker::Type *TSConditionalType::Check([[maybe_unused]] checker::Checker *check return nullptr; } +checker::Type *TSConditionalType::GetType([[maybe_unused]] checker::Checker *checker) const +{ + return nullptr; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsConditionalType.h b/es2panda/ir/ts/tsConditionalType.h index 1a01ad7ff355923bf3135b26b0031709c2770e03..4689e3369119348314ed25a68d921417ccf2631b 100644 --- a/es2panda/ir/ts/tsConditionalType.h +++ b/es2panda/ir/ts/tsConditionalType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_CONDITIONAL_TYPE_H #define ES2PANDA_IR_TS_CONDITIONAL_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,11 +29,11 @@ class Type; namespace panda::es2panda::ir { -class TSConditionalType : public Expression { +class TSConditionalType : public TypeNode { public: explicit TSConditionalType(Expression *checkType, Expression *extendsType, Expression *trueType, Expression *falseType) - : Expression(AstNodeType::TS_CONDITIONAL_TYPE), + : TypeNode(AstNodeType::TS_CONDITIONAL_TYPE), checkType_(checkType), extendsType_(extendsType), trueType_(trueType), @@ -65,6 +65,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const override; private: Expression *checkType_; diff --git a/es2panda/ir/ts/tsConstructorType.cpp b/es2panda/ir/ts/tsConstructorType.cpp index 61d9544af3b68a59893d222b3c886c19e80dc3fd..74089d8bb1eebe7cc83c0e6f59bb8c75ebba196a 100644 --- a/es2panda/ir/ts/tsConstructorType.cpp +++ b/es2panda/ir/ts/tsConstructorType.cpp @@ -52,12 +52,18 @@ checker::Type *TSConstructorType::Check(checker::Checker *checker) const { checker::ScopeContext scopeCtx(checker, scope_); - auto *signatureInfo = checker->Allocator()->New(); - checker->CheckFunctionParameterDeclaration(params_, signatureInfo); - checker::Type *returnType = returnType_->Check(checker); - auto *constructSignature = checker->Allocator()->New(signatureInfo, returnType); + auto *signatureInfo = checker->Allocator()->New(checker->Allocator()); + checker->CheckFunctionParameterDeclarations(params_, signatureInfo); + returnType_->Check(checker); + auto *constructSignature = + checker->Allocator()->New(signatureInfo, returnType_->AsTypeNode()->GetType(checker)); return checker->CreateConstructorTypeWithSignature(constructSignature); } +checker::Type *TSConstructorType::GetType(checker::Checker *checker) const +{ + return checker->CheckTypeCached(this); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsConstructorType.h b/es2panda/ir/ts/tsConstructorType.h index fcb3b70a082b6fe8a0906fc2bff047211bb1d629..162eb08070145451de60be7dc5549c237e21c7f4 100644 --- a/es2panda/ir/ts/tsConstructorType.h +++ b/es2panda/ir/ts/tsConstructorType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_CONSTRUCTOR_TYPE_H #define ES2PANDA_IR_TS_CONSTRUCTOR_TYPE_H -#include +#include namespace panda::es2panda::binder { class Scope; @@ -35,11 +35,11 @@ namespace panda::es2panda::ir { class TSTypeParameterDeclaration; -class TSConstructorType : public Expression { +class TSConstructorType : public TypeNode { public: explicit TSConstructorType(binder::Scope *scope, ArenaVector &¶ms, TSTypeParameterDeclaration *typeParams, Expression *returnType, bool abstract) - : Expression(AstNodeType::TS_CONSTRUCTOR_TYPE), + : TypeNode(AstNodeType::TS_CONSTRUCTOR_TYPE), scope_(scope), params_(std::move(params)), typeParams_(typeParams), @@ -76,7 +76,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: binder::Scope *scope_; diff --git a/es2panda/ir/ts/tsEnumDeclaration.cpp b/es2panda/ir/ts/tsEnumDeclaration.cpp index d92e673a355032b7a0c7f443f4cdd9f5e20b01d1..304f4933eea763ac5273562b47fef559c2afec97 100644 --- a/es2panda/ir/ts/tsEnumDeclaration.cpp +++ b/es2panda/ir/ts/tsEnumDeclaration.cpp @@ -383,7 +383,7 @@ checker::Type *TSEnumDeclaration::InferType(checker::Checker *checker, bool isCo return enumType; } -checker::Type *TSEnumDeclaration::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSEnumDeclaration::Check(checker::Checker *checker) const { binder::Variable *enumVar = key_->Variable(); ASSERT(enumVar); diff --git a/es2panda/ir/ts/tsEnumDeclaration.h b/es2panda/ir/ts/tsEnumDeclaration.h index 6baa9c7ccc40883a0c59de795a2dde632a4cdee1..0b04785f9d56d7ae61c832ac82e1f220463b4a27 100644 --- a/es2panda/ir/ts/tsEnumDeclaration.h +++ b/es2panda/ir/ts/tsEnumDeclaration.h @@ -77,7 +77,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: binder::LocalScope *scope_; diff --git a/es2panda/ir/ts/tsFunctionType.cpp b/es2panda/ir/ts/tsFunctionType.cpp index 43e12a305adcd1f0e0c69cea75a20fe33129e7a8..7715a736cba224277385cb6fdd26012f4cd74e90 100644 --- a/es2panda/ir/ts/tsFunctionType.cpp +++ b/es2panda/ir/ts/tsFunctionType.cpp @@ -51,12 +51,18 @@ checker::Type *TSFunctionType::Check(checker::Checker *checker) const { checker::ScopeContext scopeCtx(checker, scope_); - auto *signatureInfo = checker->Allocator()->New(); - checker->CheckFunctionParameterDeclaration(params_, signatureInfo); - checker::Type *returnType = returnType_->Check(checker); - auto *callSignature = checker->Allocator()->New(signatureInfo, returnType); + auto *signatureInfo = checker->Allocator()->New(checker->Allocator()); + checker->CheckFunctionParameterDeclarations(params_, signatureInfo); + returnType_->Check(checker); + auto *callSignature = + checker->Allocator()->New(signatureInfo, returnType_->AsTypeNode()->GetType(checker)); return checker->CreateFunctionTypeWithSignature(callSignature); } +checker::Type *TSFunctionType::GetType(checker::Checker *checker) const +{ + return checker->CheckTypeCached(this); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsFunctionType.h b/es2panda/ir/ts/tsFunctionType.h index 49f9d9fc8950259bafbfa00ad5c8cbf8640c1fe7..7cc2508df423ffced9a0819a5d482e13dcf7431c 100644 --- a/es2panda/ir/ts/tsFunctionType.h +++ b/es2panda/ir/ts/tsFunctionType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_FUNCTION_TYPE_H #define ES2PANDA_IR_TS_FUNCTION_TYPE_H -#include +#include namespace panda::es2panda::binder { class Scope; @@ -35,11 +35,11 @@ namespace panda::es2panda::ir { class TSTypeParameterDeclaration; -class TSFunctionType : public Expression { +class TSFunctionType : public TypeNode { public: explicit TSFunctionType(binder::Scope *scope, ArenaVector &¶ms, TSTypeParameterDeclaration *typeParams, Expression *returnType) - : Expression(AstNodeType::TS_FUNCTION_TYPE), + : TypeNode(AstNodeType::TS_FUNCTION_TYPE), scope_(scope), params_(std::move(params)), typeParams_(typeParams), @@ -70,7 +70,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: binder::Scope *scope_; diff --git a/es2panda/ir/ts/tsImportType.cpp b/es2panda/ir/ts/tsImportType.cpp index 06b65b31a3a8b8ac98bedc605d205c840db07e3d..89b3e32d5c2f8f736ced463d73171cf9fff41d92 100644 --- a/es2panda/ir/ts/tsImportType.cpp +++ b/es2panda/ir/ts/tsImportType.cpp @@ -50,4 +50,9 @@ checker::Type *TSImportType::Check([[maybe_unused]] checker::Checker *checker) c return nullptr; } +checker::Type *TSImportType::GetType([[maybe_unused]] checker::Checker *checker) const +{ + return nullptr; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsImportType.h b/es2panda/ir/ts/tsImportType.h index 08a6c675aa2d118370b55cd2eaa215d92a285755..df73c96aed539744edcda46651720123c5eaae63 100644 --- a/es2panda/ir/ts/tsImportType.h +++ b/es2panda/ir/ts/tsImportType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_IMPORT_TYPE_H #define ES2PANDA_IR_TS_IMPORT_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -31,11 +31,11 @@ namespace panda::es2panda::ir { class TSTypeParameterInstantiation; -class TSImportType : public Expression { +class TSImportType : public TypeNode { public: explicit TSImportType(Expression *param, TSTypeParameterInstantiation *typeParams, Expression *qualifier, bool isTypeof) - : Expression(AstNodeType::TS_IMPORT_TYPE), + : TypeNode(AstNodeType::TS_IMPORT_TYPE), param_(param), typeParams_(typeParams), qualifier_(qualifier), @@ -67,6 +67,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const override; private: Expression *param_; diff --git a/es2panda/ir/ts/tsIndexSignature.cpp b/es2panda/ir/ts/tsIndexSignature.cpp index 67c106b1214e040b120f870333416279b176ed76..270a8aa2090bae3ef4705d2c8eb3af7d71e839db 100644 --- a/es2panda/ir/ts/tsIndexSignature.cpp +++ b/es2panda/ir/ts/tsIndexSignature.cpp @@ -15,7 +15,9 @@ #include "tsIndexSignature.h" +#include #include +#include #include namespace panda::es2panda::ir { @@ -42,9 +44,31 @@ void TSIndexSignature::Dump(ir::AstDumper *dumper) const void TSIndexSignature::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSIndexSignature::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSIndexSignature::Check(checker::Checker *checker) const { - return nullptr; + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return found->second; + } + + const util::StringView ¶mName = param_->AsIdentifier()->Name(); + typeAnnotation_->Check(checker); + checker::Type *indexType = typeAnnotation_->AsTypeNode()->GetType(checker); + checker::IndexInfo *info = + checker->Allocator()->New(indexType, paramName, readonly_, this->Start()); + checker::ObjectDescriptor *desc = checker->Allocator()->New(checker->Allocator()); + checker::ObjectType *placeholder = checker->Allocator()->New(desc); + + if (Kind() == ir::TSIndexSignature::TSIndexSignatureKind::NUMBER) { + placeholder->Desc()->numberIndexInfo = info; + } else { + placeholder->Desc()->stringIndexInfo = info; + } + + checker->NodeCache().insert({this, placeholder}); + + return placeholder; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsIndexSignature.h b/es2panda/ir/ts/tsIndexSignature.h index 334b042033c3069f8e63e17d059de8fc9a07bff3..170a4e7bd9529f600c591321172f82c3f5bd4bfc 100644 --- a/es2panda/ir/ts/tsIndexSignature.h +++ b/es2panda/ir/ts/tsIndexSignature.h @@ -61,7 +61,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *param_; diff --git a/es2panda/ir/ts/tsIndexedAccessType.cpp b/es2panda/ir/ts/tsIndexedAccessType.cpp index 2e55dce32d7dc5e02c0c5ef9298160d7ab88bef6..c7e479449c894e3e1107f25af6be249ad8bb17ac 100644 --- a/es2panda/ir/ts/tsIndexedAccessType.cpp +++ b/es2panda/ir/ts/tsIndexedAccessType.cpp @@ -17,6 +17,7 @@ #include #include +#include namespace panda::es2panda::ir { @@ -33,12 +34,45 @@ void TSIndexedAccessType::Dump(ir::AstDumper *dumper) const void TSIndexedAccessType::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSIndexedAccessType::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSIndexedAccessType::Check(checker::Checker *checker) const { - checker::Type *baseType = objectType_->Check(checker); - checker::Type *propType = checker->ResolveBaseProp(baseType, indexType_, false, Start()); + objectType_->Check(checker); + indexType_->Check(checker); + checker::Type *resolved = GetType(checker); - return propType; + if (resolved) { + return nullptr; + } + + checker::Type *indexType = checker->CheckTypeCached(indexType_); + + if (!indexType->HasTypeFlag(checker::TypeFlag::STRING_LIKE | checker::TypeFlag::NUMBER_LIKE)) { + checker->ThrowTypeError({"Type ", indexType, " cannot be used as index type"}, indexType_->Start()); + } + + if (indexType->IsNumberType()) { + checker->ThrowTypeError("Type has no matching singature for type 'number'", Start()); + } + + checker->ThrowTypeError("Type has no matching singature for type 'string'", Start()); + return nullptr; +} + +checker::Type *TSIndexedAccessType::GetType(checker::Checker *checker) const +{ + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return found->second; + } + + checker::Type *baseType = objectType_->AsTypeNode()->GetType(checker); + checker::Type *indexType = indexType_->AsTypeNode()->GetType(checker); + checker::Type *resolved = checker->GetPropertyTypeForIndexType(baseType, indexType); + + checker->NodeCache().insert({this, resolved}); + + return resolved; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsIndexedAccessType.h b/es2panda/ir/ts/tsIndexedAccessType.h index 20ca95fe004b37de5572c00efef1fa5be10dae91..9d133fdb90d430d11aadf6a3b9b2dac0feddd469 100644 --- a/es2panda/ir/ts/tsIndexedAccessType.h +++ b/es2panda/ir/ts/tsIndexedAccessType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_INDEXED_ACCESS_TYPE_H #define ES2PANDA_IR_TS_INDEXED_ACCESS_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,10 +29,10 @@ class Type; namespace panda::es2panda::ir { -class TSIndexedAccessType : public Expression { +class TSIndexedAccessType : public TypeNode { public: explicit TSIndexedAccessType(Expression *objectType, Expression *indexType) - : Expression(AstNodeType::TS_INDEXED_ACCESS_TYPE), objectType_(objectType), indexType_(indexType) + : TypeNode(AstNodeType::TS_INDEXED_ACCESS_TYPE), objectType_(objectType), indexType_(indexType) { } @@ -49,7 +49,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: Expression *objectType_; diff --git a/es2panda/ir/ts/tsInferType.cpp b/es2panda/ir/ts/tsInferType.cpp index e549496ca53fb4eb8f5141b4ae2f62f388193f00..e1787d04bd8b8d9de1e784bd9c256726887ef858 100644 --- a/es2panda/ir/ts/tsInferType.cpp +++ b/es2panda/ir/ts/tsInferType.cpp @@ -37,4 +37,9 @@ checker::Type *TSInferType::Check([[maybe_unused]] checker::Checker *checker) co return nullptr; } +checker::Type *TSInferType::GetType([[maybe_unused]] checker::Checker *checker) const +{ + return nullptr; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsInferType.h b/es2panda/ir/ts/tsInferType.h index 9eead52a34e2e134eaa01f503b366a20fefbb1cf..d401c76a589b4803849fe0c3f1c35dc0d0d2bdee 100644 --- a/es2panda/ir/ts/tsInferType.h +++ b/es2panda/ir/ts/tsInferType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_INFER_TYPE_H #define ES2PANDA_IR_TS_INFER_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -31,11 +31,9 @@ namespace panda::es2panda::ir { class TSTypeParameter; -class TSInferType : public Expression { +class TSInferType : public TypeNode { public: - explicit TSInferType(TSTypeParameter *typeParam) : Expression(AstNodeType::TS_INFER_TYPE), typeParam_(typeParam) - { - } + explicit TSInferType(TSTypeParameter *typeParam) : TypeNode(AstNodeType::TS_INFER_TYPE), typeParam_(typeParam) {} const TSTypeParameter *TypeParam() const { @@ -46,6 +44,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const override; private: TSTypeParameter *typeParam_; diff --git a/es2panda/ir/ts/tsInterfaceBody.cpp b/es2panda/ir/ts/tsInterfaceBody.cpp index 66c87f8d2a7e9812567add77e9de2b3b864fc57b..2dc2278c714a0b30f0c8f3fe728810cf2d48d8e2 100644 --- a/es2panda/ir/ts/tsInterfaceBody.cpp +++ b/es2panda/ir/ts/tsInterfaceBody.cpp @@ -33,8 +33,12 @@ void TSInterfaceBody::Dump(ir::AstDumper *dumper) const void TSInterfaceBody::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSInterfaceBody::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSInterfaceBody::Check(checker::Checker *checker) const { + for (auto *it : body_) { + it->Check(checker); + } + return nullptr; } diff --git a/es2panda/ir/ts/tsInterfaceBody.h b/es2panda/ir/ts/tsInterfaceBody.h index 1aed06f628197e0684930721883dea4351ad23bf..62b5b52f62965b22ac7167dcef1a244f552eccdd 100644 --- a/es2panda/ir/ts/tsInterfaceBody.h +++ b/es2panda/ir/ts/tsInterfaceBody.h @@ -44,7 +44,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: ArenaVector body_; diff --git a/es2panda/ir/ts/tsInterfaceDeclaration.cpp b/es2panda/ir/ts/tsInterfaceDeclaration.cpp index 6046a09be05b03b24637c0d023cd2bb763193834..a8e96c32591a07cc3c071399955805a380d41b1e 100644 --- a/es2panda/ir/ts/tsInterfaceDeclaration.cpp +++ b/es2panda/ir/ts/tsInterfaceDeclaration.cpp @@ -36,11 +36,11 @@ void TSInterfaceDeclaration::Iterate(const NodeTraverser &cb) const cb(typeParams_); } - cb(body_); - for (auto *it : extends_) { cb(it); } + + cb(body_); } void TSInterfaceDeclaration::Dump(ir::AstDumper *dumper) const @@ -55,12 +55,17 @@ void TSInterfaceDeclaration::Dump(ir::AstDumper *dumper) const void TSInterfaceDeclaration::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} void CheckInheritedPropertiesAreIdentical(checker::Checker *checker, checker::InterfaceType *type, - lexer::SourcePosition locInfo) + const lexer::SourcePosition &locInfo) { - if (type->Bases().size() < 2) { + checker->GetBaseTypes(type); + + size_t constexpr BASE_SIZE_LIMIT = 2; + if (type->Bases().size() < BASE_SIZE_LIMIT) { return; } + checker->ResolveDeclaredMembers(type); + checker::InterfacePropertyMap properties; for (auto *it : type->Properties()) { @@ -68,7 +73,8 @@ void CheckInheritedPropertiesAreIdentical(checker::Checker *checker, checker::In } for (auto *base : type->Bases()) { - std::vector inheritedProperties; + checker->ResolveStructuredTypeMembers(base); + ArenaVector inheritedProperties(checker->Allocator()->Adapter()); base->AsInterfaceType()->CollectProperties(&inheritedProperties); for (auto *inheritedProp : inheritedProperties) { @@ -76,7 +82,9 @@ void CheckInheritedPropertiesAreIdentical(checker::Checker *checker, checker::In if (res == properties.end()) { properties.insert({inheritedProp->Name(), {inheritedProp, base->AsInterfaceType()}}); } else if (res->second.second != type) { - checker->IsTypeIdenticalTo(inheritedProp->TsType(), res->second.first->TsType(), + checker::Type *sourceType = checker->GetTypeOfVariable(inheritedProp); + checker::Type *targetType = checker->GetTypeOfVariable(res->second.first); + checker->IsTypeIdenticalTo(sourceType, targetType, {"Interface '", type, "' cannot simultaneously extend types '", res->second.second, "' and '", base->AsInterfaceType(), "'."}, locInfo); @@ -85,126 +93,35 @@ void CheckInheritedPropertiesAreIdentical(checker::Checker *checker, checker::In } } -checker::Type *TSInterfaceDeclaration::InferType(checker::Checker *checker, binder::Variable *bindingVar) const +checker::Type *TSInterfaceDeclaration::Check(checker::Checker *checker) const { - auto *decl = bindingVar->Declaration(); - checker::ObjectDescriptor *desc = checker->Allocator()->New(); - std::set extendsSet; - const auto &declarations = decl->AsInterfaceDecl()->Decls(); - ASSERT(!declarations.empty()); - - checker::InterfaceType *newInterface = checker->Allocator()->New(decl->Name(), desc); - newInterface->SetVariable(bindingVar); - bindingVar->SetTsType(newInterface); - - std::pair, size_t> mergedTypeParams = - checker->CollectTypeParametersFromDeclarations(declarations); - - newInterface->SetMergedTypeParams(std::move(mergedTypeParams)); - - for (const auto *it : declarations) { - const ir::TSInterfaceDeclaration *currentDecl = it->AsTSInterfaceDeclaration(); - - checker::ScopeContext scopeCtx(checker, currentDecl->Scope()); - - bool throwTypeParameterMismatchError = false; - - if (currentDecl->TypeParams()) { - std::vector typeParams = checker->CheckTypeParameters(currentDecl->TypeParams()); - - throwTypeParameterMismatchError = - checker->CheckTypeParametersAreIdentical(newInterface->GetMergedTypeParams(), typeParams); - } else if (!newInterface->GetMergedTypeParams().first.empty() && - newInterface->GetMergedTypeParams().second != 0) { - throwTypeParameterMismatchError = true; - } - - if (throwTypeParameterMismatchError) { - checker->ThrowTypeError( - {"All declarations of '", newInterface->Name(), "' must have identical type parameters."}, - currentDecl->Id()->Start()); - } - - for (const auto *iter : currentDecl->Body()->AsTSInterfaceBody()->Body()) { - if (iter->IsTSPropertySignature() || iter->IsTSMethodSignature()) { - checker->PrefetchTypeLiteralProperties(iter, desc); - } - } - - for (auto *member : currentDecl->Body()->AsTSInterfaceBody()->Body()) { - checker->CheckTsTypeLiteralOrInterfaceMember(member, desc); - } - - for (const auto *extends : currentDecl->Extends()) { - // TODO(Csaba Repasi): Handle TSQualifiedName here - - binder::Variable *extendsVar = extends->Expr()->AsIdentifier()->Variable(); - - if (!extendsVar) { - checker->ThrowTypeError({"Cannot find name ", extendsVar->Name()}, extends->Start()); - } - - if (!extendsVar->HasFlag(binder::VariableFlags::INTERFACE)) { - checker->ThrowTypeError( - "An interface can only extend an object type or intersection of object types with statically " - "known " - "members", - extends->Start()); - } - - extendsSet.insert(extends); - } - } - - for (const auto *base : extendsSet) { - // TODO(Csaba Repasi): Handle TSQualifiedName here - binder::Variable *extendsVar = base->Expr()->AsIdentifier()->Variable(); - - if (!checker->TypeStack().insert(extendsVar->Declaration()->Node()).second) { - checker->ThrowTypeError({"Type '", newInterface->Name(), "' recursively references itself as a base type"}, - decl->AsInterfaceDecl()->Node()->AsTSInterfaceDeclaration()->Id()->Start()); + binder::Variable *var = id_->Variable(); + ASSERT(var->Declaration()->Node() && var->Declaration()->Node()->IsTSInterfaceDeclaration()); + + if (this == var->Declaration()->Node()) { + checker::Type *resolvedType = var->TsType(); + + if (!resolvedType) { + checker::ObjectDescriptor *desc = + checker->Allocator()->New(checker->Allocator()); + resolvedType = checker->Allocator()->New(checker->Allocator(), id_->Name(), desc); + resolvedType->SetVariable(var); + var->SetTsType(resolvedType); } - checker::ObjectType *resolvedBaseType = InferType(checker, extendsVar)->AsObjectType(); + checker::InterfaceType *resolvedInterface = resolvedType->AsObjectType()->AsInterfaceType(); + CheckInheritedPropertiesAreIdentical(checker, resolvedInterface, id_->Start()); - if (extendsVar->HasFlag(binder::VariableFlags::INTERFACE)) { - for (const auto *it : extendsVar->Declaration()->AsInterfaceDecl()->Decls()) { - if (!it->TypeParams()) { - continue; - } - - resolvedBaseType = checker - ->InstantiateGenericInterface(extendsVar, extendsVar->Declaration(), - base->TypeParams(), base->Start()) - ->AsObjectType(); - break; - } + for (auto *base : resolvedInterface->Bases()) { + checker->IsTypeAssignableTo(resolvedInterface, base, + {"Interface '", id_->Name(), "' incorrectly extends interface '", base, "'"}, + id_->Start()); } - newInterface->AddBase(resolvedBaseType); - - checker->TypeStack().erase(extendsVar->Declaration()->Node()); - } - - CheckInheritedPropertiesAreIdentical(checker, newInterface, declarations[0]->Id()->Start()); - - for (auto *it : newInterface->Bases()) { - checker->IsTypeAssignableTo( - newInterface, it, - {"Interface '", newInterface, "' incorrectly extends interface '", it->AsInterfaceType(), "'"}, - declarations[0]->Start()); + checker->CheckIndexConstraints(resolvedInterface); } - checker->CheckIndexConstraints(newInterface); - - return newInterface; -} - -checker::Type *TSInterfaceDeclaration::Check([[maybe_unused]] checker::Checker *checker) const -{ - if (!id_->Variable()->TsType()) { - InferType(checker, id_->Variable()); - } + body_->Check(checker); return nullptr; } diff --git a/es2panda/ir/ts/tsInterfaceDeclaration.h b/es2panda/ir/ts/tsInterfaceDeclaration.h index e613ae1346177db6f56bed5b8ea1aafeb402af54..a866a55d0b85152c4e194d3f6d28b3b8f3df33e2 100644 --- a/es2panda/ir/ts/tsInterfaceDeclaration.h +++ b/es2panda/ir/ts/tsInterfaceDeclaration.h @@ -80,7 +80,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; checker::Type *InferType(checker::Checker *checker, binder::Variable *bindingVar) const; private: diff --git a/es2panda/ir/ts/tsInterfaceHeritage.cpp b/es2panda/ir/ts/tsInterfaceHeritage.cpp index 79d8e44b09a5a9184a2c3b6f0fbf59b1e9ec0906..e8801521f85b817fdd7b07a2edd0f08a10688430 100644 --- a/es2panda/ir/ts/tsInterfaceHeritage.cpp +++ b/es2panda/ir/ts/tsInterfaceHeritage.cpp @@ -27,24 +27,21 @@ namespace panda::es2panda::ir { void TSInterfaceHeritage::Iterate(const NodeTraverser &cb) const { cb(expr_); - - if (typeParams_) { - cb(typeParams_); - } } void TSInterfaceHeritage::Dump(ir::AstDumper *dumper) const { - dumper->Add( - {{"type", "TSInterfaceHeritage"}, {"expression", expr_}, {"typeParameters", AstDumper::Optional(typeParams_)}}); + dumper->Add({ + {"type", "TSInterfaceHeritage"}, + {"expression", expr_}, + }); } void TSInterfaceHeritage::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} checker::Type *TSInterfaceHeritage::Check([[maybe_unused]] checker::Checker *checker) const -{ // TODO(Csaba Repasi): Handle TSQualifiedName here - return TSTypeReference::ResolveReference(checker, expr_->AsIdentifier()->Variable(), expr_->AsIdentifier(), - nullptr); +{ + return nullptr; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsInterfaceHeritage.h b/es2panda/ir/ts/tsInterfaceHeritage.h index fb2a86d4fb7781f62639357473c8c42d8f405cc7..915dcf8961fe90d8b515f60268faaee55b20053e 100644 --- a/es2panda/ir/ts/tsInterfaceHeritage.h +++ b/es2panda/ir/ts/tsInterfaceHeritage.h @@ -34,21 +34,13 @@ class TSTypeParameterInstantiation; class TSInterfaceHeritage : public Expression { public: - explicit TSInterfaceHeritage(Expression *expr, TSTypeParameterInstantiation *typeParams) - : Expression(AstNodeType::TS_INTERFACE_HERITAGE), expr_(expr), typeParams_(typeParams) - { - } + explicit TSInterfaceHeritage(Expression *expr) : Expression(AstNodeType::TS_INTERFACE_HERITAGE), expr_(expr) {} const Expression *Expr() const { return expr_; } - const TSTypeParameterInstantiation *TypeParams() const - { - return typeParams_; - } - void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; @@ -56,7 +48,6 @@ public: private: Expression *expr_; - TSTypeParameterInstantiation *typeParams_; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsIntersectionType.cpp b/es2panda/ir/ts/tsIntersectionType.cpp index 218a4fab4569405a82a347420e69f05e7f9372b3..707f84f03486ce7a663041723ed3370ef5869619 100644 --- a/es2panda/ir/ts/tsIntersectionType.cpp +++ b/es2panda/ir/ts/tsIntersectionType.cpp @@ -38,4 +38,9 @@ checker::Type *TSIntersectionType::Check([[maybe_unused]] checker::Checker *chec return nullptr; } +checker::Type *TSIntersectionType::GetType([[maybe_unused]] checker::Checker *checker) const +{ + return nullptr; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsIntersectionType.h b/es2panda/ir/ts/tsIntersectionType.h index 9a868f4f4de20b0b6378999f828742088fe4fc57..a31aca5863980957a04a4ef39304886649548d7b 100644 --- a/es2panda/ir/ts/tsIntersectionType.h +++ b/es2panda/ir/ts/tsIntersectionType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_INTERSECTION_TYPE_H #define ES2PANDA_IR_TS_INTERSECTION_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,10 +29,10 @@ class Type; namespace panda::es2panda::ir { -class TSIntersectionType : public Expression { +class TSIntersectionType : public TypeNode { public: explicit TSIntersectionType(ArenaVector &&types) - : Expression(AstNodeType::TS_INTERSECTION_TYPE), types_(std::move(types)) + : TypeNode(AstNodeType::TS_INTERSECTION_TYPE), types_(std::move(types)) { } @@ -45,6 +45,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const override; private: ArenaVector types_; diff --git a/es2panda/ir/ts/tsLiteralType.cpp b/es2panda/ir/ts/tsLiteralType.cpp index 14d0793a3dc55617ba40f6913ac2adbee9c18032..00ebe63bbc7736df3f87796e5f75c6a093263fca 100644 --- a/es2panda/ir/ts/tsLiteralType.cpp +++ b/es2panda/ir/ts/tsLiteralType.cpp @@ -15,6 +15,7 @@ #include "tsLiteralType.h" +#include #include namespace panda::es2panda::ir { @@ -31,9 +32,23 @@ void TSLiteralType::Dump(ir::AstDumper *dumper) const void TSLiteralType::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSLiteralType::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSLiteralType::Check(checker::Checker *checker) const { + GetType(checker); return nullptr; } +checker::Type *TSLiteralType::GetType(checker::Checker *checker) const +{ + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return found->second; + } + + checker::Type *type = literal_->Check(checker); + checker->NodeCache().insert({this, type}); + return type; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsLiteralType.h b/es2panda/ir/ts/tsLiteralType.h index 49b89032b36c18824948f559e5ff327fcc1aaa8a..3799d9f64f490c0db8f97c12ce7bf2e2eff5b8ba 100644 --- a/es2panda/ir/ts/tsLiteralType.h +++ b/es2panda/ir/ts/tsLiteralType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_LITERAL_TYPE_H #define ES2PANDA_IR_TS_LITERAL_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,9 +29,9 @@ class Type; namespace panda::es2panda::ir { -class TSLiteralType : public Expression { +class TSLiteralType : public TypeNode { public: - explicit TSLiteralType(Expression *literal) : Expression(AstNodeType::TS_LITERAL_TYPE), literal_(literal) {} + explicit TSLiteralType(Expression *literal) : TypeNode(AstNodeType::TS_LITERAL_TYPE), literal_(literal) {} const Expression *Literal() const { @@ -41,7 +41,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: Expression *literal_; diff --git a/es2panda/ir/ts/tsMappedType.cpp b/es2panda/ir/ts/tsMappedType.cpp index 7be2950b1057f39ea839231201912c59ab1367bf..4d2a57b13596623d43889122573146b071635147 100644 --- a/es2panda/ir/ts/tsMappedType.cpp +++ b/es2panda/ir/ts/tsMappedType.cpp @@ -49,4 +49,9 @@ checker::Type *TSMappedType::Check([[maybe_unused]] checker::Checker *checker) c return nullptr; } +checker::Type *TSMappedType::GetType([[maybe_unused]] checker::Checker *checker) const +{ + return nullptr; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsMappedType.h b/es2panda/ir/ts/tsMappedType.h index 6fe44032e2b9e37b5ad81b53d52d407289e2e475..6e24cb4d3c2bf12b7d82719b15567001cfcc9814 100644 --- a/es2panda/ir/ts/tsMappedType.h +++ b/es2panda/ir/ts/tsMappedType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_MAPPED_TYPE_H #define ES2PANDA_IR_TS_MAPPED_TYPE_H -#include +#include #include namespace panda::es2panda::compiler { @@ -30,11 +30,11 @@ class Type; namespace panda::es2panda::ir { -class TSMappedType : public Expression { +class TSMappedType : public TypeNode { public: explicit TSMappedType(TSTypeParameter *typeParameter, Expression *typeAnnotation, MappedOption readonly, MappedOption optional) - : Expression(AstNodeType::TS_MAPPED_TYPE), + : TypeNode(AstNodeType::TS_MAPPED_TYPE), typeParameter_(typeParameter), typeAnnotation_(typeAnnotation), readonly_(readonly), @@ -66,6 +66,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const override; private: TSTypeParameter *typeParameter_; diff --git a/es2panda/ir/ts/tsMethodSignature.cpp b/es2panda/ir/ts/tsMethodSignature.cpp index ee83c851de19b6fc0bcfa5d32f7e62dfaef15960..95f0680868a33265b8394e643c934b009e5c814e 100644 --- a/es2panda/ir/ts/tsMethodSignature.cpp +++ b/es2panda/ir/ts/tsMethodSignature.cpp @@ -15,10 +15,13 @@ #include "tsMethodSignature.h" +#include #include #include +#include #include #include +#include namespace panda::es2panda::ir { @@ -52,8 +55,28 @@ void TSMethodSignature::Dump(ir::AstDumper *dumper) const void TSMethodSignature::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSMethodSignature::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSMethodSignature::Check(checker::Checker *checker) const { + if (computed_) { + checker->CheckComputedPropertyName(key_); + } + + checker::ScopeContext scopeCtx(checker, scope_); + + auto *signatureInfo = checker->Allocator()->New(checker->Allocator()); + checker->CheckFunctionParameterDeclarations(params_, signatureInfo); + + auto *callSignature = checker->Allocator()->New(signatureInfo, checker->GlobalAnyType()); + Variable()->SetTsType(checker->CreateFunctionTypeWithSignature(callSignature)); + + if (!returnTypeAnnotation_) { + checker->ThrowTypeError( + "Method signature, which lacks return-type annotation, implicitly has an 'any' return type.", Start()); + } + + returnTypeAnnotation_->Check(checker); + callSignature->SetReturnType(returnTypeAnnotation_->AsTypeNode()->GetType(checker)); + return nullptr; } diff --git a/es2panda/ir/ts/tsMethodSignature.h b/es2panda/ir/ts/tsMethodSignature.h index 6f13eb00b2187c3ea7ab8311df4ec7a52dab5738..79f671cc8204cf77d81d6e4611db6e284550a5cd 100644 --- a/es2panda/ir/ts/tsMethodSignature.h +++ b/es2panda/ir/ts/tsMethodSignature.h @@ -61,6 +61,11 @@ public: return key_; } + Expression *Key() + { + return key_; + } + const TSTypeParameterDeclaration *TypeParams() const { return typeParams_; @@ -89,7 +94,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: binder::Scope *scope_; diff --git a/es2panda/ir/ts/tsNamedTupleMember.cpp b/es2panda/ir/ts/tsNamedTupleMember.cpp index 712e44530b6f2f58a74b40d7f9cb72d06fb940c1..1d70a26cac5d7d128315ecf3a3171575fc3f4e32 100644 --- a/es2panda/ir/ts/tsNamedTupleMember.cpp +++ b/es2panda/ir/ts/tsNamedTupleMember.cpp @@ -35,8 +35,9 @@ void TSNamedTupleMember::Dump(ir::AstDumper *dumper) const void TSNamedTupleMember::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSNamedTupleMember::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSNamedTupleMember::Check(checker::Checker *checker) const { + elementType_->Check(checker); return nullptr; } diff --git a/es2panda/ir/ts/tsNamedTupleMember.h b/es2panda/ir/ts/tsNamedTupleMember.h index 8881cd48527709d56e4862e79bd2919f17d5b736..b4c57030313bfc612bb8a6d1f34f6aff0059b878 100644 --- a/es2panda/ir/ts/tsNamedTupleMember.h +++ b/es2panda/ir/ts/tsNamedTupleMember.h @@ -57,7 +57,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *label_; diff --git a/es2panda/ir/ts/tsNeverKeyword.cpp b/es2panda/ir/ts/tsNeverKeyword.cpp index c81caf32e3f217f30439f11a5d611608e871b597..4964a4a9e09ad5e1f16988d941f87410071caf48 100644 --- a/es2panda/ir/ts/tsNeverKeyword.cpp +++ b/es2panda/ir/ts/tsNeverKeyword.cpp @@ -15,6 +15,7 @@ #include "tsNeverKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSNeverKeyword::Check([[maybe_unused]] checker::Checker *checker) return nullptr; } +checker::Type *TSNeverKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalNeverType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsNeverKeyword.h b/es2panda/ir/ts/tsNeverKeyword.h index e5bbd21a861e27d1aebb048ceecbc0cff07e300c..8333126ade4b42f53026da1f1bbbab24e505b5fc 100644 --- a/es2panda/ir/ts/tsNeverKeyword.h +++ b/es2panda/ir/ts/tsNeverKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_NEVER_KEYWORD_H #define ES2PANDA_IR_TS_NEVER_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSNeverKeyword : public Expression { +class TSNeverKeyword : public TypeNode { public: - explicit TSNeverKeyword() : Expression(AstNodeType::TS_NEVER_KEYWORD) {} + explicit TSNeverKeyword() : TypeNode(AstNodeType::TS_NEVER_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsNonNullExpression.cpp b/es2panda/ir/ts/tsNonNullExpression.cpp index 23fad238df8b09268e3497f8e6265425ca2161b0..939c80a25039a013404cd751a56fe5602fccb634 100644 --- a/es2panda/ir/ts/tsNonNullExpression.cpp +++ b/es2panda/ir/ts/tsNonNullExpression.cpp @@ -19,7 +19,7 @@ namespace panda::es2panda::ir { -void TSNonNullExpression::Iterate([[maybe_unused]] const NodeTraverser &cb) const +void TSNonNullExpression::Iterate(const NodeTraverser &cb) const { cb(expr_); } diff --git a/es2panda/ir/ts/tsNullKeyword.cpp b/es2panda/ir/ts/tsNullKeyword.cpp index b5300a279dbf58bfc40966a7b8b97c3332acfdd5..0077cfc10d5d94b98f960ef2c4639daf6d6d4d8d 100644 --- a/es2panda/ir/ts/tsNullKeyword.cpp +++ b/es2panda/ir/ts/tsNullKeyword.cpp @@ -15,6 +15,7 @@ #include "tsNullKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSNullKeyword::Check([[maybe_unused]] checker::Checker *checker) return nullptr; } +checker::Type *TSNullKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalNullType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsNullKeyword.h b/es2panda/ir/ts/tsNullKeyword.h index 065c13a4998c4b4944ebc92bb5dd88e8fd337150..b9bff0b967c919d8e70456523c726a399e342088 100644 --- a/es2panda/ir/ts/tsNullKeyword.h +++ b/es2panda/ir/ts/tsNullKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_NULL_KEYWORD_H #define ES2PANDA_IR_TS_NULL_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSNullKeyword : public Expression { +class TSNullKeyword : public TypeNode { public: - explicit TSNullKeyword() : Expression(AstNodeType::TS_NULL_KEYWORD) {} + explicit TSNullKeyword() : TypeNode(AstNodeType::TS_NULL_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsNumberKeyword.cpp b/es2panda/ir/ts/tsNumberKeyword.cpp index f9b1f79f13d12a7ff7cdc8b1285e305492f16750..18d86cd934c85a3f5fe941e4069fefed59a56192 100644 --- a/es2panda/ir/ts/tsNumberKeyword.cpp +++ b/es2panda/ir/ts/tsNumberKeyword.cpp @@ -15,6 +15,7 @@ #include "tsNumberKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSNumberKeyword::Check([[maybe_unused]] checker::Checker *checker return nullptr; } +checker::Type *TSNumberKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalNumberType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsNumberKeyword.h b/es2panda/ir/ts/tsNumberKeyword.h index 48e7687c1300d665af79d207af77209068460e27..115936dfd957818b6ba055a349c0a55e2a5a9838 100644 --- a/es2panda/ir/ts/tsNumberKeyword.h +++ b/es2panda/ir/ts/tsNumberKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_NUMBER_KEYWORD_H #define ES2PANDA_IR_TS_NUMBER_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSNumberKeyword : public Expression { +class TSNumberKeyword : public TypeNode { public: - explicit TSNumberKeyword() : Expression(AstNodeType::TS_NUMBER_KEYWORD) {} + explicit TSNumberKeyword() : TypeNode(AstNodeType::TS_NUMBER_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsObjectKeyword.cpp b/es2panda/ir/ts/tsObjectKeyword.cpp index 8e7836f1ef9a57efd71a8b592fc56b8e41f39d39..bbe29c3583668e0a85dceb407ae70c12e6bdfe30 100644 --- a/es2panda/ir/ts/tsObjectKeyword.cpp +++ b/es2panda/ir/ts/tsObjectKeyword.cpp @@ -15,6 +15,7 @@ #include "tsObjectKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSObjectKeyword::Check([[maybe_unused]] checker::Checker *checker return nullptr; } +checker::Type *TSObjectKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalNonPrimitiveType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsObjectKeyword.h b/es2panda/ir/ts/tsObjectKeyword.h index 66c4499eee2fef3509e68586b069a2813d48f92a..6e4fa48fdf000d631bbfe79a3dfd9b4ced274484 100644 --- a/es2panda/ir/ts/tsObjectKeyword.h +++ b/es2panda/ir/ts/tsObjectKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_OBJECT_KEYWORD_H #define ES2PANDA_IR_TS_OBJECT_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSObjectKeyword : public Expression { +class TSObjectKeyword : public TypeNode { public: - explicit TSObjectKeyword() : Expression(AstNodeType::TS_OBJECT_KEYWORD) {} + explicit TSObjectKeyword() : TypeNode(AstNodeType::TS_OBJECT_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsParenthesizedType.cpp b/es2panda/ir/ts/tsParenthesizedType.cpp index 577d4ea4da72e327714b879ff61a9b23cd94d05a..b6dc972a033119bd31961f6e3ddd46b46892014a 100644 --- a/es2panda/ir/ts/tsParenthesizedType.cpp +++ b/es2panda/ir/ts/tsParenthesizedType.cpp @@ -15,6 +15,7 @@ #include "tsParenthesizedType.h" +#include #include namespace panda::es2panda::ir { @@ -31,9 +32,23 @@ void TSParenthesizedType::Dump(ir::AstDumper *dumper) const void TSParenthesizedType::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSParenthesizedType::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSParenthesizedType::Check(checker::Checker *checker) const { + type_->Check(checker); return nullptr; } +checker::Type *TSParenthesizedType::GetType(checker::Checker *checker) const +{ + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return found->second; + } + + checker::Type *type = type_->AsTypeNode()->GetType(checker); + checker->NodeCache().insert({this, type}); + return type; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsParenthesizedType.h b/es2panda/ir/ts/tsParenthesizedType.h index 1fd0031d9851c8262b58fcff363ecc56809e8517..f40552fdf15ccd53940f066535b1dd32ea6d591c 100644 --- a/es2panda/ir/ts/tsParenthesizedType.h +++ b/es2panda/ir/ts/tsParenthesizedType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_PARENT_TYPE_H #define ES2PANDA_IR_TS_PARENT_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,9 +29,9 @@ class Type; namespace panda::es2panda::ir { -class TSParenthesizedType : public Expression { +class TSParenthesizedType : public TypeNode { public: - explicit TSParenthesizedType(Expression *type) : Expression(AstNodeType::TS_PARENT_TYPE), type_(type) {} + explicit TSParenthesizedType(Expression *type) : TypeNode(AstNodeType::TS_PARENT_TYPE), type_(type) {} const Expression *Type() const { @@ -41,7 +41,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: Expression *type_; diff --git a/es2panda/ir/ts/tsPropertySignature.cpp b/es2panda/ir/ts/tsPropertySignature.cpp index 1e91a37a8785ba74c584677e0a95f6984fb42ccd..1905714fbccc1c11b70148a6ef6d42f7a30de7e8 100644 --- a/es2panda/ir/ts/tsPropertySignature.cpp +++ b/es2panda/ir/ts/tsPropertySignature.cpp @@ -15,7 +15,11 @@ #include "tsPropertySignature.h" +#include +#include #include +#include +#include namespace panda::es2panda::ir { @@ -40,8 +44,22 @@ void TSPropertySignature::Dump(ir::AstDumper *dumper) const void TSPropertySignature::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSPropertySignature::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSPropertySignature::Check(checker::Checker *checker) const { + if (typeAnnotation_) { + typeAnnotation_->Check(checker); + } + + if (computed_) { + checker->CheckComputedPropertyName(key_); + } + + if (typeAnnotation_) { + Variable()->SetTsType(typeAnnotation_->AsTypeNode()->GetType(checker)); + return nullptr; + } + + checker->ThrowTypeError("Property implicitly has an 'any' type.", Start()); return nullptr; } diff --git a/es2panda/ir/ts/tsPropertySignature.h b/es2panda/ir/ts/tsPropertySignature.h index 9b9b9a068c69b53d7aeb69d596704acefd0d89b6..7adc8b2b1ad8b5dc104e83c982d65d3768a09a68 100644 --- a/es2panda/ir/ts/tsPropertySignature.h +++ b/es2panda/ir/ts/tsPropertySignature.h @@ -47,6 +47,11 @@ public: return key_; } + Expression *Key() + { + return key_; + } + const Expression *TypeAnnotation() const { return typeAnnotation_; @@ -70,7 +75,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *key_; diff --git a/es2panda/ir/ts/tsQualifiedName.cpp b/es2panda/ir/ts/tsQualifiedName.cpp index c6208a27971a16beadee045a9241def8b63f5068..c6088362bddc995d3a4e35842644be88685b40be 100644 --- a/es2panda/ir/ts/tsQualifiedName.cpp +++ b/es2panda/ir/ts/tsQualifiedName.cpp @@ -34,35 +34,25 @@ void TSQualifiedName::Dump(ir::AstDumper *dumper) const void TSQualifiedName::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSQualifiedName::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSQualifiedName::Check(checker::Checker *checker) const { - checker::Type *baseType = left_->Check(checker); + checker::Type *baseType = checker->CheckNonNullType(left_->Check(checker), left_->Start()); + binder::Variable *prop = checker->GetPropertyOfType(baseType, right_->Name()); - if (!parent_->IsTSQualifiedName()) { - if (!checker->TypeStack().insert(right_).second) { - checker->ThrowTypeError({"'", checker->ToPropertyName(right_, checker::TypeFlag::COMPUTED_NAME), - "' is referenced directly or indirectly in its own type annotation."}, - right_->Start()); - } + if (prop) { + return checker->GetTypeOfVariable(prop); } - checker::Type *propType = checker->ResolveBaseProp(baseType, right_, false, Start()); - - checker->TypeStack().erase(right_); + if (baseType->IsObjectType()) { + checker::ObjectType *objType = baseType->AsObjectType(); - if (!parent_->IsTSIndexedAccessType() || !parent_->IsTSQualifiedName()) { - const ir::TSQualifiedName *leftMost = checker::Checker::ResolveLeftMostQualifiedName(this); - - const util::StringView &objName = leftMost->Left()->AsIdentifier()->Name(); - const util::StringView &propName = leftMost->Right()->Name(); - checker->ThrowTypeError( - {"Cannot access '", objName, ".", propName, "' because '", objName, - "' is a type, but not a namespace. Did you mean to retrieve the type of the property '", propName, - "' in '", objName, "' with '", objName, "[\"", propName, "\"]'?"}, - Start()); + if (objType->StringIndexInfo()) { + return objType->StringIndexInfo()->GetType(); + } } - return propType; + checker->ThrowTypeError({"Property ", right_->Name(), " does not exist on this type."}, right_->Start()); + return nullptr; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsQualifiedName.h b/es2panda/ir/ts/tsQualifiedName.h index 2eb2029508ced799e20bdeab3efca52dc3e4cf5b..94c381a0dbeff0e720aaa72e386e74a7d9d5306d 100644 --- a/es2panda/ir/ts/tsQualifiedName.h +++ b/es2panda/ir/ts/tsQualifiedName.h @@ -46,10 +46,15 @@ public: return right_; } + Identifier *Right() + { + return right_; + } + void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: Expression *left_; diff --git a/es2panda/ir/ts/tsSignatureDeclaration.cpp b/es2panda/ir/ts/tsSignatureDeclaration.cpp index 1269e945c29a29870dfad48ad51ee8e9f99c4815..137bd4aa215b3c0cfc9264d4f36ad30957de0ab6 100644 --- a/es2panda/ir/ts/tsSignatureDeclaration.cpp +++ b/es2panda/ir/ts/tsSignatureDeclaration.cpp @@ -15,8 +15,10 @@ #include "tsSignatureDeclaration.h" +#include #include #include +#include #include #include @@ -49,9 +51,47 @@ void TSSignatureDeclaration::Dump(ir::AstDumper *dumper) const void TSSignatureDeclaration::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSSignatureDeclaration::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSSignatureDeclaration::Check(checker::Checker *checker) const { - return nullptr; + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return found->second; + } + + checker::ScopeContext scopeCtx(checker, scope_); + + auto *signatureInfo = checker->Allocator()->New(checker->Allocator()); + checker->CheckFunctionParameterDeclarations(params_, signatureInfo); + + bool isCallSignature = (Kind() == ir::TSSignatureDeclaration::TSSignatureDeclarationKind::CALL_SIGNATURE); + + if (!returnTypeAnnotation_) { + if (isCallSignature) { + checker->ThrowTypeError( + "Call signature, which lacks return-type annotation, implicitly has an 'any' return type.", Start()); + } + + checker->ThrowTypeError( + "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.", Start()); + } + + returnTypeAnnotation_->Check(checker); + checker::Type *returnType = returnTypeAnnotation_->AsTypeNode()->GetType(checker); + + auto *signature = checker->Allocator()->New(signatureInfo, returnType); + + checker::Type *placeholderObj = nullptr; + + if (isCallSignature) { + placeholderObj = checker->CreateObjectTypeWithCallSignature(signature); + } else { + placeholderObj = checker->CreateObjectTypeWithConstructSignature(signature); + } + + checker->NodeCache().insert({this, placeholderObj}); + + return placeholderObj; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsSignatureDeclaration.h b/es2panda/ir/ts/tsSignatureDeclaration.h index 15ba36862ee623f6471b14490308d8a7465cc151..c23f0aa31193dad828492631e59870b5b39c2710 100644 --- a/es2panda/ir/ts/tsSignatureDeclaration.h +++ b/es2panda/ir/ts/tsSignatureDeclaration.h @@ -78,7 +78,7 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; private: binder::Scope *scope_; diff --git a/es2panda/ir/ts/tsStringKeyword.cpp b/es2panda/ir/ts/tsStringKeyword.cpp index f321d774ad16f3fefb38d71b52031d56e248bc7e..e58baba28440101c53213c6d227942334d39ad1e 100644 --- a/es2panda/ir/ts/tsStringKeyword.cpp +++ b/es2panda/ir/ts/tsStringKeyword.cpp @@ -15,6 +15,7 @@ #include "tsStringKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSStringKeyword::Check([[maybe_unused]] checker::Checker *checker return nullptr; } +checker::Type *TSStringKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalStringType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsStringKeyword.h b/es2panda/ir/ts/tsStringKeyword.h index a58f0b2e8c3c0c97598f217077b7773198390cd1..8b626571a6ecc38ef61b6955208fec3fd4cc2272 100644 --- a/es2panda/ir/ts/tsStringKeyword.h +++ b/es2panda/ir/ts/tsStringKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_STRING_KEYWORD_H #define ES2PANDA_IR_TS_STRING_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSStringKeyword : public Expression { +class TSStringKeyword : public TypeNode { public: - explicit TSStringKeyword() : Expression(AstNodeType::TS_STRING_KEYWORD) {} + explicit TSStringKeyword() : TypeNode(AstNodeType::TS_STRING_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsThisType.cpp b/es2panda/ir/ts/tsThisType.cpp index c4dbeaa57b40a88ec0e13de8cc5e5d260f846fc8..23573f4c4644775f928f881c58df882582a9d2bd 100644 --- a/es2panda/ir/ts/tsThisType.cpp +++ b/es2panda/ir/ts/tsThisType.cpp @@ -33,4 +33,9 @@ checker::Type *TSThisType::Check([[maybe_unused]] checker::Checker *checker) con return nullptr; } +checker::Type *TSThisType::GetType([[maybe_unused]] checker::Checker *checker) const +{ + return nullptr; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsThisType.h b/es2panda/ir/ts/tsThisType.h index afda3d99e8b54dcbe415d6a82afe41dd16f10878..826d37e38f9e9543cffe6bccced19ae68e50690e 100644 --- a/es2panda/ir/ts/tsThisType.h +++ b/es2panda/ir/ts/tsThisType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_THIS_TYPE_H #define ES2PANDA_IR_TS_THIS_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSThisType : public Expression { +class TSThisType : public TypeNode { public: - explicit TSThisType() : Expression(AstNodeType::TS_THIS_TYPE) {} + explicit TSThisType() : TypeNode(AstNodeType::TS_THIS_TYPE) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsTupleType.cpp b/es2panda/ir/ts/tsTupleType.cpp index fb835d731eb08f9b4f39cb4fdd3ed9c2680d6ea1..530305e70e923c0bf465c0386e22f793d7e40e14 100644 --- a/es2panda/ir/ts/tsTupleType.cpp +++ b/es2panda/ir/ts/tsTupleType.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -39,15 +40,21 @@ void TSTupleType::Dump(ir::AstDumper *dumper) const void TSTupleType::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSTupleType::Check(checker::Checker *checker) const +checker::Type *TSTupleType::GetType(checker::Checker *checker) const { - checker::ObjectDescriptor *desc = checker->Allocator()->New(); + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return found->second; + } + + checker::ObjectDescriptor *desc = checker->Allocator()->New(checker->Allocator()); checker::NamedTupleMemberPool namedMembers; - checker::TupleElementFlagPool elementFlags; + ArenaVector elementFlags(checker->Allocator()->Adapter()); checker::ElementFlags combinedFlags = checker::ElementFlags::NO_OPTS; uint32_t minLength = 0; uint32_t index = 0; - std::vector numberIndexTypes; + ArenaVector numberIndexTypes(checker->Allocator()->Adapter()); for (auto *it : elementTypes_) { util::StringView memberIndex = util::Helpers::ToStringView(checker->Allocator(), index); @@ -57,7 +64,7 @@ checker::Type *TSTupleType::Check(checker::Checker *checker) const checker::ElementFlags memberFlag = checker::ElementFlags::NO_OPTS; if (it->IsTSNamedTupleMember()) { const ir::TSNamedTupleMember *namedMember = it->AsTSNamedTupleMember(); - checker::Type *memberType = namedMember->ElementType()->Check(checker); + checker::Type *memberType = namedMember->ElementType()->AsTypeNode()->GetType(checker); if (namedMember->IsOptional()) { memberVar->AddFlag(binder::VariableFlags::OPTIONAL); @@ -72,7 +79,7 @@ checker::Type *TSTupleType::Check(checker::Checker *checker) const numberIndexTypes.push_back(memberType); namedMembers.insert({memberVar, namedMember->Label()->AsIdentifier()->Name()}); } else { - checker::Type *memberType = it->Check(checker); + checker::Type *memberType = it->AsTypeNode()->GetType(checker); memberType->SetVariable(memberVar); memberVar->SetTsType(memberType); memberFlag = checker::ElementFlags::REQUIRED; @@ -82,7 +89,7 @@ checker::Type *TSTupleType::Check(checker::Checker *checker) const combinedFlags |= memberFlag; - elementFlags.insert({memberIndex, memberFlag}); + elementFlags.push_back(memberFlag); desc->properties.push_back(memberVar); index++; } @@ -99,10 +106,23 @@ checker::Type *TSTupleType::Check(checker::Checker *checker) const numberIndexType = checker->CreateUnionType(std::move(numberIndexTypes)); } - desc->numberIndexInfo = checker->Allocator()->New(numberIndexType, "x"); + desc->numberIndexInfo = checker->Allocator()->New(numberIndexType, "x", false); + + checker::Type *tupleType = checker->CreateTupleType(desc, std::move(elementFlags), combinedFlags, minLength, + fixedLength, false, std::move(namedMembers)); + + checker->NodeCache().insert({this, tupleType}); + return tupleType; +} + +checker::Type *TSTupleType::Check(checker::Checker *checker) const +{ + for (const auto *it : elementTypes_) { + it->Check(checker); + } - return checker->CreateTupleType(desc, std::move(elementFlags), combinedFlags, minLength, fixedLength, false, - std::move(namedMembers)); + GetType(checker); + return nullptr; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsTupleType.h b/es2panda/ir/ts/tsTupleType.h index 6e7adec0796b5f5cc08db0b6132903604547f42b..e3590c8812b234540710e8204595bc94f5c64da7 100644 --- a/es2panda/ir/ts/tsTupleType.h +++ b/es2panda/ir/ts/tsTupleType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_TUPLE_TYPE_H #define ES2PANDA_IR_TS_TUPLE_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -31,10 +31,10 @@ namespace panda::es2panda::ir { enum class TSTupleKind { NONE, NAMED, DEFAULT }; -class TSTupleType : public Expression { +class TSTupleType : public TypeNode { public: explicit TSTupleType(ArenaVector &&elementTypes) - : Expression(AstNodeType::TS_TUPLE_TYPE), elementTypes_(std::move(elementTypes)) + : TypeNode(AstNodeType::TS_TUPLE_TYPE), elementTypes_(std::move(elementTypes)) { } @@ -46,7 +46,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: ArenaVector elementTypes_; diff --git a/es2panda/ir/ts/tsTypeAliasDeclaration.cpp b/es2panda/ir/ts/tsTypeAliasDeclaration.cpp index 48b95901e2fb7a8f631f70342f7bfa84ae6f8d5b..d3061ac3d44921abe3d19aea702fc07e7b61fe54 100644 --- a/es2panda/ir/ts/tsTypeAliasDeclaration.cpp +++ b/es2panda/ir/ts/tsTypeAliasDeclaration.cpp @@ -46,37 +46,9 @@ void TSTypeAliasDeclaration::Dump(ir::AstDumper *dumper) const void TSTypeAliasDeclaration::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSTypeAliasDeclaration::CheckTypeAnnotation(checker::Checker *checker, - binder::Variable *bindingVar) const +checker::Type *TSTypeAliasDeclaration::Check(checker::Checker *checker) const { - checker::Type *aliasType = typeAnnotation_->Check(checker); - aliasType->SetVariable(bindingVar); - bindingVar->SetTsType(aliasType); - - return bindingVar->TsType(); -} - -checker::Type *TSTypeAliasDeclaration::InferType(checker::Checker *checker, binder::Variable *bindingVar) const -{ - if (typeParams_) { - checker::ScopeContext scopeCtx(checker, typeParams_->Scope()); - checker->CheckTypeParameters(typeParams_); - return CheckTypeAnnotation(checker, bindingVar); - } - - return CheckTypeAnnotation(checker, bindingVar); -} - -checker::Type *TSTypeAliasDeclaration::Check([[maybe_unused]] checker::Checker *checker) const -{ - const util::StringView &aliasName = id_->Name(); - binder::ScopeFindResult result = checker->Scope()->Find(aliasName); - ASSERT(result.variable); - - if (!result.variable->TsType()) { - InferType(checker, result.variable); - } - + typeAnnotation_->Check(checker); return nullptr; } diff --git a/es2panda/ir/ts/tsTypeAliasDeclaration.h b/es2panda/ir/ts/tsTypeAliasDeclaration.h index 6d28ef0ed23d39662373e12f448719f0c719019c..ce247e3204bf4c2efd3cc5885074220637d5a567 100644 --- a/es2panda/ir/ts/tsTypeAliasDeclaration.h +++ b/es2panda/ir/ts/tsTypeAliasDeclaration.h @@ -38,8 +38,8 @@ class TSTypeParameterDeclaration; class TSTypeAliasDeclaration : public Statement { public: - explicit TSTypeAliasDeclaration(Identifier *id, TSTypeParameterDeclaration *typeParams, - Expression *typeAnnotation, bool declare) + explicit TSTypeAliasDeclaration(Identifier *id, TSTypeParameterDeclaration *typeParams, Expression *typeAnnotation, + bool declare) : Statement(AstNodeType::TS_TYPE_ALIAS_DECLARATION), id_(id), typeParams_(typeParams), @@ -71,12 +71,9 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; - checker::Type *InferType(checker::Checker *checker, binder::Variable *bindingVar) const; + checker::Type *Check(checker::Checker *checker) const override; private: - checker::Type *CheckTypeAnnotation(checker::Checker *checker, binder::Variable *bindingVar) const; - Identifier *id_; TSTypeParameterDeclaration *typeParams_; Expression *typeAnnotation_; diff --git a/es2panda/ir/ts/tsTypeLiteral.cpp b/es2panda/ir/ts/tsTypeLiteral.cpp index fe4dd561f9b8251b6ac9040397c74b85607a47fd..f5f5825e32d7d2ef778db28bea4d1c1aef7a5545 100644 --- a/es2panda/ir/ts/tsTypeLiteral.cpp +++ b/es2panda/ir/ts/tsTypeLiteral.cpp @@ -16,7 +16,8 @@ #include "tsTypeLiteral.h" #include - +#include +#include #include #include #include @@ -40,45 +41,30 @@ void TSTypeLiteral::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} checker::Type *TSTypeLiteral::Check(checker::Checker *checker) const { - // TODO(aszilagyi): came from param - binder::Variable *bindingVar = nullptr; - - checker::ObjectDescriptor *desc = checker->Allocator()->New(); - checker::Type *returnType = checker->Allocator()->New(desc); - - checker::Type *savedType = nullptr; + for (auto *it : members_) { + it->Check(checker); + } - if (bindingVar) { - if (bindingVar->TsType()) { - savedType = bindingVar->TsType(); - } + checker::Type *type = GetType(checker); + checker->CheckIndexConstraints(type); - bindingVar->SetTsType(returnType); - } + return nullptr; +} - for (auto *it : members_) { - if (it->IsTSPropertySignature() || it->IsTSMethodSignature()) { - checker->PrefetchTypeLiteralProperties(it, desc); - } - } +checker::Type *TSTypeLiteral::GetType(checker::Checker *checker) const +{ + auto found = checker->NodeCache().find(this); - for (auto *it : members_) { - checker->CheckTsTypeLiteralOrInterfaceMember(it, desc); + if (found != checker->NodeCache().end()) { + return found->second; } - if (bindingVar) { - if (savedType) { - checker->IsTypeIdenticalTo(savedType, bindingVar->TsType(), - {"Subsequent variable declaration must have the same type. Variable '", - bindingVar->Name(), "' must be of type '", savedType, "', but here has type '", - bindingVar->TsType(), "'."}, - bindingVar->Declaration()->Node()->Start()); - } - } + checker::ObjectDescriptor *desc = checker->Allocator()->New(checker->Allocator()); + checker::Type *type = checker->Allocator()->New(desc); + type->SetVariable(Variable()); - checker->CheckIndexConstraints(returnType); + checker->NodeCache().insert({this, type}); - return returnType; + return type; } - } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsTypeLiteral.h b/es2panda/ir/ts/tsTypeLiteral.h index 006024f7f13e1dca34175f4b8a12ca983802f7a0..99066fd69960c9013ed03a9a8cc5470822bd938b 100644 --- a/es2panda/ir/ts/tsTypeLiteral.h +++ b/es2panda/ir/ts/tsTypeLiteral.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_TYPE_LITERAL_H #define ES2PANDA_IR_TS_TYPE_LITERAL_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,10 +29,10 @@ class Type; namespace panda::es2panda::ir { -class TSTypeLiteral : public Expression { +class TSTypeLiteral : public TypeNode { public: explicit TSTypeLiteral(ArenaVector &&members) - : Expression(AstNodeType::TS_TYPE_LITERAL), members_(std::move(members)) + : TypeNode(AstNodeType::TS_TYPE_LITERAL), members_(std::move(members)) { } @@ -44,7 +44,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: ArenaVector members_; diff --git a/es2panda/ir/ts/tsTypeOperator.cpp b/es2panda/ir/ts/tsTypeOperator.cpp index bd17dba1a2ec89064d61449d2c276a26aa3fe702..2d910a47e1b4a15b3e5c8d38e0aba965de543dcf 100644 --- a/es2panda/ir/ts/tsTypeOperator.cpp +++ b/es2panda/ir/ts/tsTypeOperator.cpp @@ -40,4 +40,9 @@ checker::Type *TSTypeOperator::Check([[maybe_unused]] checker::Checker *checker) return nullptr; } +checker::Type *TSTypeOperator::GetType([[maybe_unused]] checker::Checker *checker) const +{ + return nullptr; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsTypeOperator.h b/es2panda/ir/ts/tsTypeOperator.h index 8cbefb6332ea528f4f376304a4bf7a59990a76d6..3f1815e9df9241b794a2a4acd600e0de8f2048e0 100644 --- a/es2panda/ir/ts/tsTypeOperator.h +++ b/es2panda/ir/ts/tsTypeOperator.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_TYPE_OPERATOR_H #define ES2PANDA_IR_TS_TYPE_OPERATOR_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,10 +29,10 @@ class Type; namespace panda::es2panda::ir { -class TSTypeOperator : public Expression { +class TSTypeOperator : public TypeNode { public: explicit TSTypeOperator(Expression *type, TSOperatorType operatorType) - : Expression(AstNodeType::TS_TYPE_OPERATOR), type_(type), operatorType_(operatorType) + : TypeNode(AstNodeType::TS_TYPE_OPERATOR), type_(type), operatorType_(operatorType) { } @@ -60,6 +60,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const override; private: Expression *type_; diff --git a/es2panda/ir/ts/tsTypePredicate.cpp b/es2panda/ir/ts/tsTypePredicate.cpp index d5cd205ec9a88490fd97b3724d58e0e1a38a376d..52d00c0875b3971c71b5723c8c46bd5efd19f27c 100644 --- a/es2panda/ir/ts/tsTypePredicate.cpp +++ b/es2panda/ir/ts/tsTypePredicate.cpp @@ -43,4 +43,9 @@ checker::Type *TSTypePredicate::Check([[maybe_unused]] checker::Checker *checker return nullptr; } +checker::Type *TSTypePredicate::GetType([[maybe_unused]] checker::Checker *checker) const +{ + return nullptr; +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsTypePredicate.h b/es2panda/ir/ts/tsTypePredicate.h index 3ebc93222003b7e6d45a6c7827b34e5c3d50daf2..1c59db4bb77f86e48737435e4185c6d3245f76e2 100644 --- a/es2panda/ir/ts/tsTypePredicate.h +++ b/es2panda/ir/ts/tsTypePredicate.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_TYPE_PREDICATE_H #define ES2PANDA_IR_TS_TYPE_PREDICATE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,10 +29,10 @@ class Type; namespace panda::es2panda::ir { -class TSTypePredicate : public Expression { +class TSTypePredicate : public TypeNode { public: explicit TSTypePredicate(Expression *parameterName, Expression *typeAnnotation, bool asserts) - : Expression(AstNodeType::TS_TYPE_PREDICATE), + : TypeNode(AstNodeType::TS_TYPE_PREDICATE), parameterName_(parameterName), typeAnnotation_(typeAnnotation), asserts_(asserts) @@ -58,6 +58,7 @@ public: void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const override; private: Expression *parameterName_; diff --git a/es2panda/ir/ts/tsTypeQuery.cpp b/es2panda/ir/ts/tsTypeQuery.cpp index 917bfedbb2d027b6670b1a1d87762cd8daf51654..0a4c50bb7f2d40794aceec05d17caee84cf51169 100644 --- a/es2panda/ir/ts/tsTypeQuery.cpp +++ b/es2panda/ir/ts/tsTypeQuery.cpp @@ -15,6 +15,7 @@ #include "tsTypeQuery.h" +#include #include namespace panda::es2panda::ir { @@ -31,10 +32,25 @@ void TSTypeQuery::Dump(ir::AstDumper *dumper) const void TSTypeQuery::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSTypeQuery::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSTypeQuery::Check(checker::Checker *checker) const { - ASSERT(exprName_->IsIdentifier() || exprName_->IsTSQualifiedName()); - return exprName_->Check(checker); + GetType(checker); + return nullptr; +} + +checker::Type *TSTypeQuery::GetType(checker::Checker *checker) const +{ + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return found->second; + } + + checker::Type *type = exprName_->Check(checker); + + checker->NodeCache().insert({this, type}); + + return type; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsTypeQuery.h b/es2panda/ir/ts/tsTypeQuery.h index 060a2c1bbe7dc66171521fca7ebbe01484a3619b..5d282b8d3ed68e64555007d182f5a6b3713924ac 100644 --- a/es2panda/ir/ts/tsTypeQuery.h +++ b/es2panda/ir/ts/tsTypeQuery.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_TYPE_QUERY_H #define ES2PANDA_IR_TS_TYPE_QUERY_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,9 +29,9 @@ class Type; namespace panda::es2panda::ir { -class TSTypeQuery : public Expression { +class TSTypeQuery : public TypeNode { public: - explicit TSTypeQuery(Expression *exprName) : Expression(AstNodeType::TS_TYPE_QUERY), exprName_(exprName) {} + explicit TSTypeQuery(Expression *exprName) : TypeNode(AstNodeType::TS_TYPE_QUERY), exprName_(exprName) {} const Expression *ExprName() const { @@ -41,7 +41,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: Expression *exprName_; diff --git a/es2panda/ir/ts/tsTypeReference.cpp b/es2panda/ir/ts/tsTypeReference.cpp index 85859524242d492f76b62897d9b5ce529290b812..4dac7c8c79228b5e2d4dce8371f73c7c04c4e0f2 100644 --- a/es2panda/ir/ts/tsTypeReference.cpp +++ b/es2panda/ir/ts/tsTypeReference.cpp @@ -45,72 +45,36 @@ void TSTypeReference::Dump(ir::AstDumper *dumper) const void TSTypeReference::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSTypeReference::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSTypeReference::Check(checker::Checker *checker) const { - if (typeName_->IsIdentifier()) { - return ResolveReference(checker, typeName_->AsIdentifier()->Variable(), typeName_->AsIdentifier(), typeParams_); - } - - ASSERT(typeName_->IsTSQualifiedName()); - return typeName_->Check(checker); + GetType(checker); + return nullptr; } -checker::Type *TSTypeReference::ResolveReference(checker::Checker *checker, binder::Variable *var, - const ir::Identifier *refIdent, - const ir::TSTypeParameterInstantiation *typeParams) +checker::Type *TSTypeReference::GetType(checker::Checker *checker) const { - if (!var) { - checker->ThrowTypeError({"Cannot find name ", refIdent->Name()}, refIdent->Start()); - } + auto found = checker->NodeCache().find(this); - const binder::Decl *decl = var->Declaration(); - - if (decl->IsTypeParameterDecl()) { - ASSERT(var->TsType() && var->TsType()->IsTypeParameter()); - return checker->Allocator()->New(var->TsType()->AsTypeParameter()->DefaultTypeRef()); + if (found != checker->NodeCache().end()) { + return found->second; } - if (!var->TsType()) { - checker::Type *bindingType = nullptr; - - if (var->HasFlag(binder::VariableFlags::TYPE_ALIAS)) { - if (!checker->TypeStack().insert(decl->Node()).second) { - checker->ThrowTypeError({"Type alias '", refIdent->Name(), "' circularly references itself"}, - decl->Node()->Start()); - } - - bindingType = decl->Node()->AsTSTypeAliasDeclaration()->InferType(checker, var); - checker->TypeStack().erase(decl->Node()); - } else if (var->HasFlag(binder::VariableFlags::INTERFACE)) { - bindingType = decl->Node()->AsTSInterfaceDeclaration()->InferType(checker, var); - } else if (var->HasFlag(binder::VariableFlags::ENUM_LITERAL)) { - bindingType = - decl->Node()->AsTSEnumDeclaration()->InferType(checker, decl->Node()->AsTSEnumDeclaration()->IsConst()); - } else { - // TODO(aszilagyi) - bindingType = checker->GlobalAnyType(); - } - - bindingType->SetVariable(var); - var->SetTsType(bindingType); + // TODO(aszilagyi): handle cases where type type_name_ is a QualifiedName + if (typeName_->IsTSQualifiedName()) { + return checker->GlobalAnyType(); } - if (var->HasFlag(binder::VariableFlags::INTERFACE)) { - for (const auto *it : decl->AsInterfaceDecl()->Decls()) { - if (!it->TypeParams()) { - continue; - } + ASSERT(typeName_->IsIdentifier()); + binder::Variable *var = typeName_->AsIdentifier()->Variable(); - return checker->InstantiateGenericInterface(var, decl, typeParams, refIdent->Start()); - } + if (!var) { + checker->ThrowTypeError({"Cannot find name ", typeName_->AsIdentifier()->Name()}, Start()); } - if (var->HasFlag(binder::VariableFlags::TYPE_ALIAS) && decl->Node()->AsTSTypeAliasDeclaration()->TypeParams()) { - return checker->InstantiateGenericTypeAlias(var, decl->Node()->AsTSTypeAliasDeclaration()->TypeParams(), - typeParams, refIdent->Start()); - } + checker::Type *type = checker->GetTypeReferenceType(this, var); - return var->TsType(); + checker->NodeCache().insert({this, type}); + return type; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsTypeReference.h b/es2panda/ir/ts/tsTypeReference.h index 40f024a24c46ea5c1b1337510a30c900ed34f8c9..c7af1d9d2a5b7e02501798cac4105cc49363e6ac 100644 --- a/es2panda/ir/ts/tsTypeReference.h +++ b/es2panda/ir/ts/tsTypeReference.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_TYPE_REFERENCE_H #define ES2PANDA_IR_TS_TYPE_REFERENCE_H -#include +#include namespace panda::es2panda::binder { class ScopeFindResult; @@ -36,10 +36,10 @@ namespace panda::es2panda::ir { class TSTypeParameterInstantiation; -class TSTypeReference : public Expression { +class TSTypeReference : public TypeNode { public: explicit TSTypeReference(Expression *typeName, TSTypeParameterInstantiation *typeParams) - : Expression(AstNodeType::TS_TYPE_REFERENCE), typeName_(typeName), typeParams_(typeParams) + : TypeNode(AstNodeType::TS_TYPE_REFERENCE), typeName_(typeName), typeParams_(typeParams) { } @@ -53,14 +53,11 @@ public: return typeName_; } - static checker::Type *ResolveReference(checker::Checker *checker, binder::Variable *var, - const ir::Identifier *refIdent, - const ir::TSTypeParameterInstantiation *typeParams); - void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: Expression *typeName_; diff --git a/es2panda/ir/ts/tsUndefinedKeyword.cpp b/es2panda/ir/ts/tsUndefinedKeyword.cpp index 6a63679fc3406b03830e3fdd4a385d73a657c37b..ca431d73cf7b817832a263b276fe2a861f781f77 100644 --- a/es2panda/ir/ts/tsUndefinedKeyword.cpp +++ b/es2panda/ir/ts/tsUndefinedKeyword.cpp @@ -15,6 +15,7 @@ #include "tsUndefinedKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSUndefinedKeyword::Check([[maybe_unused]] checker::Checker *chec return nullptr; } +checker::Type *TSUndefinedKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalUndefinedType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsUndefinedKeyword.h b/es2panda/ir/ts/tsUndefinedKeyword.h index e787ed0f75ea9e24330a17667f8a414fe340a3df..fd7860f9d153aa7a7df11040e0f694090b024656 100644 --- a/es2panda/ir/ts/tsUndefinedKeyword.h +++ b/es2panda/ir/ts/tsUndefinedKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_UNDEFINED_KEYWORD_H #define ES2PANDA_IR_TS_UNDEFINED_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSUndefinedKeyword : public Expression { +class TSUndefinedKeyword : public TypeNode { public: - explicit TSUndefinedKeyword() : Expression(AstNodeType::TS_UNDEFINED_KEYWORD) {} + explicit TSUndefinedKeyword() : TypeNode(AstNodeType::TS_UNDEFINED_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsUnionType.cpp b/es2panda/ir/ts/tsUnionType.cpp index f58f9d7cb65ec46d59233526e4ff81a192704c25..ecb98b5bbaa963d371d5040cdc204f53ea93391e 100644 --- a/es2panda/ir/ts/tsUnionType.cpp +++ b/es2panda/ir/ts/tsUnionType.cpp @@ -34,15 +34,35 @@ void TSUnionType::Dump(ir::AstDumper *dumper) const void TSUnionType::Compile([[maybe_unused]] compiler::PandaGen *pg) const {} -checker::Type *TSUnionType::Check([[maybe_unused]] checker::Checker *checker) const +checker::Type *TSUnionType::Check(checker::Checker *checker) const { - std::vector types; + for (auto *it : types_) { + it->Check(checker); + } + + GetType(checker); + return nullptr; +} + +checker::Type *TSUnionType::GetType(checker::Checker *checker) const +{ + auto found = checker->NodeCache().find(this); + + if (found != checker->NodeCache().end()) { + return found->second; + } + + ArenaVector types(checker->Allocator()->Adapter()); for (auto *it : types_) { - types.push_back(it->Check(checker)); + types.push_back(it->AsTypeNode()->GetType(checker)); } - return checker->CreateUnionType(std::move(types)); + checker::Type *type = checker->CreateUnionType(std::move(types)); + + checker->NodeCache().insert({this, type}); + + return type; } } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsUnionType.h b/es2panda/ir/ts/tsUnionType.h index e55471e32ac45f08ef0c8977176f742598dd9d53..8146f1c0526daaf7f0e6463ecd1629cd853b6d25 100644 --- a/es2panda/ir/ts/tsUnionType.h +++ b/es2panda/ir/ts/tsUnionType.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_UNION_TYPE_H #define ES2PANDA_IR_TS_UNION_TYPE_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,10 +29,10 @@ class Type; namespace panda::es2panda::ir { -class TSUnionType : public Expression { +class TSUnionType : public TypeNode { public: explicit TSUnionType(ArenaVector &&types) - : Expression(AstNodeType::TS_UNION_TYPE), types_(std::move(types)) + : TypeNode(AstNodeType::TS_UNION_TYPE), types_(std::move(types)) { } @@ -44,7 +44,8 @@ public: void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; - checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *Check(checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; private: ArenaVector types_; diff --git a/es2panda/ir/ts/tsUnknownKeyword.cpp b/es2panda/ir/ts/tsUnknownKeyword.cpp index 851555b8cdcdfa34267a25494dcdf730ecb365c7..69f2934674a5e9508dd5040b60a051f28c48826d 100644 --- a/es2panda/ir/ts/tsUnknownKeyword.cpp +++ b/es2panda/ir/ts/tsUnknownKeyword.cpp @@ -15,6 +15,7 @@ #include "tsUnknownKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSUnknownKeyword::Check([[maybe_unused]] checker::Checker *checke return nullptr; } +checker::Type *TSUnknownKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalUnknownType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsUnknownKeyword.h b/es2panda/ir/ts/tsUnknownKeyword.h index ec850cffaf4c6748872408f996bb984d06c93b70..eacdf05ead8456ce53c051b33c45656e21be2ae2 100644 --- a/es2panda/ir/ts/tsUnknownKeyword.h +++ b/es2panda/ir/ts/tsUnknownKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_UNKNOWN_KEYWORD_H #define ES2PANDA_IR_TS_UNKNOWN_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSUnknownKeyword : public Expression { +class TSUnknownKeyword : public TypeNode { public: - explicit TSUnknownKeyword() : Expression(AstNodeType::TS_UNKNOWN_KEYWORD) {} + explicit TSUnknownKeyword() : TypeNode(AstNodeType::TS_UNKNOWN_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsVoidKeyword.cpp b/es2panda/ir/ts/tsVoidKeyword.cpp index c26881bce74c680d2f21f1577c88ac4c1c9c1147..ab6febb2b2965b520459684f70a7d923a22d513c 100644 --- a/es2panda/ir/ts/tsVoidKeyword.cpp +++ b/es2panda/ir/ts/tsVoidKeyword.cpp @@ -15,6 +15,7 @@ #include "tsVoidKeyword.h" +#include #include namespace panda::es2panda::ir { @@ -33,4 +34,9 @@ checker::Type *TSVoidKeyword::Check([[maybe_unused]] checker::Checker *checker) return nullptr; } +checker::Type *TSVoidKeyword::GetType(checker::Checker *checker) const +{ + return checker->GlobalVoidType(); +} + } // namespace panda::es2panda::ir diff --git a/es2panda/ir/ts/tsVoidKeyword.h b/es2panda/ir/ts/tsVoidKeyword.h index 9212937860f8c08c93664bd2588ac8b9363b96b6..dbd904d6a923171632ed945d25ab2ceea1d3ee79 100644 --- a/es2panda/ir/ts/tsVoidKeyword.h +++ b/es2panda/ir/ts/tsVoidKeyword.h @@ -16,7 +16,7 @@ #ifndef ES2PANDA_IR_TS_VOID_KEYWORD_H #define ES2PANDA_IR_TS_VOID_KEYWORD_H -#include +#include namespace panda::es2panda::compiler { class PandaGen; @@ -29,14 +29,15 @@ class Type; namespace panda::es2panda::ir { -class TSVoidKeyword : public Expression { +class TSVoidKeyword : public TypeNode { public: - explicit TSVoidKeyword() : Expression(AstNodeType::TS_VOID_KEYWORD) {} + explicit TSVoidKeyword() : TypeNode(AstNodeType::TS_VOID_KEYWORD) {} void Iterate(const NodeTraverser &cb) const override; void Dump(ir::AstDumper *dumper) const override; void Compile([[maybe_unused]] compiler::PandaGen *pg) const override; checker::Type *Check([[maybe_unused]] checker::Checker *checker) const override; + checker::Type *GetType(checker::Checker *checker) const override; }; } // namespace panda::es2panda::ir diff --git a/es2panda/test/compiler/ts/generic_type_alias_9.ts b/es2panda/ir/typeNode.h similarity index 50% rename from es2panda/test/compiler/ts/generic_type_alias_9.ts rename to es2panda/ir/typeNode.h index 1c6bfaa90f7edd72f0cbbd70a9dc9306f39b8881..57a6e75a1c403d79e4bb0a0d78cf5b81b673afc3 100644 --- a/es2panda/test/compiler/ts/generic_type_alias_9.ts +++ b/es2panda/ir/typeNode.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,13 +13,23 @@ * limitations under the License. */ +#ifndef ES2PANDA_IR_TYPE_NODE_H +#define ES2PANDA_IR_TYPE_NODE_H -type A boolean, B = { a: number, b: string }> = (T | B)[]; +#include -var a: A; +namespace panda::es2panda::checker { +class Checker; +class Type; +} // namespace panda::es2panda::checker -function func(a: string, b: string) { - return true; -} +namespace panda::es2panda::ir { +class TypeNode : public Expression { +public: + explicit TypeNode(AstNodeType type) : Expression(type) {} -a = [func]; + virtual checker::Type *GetType([[maybe_unused]] checker::Checker *checker) const = 0; +}; +} // namespace panda::es2panda::ir + +#endif /* ES2PANDA_IR_TYPE_NODE_H */ diff --git a/es2panda/parser/context/parserContext.h b/es2panda/parser/context/parserContext.h index 790e60518fa50ac8b046009787e0ba3a55490d30..984209c7741e34bf0d705137db224865b5cfbdac 100644 --- a/es2panda/parser/context/parserContext.h +++ b/es2panda/parser/context/parserContext.h @@ -60,6 +60,8 @@ enum class ParserStatus { IN_CLASS_BODY = (1 << 25), IN_DECORATOR = (1 << 26), DISALLOW_CONTINUE = (1 << 27), + + TS_MODULE = (1 << 28), }; DEFINE_BITOPS(ParserStatus) @@ -125,6 +127,11 @@ public: return (status_ & ParserStatus::MODULE) != 0; } + bool IsTsModule() const + { + return (status_ & ParserStatus::TS_MODULE) != 0; + } + const ParserContext *FindLabel(const util::StringView &label) const; private: diff --git a/es2panda/parser/expressionParser.cpp b/es2panda/parser/expressionParser.cpp index 598226d6bfed3bb59f0373e5988ec0889d41b20f..86f2df8516ce5a434be00b5f0fb5ad26fd18128e 100644 --- a/es2panda/parser/expressionParser.cpp +++ b/es2panda/parser/expressionParser.cpp @@ -2331,7 +2331,9 @@ ir::FunctionExpression *ParserImpl::ParseFunctionExpression(ParserStatus newStat } ir::ScriptFunction *functionNode = ParseFunction(newStatus); - lexer_->NextToken(); + if (functionNode->Body() != nullptr) { + lexer_->NextToken(); + } functionNode->SetStart(startLoc); if (ident) { diff --git a/es2panda/parser/parserFlags.h b/es2panda/parser/parserFlags.h index 48f1020f094c750b5fa1e782b0a087be8fb265b0..630c26c77c5a128c186e81968024e59a93b37e17 100644 --- a/es2panda/parser/parserFlags.h +++ b/es2panda/parser/parserFlags.h @@ -40,6 +40,7 @@ enum class VariableParsingFlags { CONST = (1 << 5), STOP_AT_IN = (1 << 6), EXPORTED = (1 << 7), + IN_FOR = (1 << 8), }; DEFINE_BITOPS(VariableParsingFlags) diff --git a/es2panda/parser/parserImpl.cpp b/es2panda/parser/parserImpl.cpp index 4c06cda889b03a01483220f2b06fdf109b07bc41..99ca9bd40454d3a77808297e7509834d6e5798c5 100644 --- a/es2panda/parser/parserImpl.cpp +++ b/es2panda/parser/parserImpl.cpp @@ -352,6 +352,8 @@ ir::Expression *ParserImpl::ParseTsTypeLiteralOrTsMappedType(ir::Expression *typ lexer_->NextToken(); auto *literalType = AllocNode(std::move(members)); + auto *typeVar = binder::Scope::CreateVar(Allocator(), "__type", binder::VariableFlags::TYPE, literalType); + literalType->SetVariable(typeVar); literalType->SetRange({bodyStart, bodyEnd}); return literalType; } @@ -862,6 +864,7 @@ ir::Expression *ParserImpl::ParseTsTypeReferenceOrQuery(bool parseQuery) ir::Expression *typeName = AllocNode(lexer_->GetToken().Ident(), Allocator()); typeName->SetRange(lexer_->GetToken().Loc()); + typeName->AsIdentifier()->SetReference(); if (lexer_->Lookahead() == LEX_CHAR_LESS_THAN) { lexer_->ForwardToken(lexer::TokenType::PUNCTUATOR_LESS_THAN, 1); @@ -1126,6 +1129,38 @@ ir::Expression *ParserImpl::ParseTsTypeLiteralOrInterfaceKey(bool *computed, boo return key; } +void ParserImpl::CreateTSVariableForProperty(ir::AstNode *node, const ir::Expression *key, binder::VariableFlags flags) +{ + binder::Variable *propVar = nullptr; + bool isMethod = flags & binder::VariableFlags::METHOD; + util::StringView propName = "__computed"; + + switch (key->Type()) { + case ir::AstNodeType::IDENTIFIER: { + propName = key->AsIdentifier()->Name(); + break; + } + case ir::AstNodeType::NUMBER_LITERAL: { + propName = key->AsNumberLiteral()->Str(); + flags |= binder::VariableFlags::NUMERIC_NAME; + break; + } + case ir::AstNodeType::STRING_LITERAL: { + propName = key->AsStringLiteral()->Str(); + break; + } + default: { + flags |= binder::VariableFlags::COMPUTED; + break; + } + } + + propVar = isMethod ? binder::Scope::CreateVar(Allocator(), propName, flags, node) + : binder::Scope::CreateVar(Allocator(), propName, flags, node); + + node->SetVariable(propVar); +} + ir::Expression *ParserImpl::ParseTsTypeLiteralOrInterfaceMember() { bool computed = false; @@ -1180,19 +1215,26 @@ ir::Expression *ParserImpl::ParseTsTypeLiteralOrInterfaceMember() ir::Expression *member = nullptr; ir::Expression *typeAnnotation = nullptr; + binder::VariableFlags flags = binder::VariableFlags::NONE; + + if (optional) { + flags |= binder::VariableFlags::OPTIONAL; + } + + if (readonly) { + flags |= binder::VariableFlags::READONLY; + } if (lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_LEFT_PARENTHESIS && !isIndexSignature) { FunctionParameterContext funcParamContext(&context_, Binder()); auto *funcParamScope = funcParamContext.LexicalScope().GetScope(); ArenaVector params = ParseFunctionParams(true); - ir::Expression *returnTypeAnnotation = nullptr; - if (lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_COLON) { lexer_->NextToken(); // eat ':' TypeAnnotationParsingOptions options = TypeAnnotationParsingOptions::THROW_ERROR | TypeAnnotationParsingOptions::CAN_BE_TS_TYPE_PREDICATE; - returnTypeAnnotation = ParseTsTypeAnnotation(&options); + typeAnnotation = ParseTsTypeAnnotation(&options); } if (signature) { @@ -1200,12 +1242,13 @@ ir::Expression *ParserImpl::ParseTsTypeLiteralOrInterfaceMember() ? ir::TSSignatureDeclaration::TSSignatureDeclarationKind::CONSTRUCT_SIGNATURE : ir::TSSignatureDeclaration::TSSignatureDeclarationKind::CALL_SIGNATURE; member = AllocNode(funcParamScope, kind, typeParamDecl, std::move(params), - returnTypeAnnotation); + typeAnnotation); funcParamScope->BindNode(member); } else { member = AllocNode(funcParamScope, key, typeParamDecl, std::move(params), - returnTypeAnnotation, computed, optional); + typeAnnotation, computed, optional); funcParamScope->BindNode(member); + CreateTSVariableForProperty(member, key, flags | binder::VariableFlags::METHOD); } } else if (lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_COLON) { lexer_->NextToken(); // eat ':' @@ -1220,6 +1263,7 @@ ir::Expression *ParserImpl::ParseTsTypeLiteralOrInterfaceMember() member = AllocNode(key, typeAnnotation, readonly); } else if (!member) { member = AllocNode(key, typeAnnotation, computed, optional, readonly); + CreateTSVariableForProperty(member, key, flags | binder::VariableFlags::PROPERTY); } else if (readonly) { ThrowSyntaxError( "'readonly' modifier can only appear on a property " @@ -1232,6 +1276,57 @@ ir::Expression *ParserImpl::ParseTsTypeLiteralOrInterfaceMember() return member; } +util::StringView GetTSPropertyName(ir::Expression *key) +{ + switch (key->Type()) { + case ir::AstNodeType::IDENTIFIER: { + return key->AsIdentifier()->Name(); + } + case ir::AstNodeType::NUMBER_LITERAL: { + return key->AsNumberLiteral()->Str(); + } + case ir::AstNodeType::STRING_LITERAL: { + return key->AsStringLiteral()->Str(); + } + default: { + UNREACHABLE(); + } + } +} + +void ParserImpl::CheckObjectTypeForDuplicatedProperties(ir::Expression *key, ArenaVector &members) +{ + if (!key->IsIdentifier() && !key->IsNumberLiteral() && !key->IsStringLiteral()) { + return; + } + + for (auto *it : members) { + ir::Expression *compare = nullptr; + + switch (it->Type()) { + case ir::AstNodeType::TS_PROPERTY_SIGNATURE: { + compare = it->AsTSPropertySignature()->Key(); + break; + } + case ir::AstNodeType::TS_METHOD_SIGNATURE: { + compare = it->AsTSMethodSignature()->Key(); + break; + } + default: { + continue; + } + } + + if (!compare->IsIdentifier() && !compare->IsNumberLiteral() && !compare->IsStringLiteral()) { + continue; + } + + if (GetTSPropertyName(key) == GetTSPropertyName(compare)) { + ThrowSyntaxError("Duplicated identifier", key->Start()); + } + } +} + ArenaVector ParserImpl::ParseTsTypeLiteralOrInterface() { ASSERT(lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_LEFT_BRACE); @@ -1242,6 +1337,13 @@ ArenaVector ParserImpl::ParseTsTypeLiteralOrInterface() while (lexer_->GetToken().Type() != lexer::TokenType::PUNCTUATOR_RIGHT_BRACE) { ir::Expression *member = ParseTsTypeLiteralOrInterfaceMember(); + + if (member->IsTSPropertySignature()) { + CheckObjectTypeForDuplicatedProperties(member->AsTSPropertySignature()->Key(), members); + } else if (member->IsTSMethodSignature()) { + CheckObjectTypeForDuplicatedProperties(member->AsTSMethodSignature()->Key(), members); + } + members.push_back(member); if (lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_RIGHT_BRACE) { @@ -1318,6 +1420,8 @@ ir::TSUnionType *ParserImpl::ParseTsUnionType(ir::Expression *type, bool restric lexer::SourcePosition endLoc = types.back()->End(); auto *unionType = AllocNode(std::move(types)); + auto *typeVar = binder::Scope::CreateVar(Allocator(), "__type", binder::VariableFlags::TYPE, unionType); + unionType->SetVariable(typeVar); unionType->SetRange({startLoc, endLoc}); return unionType; @@ -1359,8 +1463,10 @@ ir::TSIntersectionType *ParserImpl::ParseTsIntersectionType(ir::Expression *type lexer::SourcePosition endLoc = types.back()->End(); auto *intersectionType = AllocNode(std::move(types)); - + auto *typeVar = binder::Scope::CreateVar(Allocator(), "__type", binder::VariableFlags::TYPE, intersectionType); + intersectionType->SetVariable(typeVar); intersectionType->SetRange({startLoc, endLoc}); + return intersectionType; } @@ -1397,13 +1503,6 @@ ir::Expression *ParserImpl::ParseTsParenthesizedOrFunctionType(ir::Expression *t ASSERT(lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_LEFT_PARENTHESIS); lexer_->NextToken(); // eat '(' - char32_t nextCp = lexer_->Lookahead(); - if (nextCp == LEX_CHAR_COMMA || nextCp == LEX_CHAR_QUESTION || nextCp == LEX_CHAR_COLON || - (!CurrentIsBasicType() && lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_RIGHT_PARENTHESIS)) { - lexer_->Rewind(startPos); - return ParseTsFunctionType(typeStart, false, throwError); - } - TypeAnnotationParsingOptions options = TypeAnnotationParsingOptions::NO_OPTS; ir::Expression *type = ParseTsTypeAnnotation(&options); @@ -1412,6 +1511,13 @@ ir::Expression *ParserImpl::ParseTsParenthesizedOrFunctionType(ir::Expression *t return ParseTsFunctionType(typeStart, false, throwError); } + if (lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_COMMA || + lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_QUESTION_MARK || + lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_COLON) { + lexer_->Rewind(startPos); + return ParseTsFunctionType(typeStart, false, throwError); + } + if (throwError && lexer_->GetToken().Type() != lexer::TokenType::PUNCTUATOR_RIGHT_PARENTHESIS) { ThrowSyntaxError("')' expected"); } @@ -1594,7 +1700,7 @@ ir::ModifierFlags ParserImpl::ParseModifiers() char32_t nextCp = lexer_->Lookahead(); if (!((Extension() == ScriptExtension::JS && nextCp != LEX_CHAR_LEFT_PAREN) || (Extension() == ScriptExtension::TS && nextCp != LEX_CHAR_EQUALS && nextCp != LEX_CHAR_SEMICOLON && - nextCp != LEX_CHAR_LEFT_PAREN))) { + nextCp != LEX_CHAR_COMMA && nextCp != LEX_CHAR_LEFT_PAREN))) { break; } @@ -2027,7 +2133,9 @@ ir::MethodDefinition *ParserImpl::ParseClassMethod(ClassElmentDescriptor *desc, } ir::ScriptFunction *func = ParseFunction(desc->newStatus, isDeclare); - lexer_->NextToken(); + if (func->Body() != nullptr) { + lexer_->NextToken(); + } if (func->IsOverload() && !decorators.empty()) { ThrowSyntaxError("A decorator can only decorate a method implementation, not an overload.", @@ -2633,6 +2741,7 @@ ir::TSEnumDeclaration *ParserImpl::ParseEnumDeclaration(bool isConst) auto *key = AllocNode(ident, Allocator()); key->SetRange(lexer_->GetToken().Loc()); + key->SetReference(); lexer_->NextToken(); const auto &bindings = Binder()->GetScope()->Bindings(); diff --git a/es2panda/parser/parserImpl.h b/es2panda/parser/parserImpl.h index 258d5c91692a5f8f5c1c01b0ac03eb3975934aa0..1c27794daf1297c671e41a40026ec38cbc0f29ef 100644 --- a/es2panda/parser/parserImpl.h +++ b/es2panda/parser/parserImpl.h @@ -318,6 +318,8 @@ private: ir::SpreadElement *ParseSpreadElement(ExpressionParseFlags flags = ExpressionParseFlags::NO_OPTS); ir::TSParameterProperty *CreateTsParameterProperty(ir::Expression *parameter, ir::ModifierFlags modifiers); ir::Expression *ParseFunctionParameter(bool isDeclare); + void CreateTSVariableForProperty(ir::AstNode *node, const ir::Expression *key, binder::VariableFlags flags); + void CheckObjectTypeForDuplicatedProperties(ir::Expression *key, ArenaVector &members); // ExpressionParser.Cpp diff --git a/es2panda/parser/program/program.cpp b/es2panda/parser/program/program.cpp index 717ba230d95d35a6062dbb845f5122d541c46f3d..891bd46e314b1e59d13807e9b745fa21350512f7 100644 --- a/es2panda/parser/program/program.cpp +++ b/es2panda/parser/program/program.cpp @@ -22,7 +22,7 @@ namespace panda::es2panda::parser { Program::Program(ScriptExtension extension) : allocator_(std::make_unique(SpaceType::SPACE_TYPE_COMPILER, nullptr, true)), - binder_(allocator_->New(this)), + binder_(allocator_->New(this, extension)), sourceCode_(Allocator()), sourceFile_(Allocator()), extension_(extension) diff --git a/es2panda/parser/statementParser.cpp b/es2panda/parser/statementParser.cpp index 17a9d2d75c1fc5a6ba1964dbee6cdc221bbb12bb..53468a451c68099618ae15f181b4fc36a2b00425 100644 --- a/es2panda/parser/statementParser.cpp +++ b/es2panda/parser/statementParser.cpp @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -245,7 +246,7 @@ ir::Statement *ParserImpl::ParseStatement(StatementParsingFlags flags) ir::TSModuleDeclaration *ParserImpl::ParseTsModuleDeclaration(bool isDeclare) { lexer::SourcePosition startLoc = lexer_->GetToken().Start(); - context_.Status() |= ParserStatus::MODULE; + context_.Status() |= ParserStatus::TS_MODULE; if (lexer_->GetToken().KeywordType() == lexer::TokenType::KEYW_GLOBAL) { return ParseTsAmbientExternalModuleDeclaration(startLoc, isDeclare); @@ -419,10 +420,6 @@ ir::Statement *ParserImpl::ParseLetStatement(StatementParsingFlags flags, bool i ir::Statement *ParserImpl::ParseConstStatement(StatementParsingFlags flags, bool isDeclare) { - if (!(flags & StatementParsingFlags::ALLOW_LEXICAL)) { - ThrowSyntaxError("The 'const' declarations can only be declared at the top level or inside a block."); - } - lexer::SourcePosition constVarStar = lexer_->GetToken().Start(); lexer_->NextToken(); @@ -433,6 +430,10 @@ ir::Statement *ParserImpl::ParseConstStatement(StatementParsingFlags flags, bool ThrowSyntaxError("Unexpected token"); } + if (!(flags & StatementParsingFlags::ALLOW_LEXICAL)) { + ThrowSyntaxError("The 'const' declarations can only be declared at the top level or inside a block."); + } + auto *variableDecl = ParseVariableDeclaration(VariableParsingFlags::CONST | VariableParsingFlags::NO_SKIP_VAR_KIND, isDeclare); variableDecl->SetStart(constVarStar); @@ -620,6 +621,7 @@ ir::TSInterfaceDeclaration *ParserImpl::ParseTsInterfaceDeclaration() auto *id = AllocNode(lexer_->GetToken().Ident(), Allocator()); id->SetRange(lexer_->GetToken().Loc()); + id->SetReference(); lexer_->NextToken(); binder::LexicalScope localScope(Binder()); @@ -640,6 +642,7 @@ ir::TSInterfaceDeclaration *ParserImpl::ParseTsInterfaceDeclaration() const lexer::SourcePosition &heritageStart = lexer_->GetToken().Start(); lexer::SourcePosition heritageEnd = lexer_->GetToken().End(); ir::Expression *expr = AllocNode(lexer_->GetToken().Ident(), Allocator()); + expr->AsIdentifier()->SetReference(); expr->SetRange(lexer_->GetToken().Loc()); if (lexer_->Lookahead() == LEX_CHAR_LESS_THAN) { @@ -658,8 +661,10 @@ ir::TSInterfaceDeclaration *ParserImpl::ParseTsInterfaceDeclaration() heritageEnd = typeParamInst->End(); } - auto *heritage = AllocNode(expr, typeParamInst); - heritage->SetRange({heritageStart, heritageEnd}); + auto *typeReference = AllocNode(expr, typeParamInst); + typeReference->SetRange({heritageStart, heritageEnd}); + auto *heritage = AllocNode(typeReference); + heritage->SetRange(typeReference->Range()); extends.push_back(heritage); if (lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_LEFT_BRACE) { @@ -688,9 +693,8 @@ ir::TSInterfaceDeclaration *ParserImpl::ParseTsInterfaceDeclaration() if (res == bindings.end()) { decl->BindNode(interfaceDecl); - } else { - decl->AsInterfaceDecl()->Add(interfaceDecl); } + decl->AsInterfaceDecl()->Add(interfaceDecl); lexer_->NextToken(); context_.Status() &= ~ParserStatus::ALLOW_THIS_TYPE; @@ -985,7 +989,9 @@ ir::FunctionDeclaration *ParserImpl::ParseFunctionDeclaration(bool canBeAnonymou lexer_->GetToken().Type() != lexer::TokenType::KEYW_AWAIT) { if (canBeAnonymous) { ir::ScriptFunction *func = ParseFunction(newStatus, isDeclare); - lexer_->NextToken(); + if (func->Body() != nullptr) { + lexer_->NextToken(); + } func->SetStart(startLoc); func->SetAsExportDefault(); @@ -1015,18 +1021,47 @@ ir::FunctionDeclaration *ParserImpl::ParseFunctionDeclaration(bool canBeAnonymou newStatus |= ParserStatus::FUNCTION_DECLARATION; ir::ScriptFunction *func = ParseFunction(newStatus, isDeclare); - lexer_->NextToken(); + if (func->Body() != nullptr) { + lexer_->NextToken(); + } func->SetIdent(identNode); func->SetStart(startLoc); auto *funcDecl = AllocNode(func); funcDecl->SetRange(func->Range()); - if (!func->IsOverload()) { - binder::DeclarationFlags declflag = newStatus & ParserStatus::EXPORT_REACHED ? - binder::DeclarationFlags::EXPORT : binder::DeclarationFlags::NONE; + binder::DeclarationFlags declflag = newStatus & ParserStatus::EXPORT_REACHED ? + binder::DeclarationFlags::EXPORT : binder::DeclarationFlags::NONE; + if (Extension() == ScriptExtension::TS) { + const auto &bindings = Binder()->GetScope()->Bindings(); + auto res = bindings.find(ident); + binder::FunctionDecl *decl {}; + + if (res == bindings.end()) { + decl = Binder()->AddDecl(identNode->Start(), declflag, Allocator(), ident, func); + } else { + binder::Decl *currentDecl = res->second->Declaration(); + + if (!currentDecl->IsFunctionDecl()) { + Binder()->ThrowRedeclaration(startLoc, currentDecl->Name()); + } + + decl = currentDecl->AsFunctionDecl(); + + if (!decl->Node()->AsScriptFunction()->IsOverload()) { + Binder()->ThrowRedeclaration(startLoc, currentDecl->Name()); + } + if (!func->IsOverload()) { + decl->BindNode(func); + } + } + + decl->Add(func); + } else { Binder()->AddDecl(identNode->Start(), declflag, Allocator(), ident, func); - } else if (lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_SEMI_COLON) { + } + + if (func->IsOverload() && lexer_->GetToken().Type() == lexer::TokenType::PUNCTUATOR_SEMI_COLON) { lexer_->NextToken(); } @@ -1253,7 +1288,7 @@ ir::Statement *ParserImpl::ParseForStatement() bool canBeForInOf = true; bool isAwait = false; lexer_->NextToken(); - VariableParsingFlags varFlags = VariableParsingFlags::STOP_AT_IN; + VariableParsingFlags varFlags = VariableParsingFlags::STOP_AT_IN | VariableParsingFlags::IN_FOR; ExpressionParseFlags exprFlags = ExpressionParseFlags::NO_OPTS; if (lexer_->GetToken().Type() == lexer::TokenType::KEYW_AWAIT) { @@ -1784,6 +1819,10 @@ ir::VariableDeclarator *ParserImpl::ParseVariableDeclarator(VariableParsingFlags init = AllocNode(identStr, Allocator()); init->SetRange(lexer_->GetToken().Loc()); + if (Extension() == ScriptExtension::TS) { + init->AsIdentifier()->SetReference(); + } + lexer_->NextToken(); break; } @@ -1819,6 +1858,10 @@ ir::VariableDeclarator *ParserImpl::ParseVariableDeclarator(VariableParsingFlags ThrowSyntaxError("Missing initializer in const declaration"); } + if (!(flags & VariableParsingFlags::IN_FOR) && (init->IsArrayPattern() || init->IsObjectPattern())) { + ThrowSyntaxError("Missing initializer in destructuring declaration"); + } + lexer::SourcePosition endLoc = init->End(); declarator = AllocNode(init); declarator->SetRange({startLoc, endLoc}); @@ -2325,7 +2368,9 @@ ir::ExportNamedDeclaration *ParserImpl::ParseNamedExportDeclaration(const lexer: ConsumeSemicolon(decl); } - AddExportLocalEntryItem(decl); + if (Extension() != ScriptExtension::TS || !context_.IsTsModule()) { + AddExportLocalEntryItem(decl); + } lexer::SourcePosition endLoc = decl->End(); ArenaVector specifiers(Allocator()->Adapter()); diff --git a/es2panda/test/compiler/ts/arithmetic_operators_1-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_1-expected.txt index 288740e954dfa756c74d3d80e5ca46fe5d32f842..80eb66043249489e5bf6f8c4ec52282b41d090b4 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_1-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_1-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_1.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_1.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_10-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_10-expected.txt index 6162e8d65e422955268411a164e63b855dd36855..9477736e84b8f7c57df7bb71a3908d357c57164b 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_10-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_10-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_10.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_10.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_11-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_11-expected.txt index dc3cc3dd1c90c6543d4f71ab74870015620f4b04..11c648c69bc18d5ceda50b3c3af64aa95f2c1c59 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_11-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_11-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_11.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_11.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_12-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_12-expected.txt index 8456c97e27ef0bed8cfd5b78e2db47761bdc410f..45208a2856a76d310d47eff30481ff365e135f9b 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_12-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_12-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_12.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_12.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_13-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_13-expected.txt index 3752048af1cacb1c57ab2cdd3e4f6f4f56414767..d1de1c55aadfc82b479b063ed80d925ef9ea9ee8 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_13-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_13-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_13.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_13.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_14-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_14-expected.txt index 2337dee5fb04331d2c6ef16bda0c6e44192e19ef..0d3376afd6ea0197add58c7ce761a05004a48906 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_14-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_14-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_14.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_14.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_15-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_15-expected.txt index a3fc607bce8b56652f49c9c121a06f98cd53e24e..9cf74401a41e262548b4551ec339a5178295fc38 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_15-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_15-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_15.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_15.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_16-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_16-expected.txt index dd4bae102ab896f16683b30976d0fd3f157d4c9f..3cb9fc65319e046cbbb237c8fc40c24c2e8ab554 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_16-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_16-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -127,33 +127,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 4 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -165,9 +165,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_16.ts:3:1] +TypeError: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_16.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_17-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_17-expected.txt index d3196beb0513b52dd2cf0faf3da2a82f28ec667b..813820c8ea833e95e021435c662cc224e7a4b0dc 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_17-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_17-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -127,33 +127,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 4 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -165,9 +165,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_17.ts:3:1] +TypeError: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_17.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_18-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_18-expected.txt index ae420d50fa74889b571ef0c76a95ff823ddddf4e..2120cf24fdbda249f22e576cfc449de7737daddd 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_18-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_18-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_18.ts:3:5] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_18.ts:19:5] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_19-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_19-expected.txt index f76c937060d15b38969d7c10df869608060d57aa..a9ae2b6aa604c7ac083a15f95d0e5b4b3fa0204b 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_19-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_19-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_19.ts:3:5] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_19.ts:19:5] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_2-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_2-expected.txt index d263e6e4da163b0024e9dcec8a530a24431bdd4a..dec9c426cfe5d3ead16523305bf24ece28cf743f 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_2-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_2-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_2.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_2.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_20-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_20-expected.txt index 731f50e391933511acaf5ae8e24f3dc738630744..0ca9c46ed254749391ca170502c04a2c094208c4 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_20-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_20-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_20.ts:3:5] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_20.ts:19:5] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_21-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_21-expected.txt index 6dde73b29a61e93c44f4aca6f9b5427809d69b84..2bf8a13ac0254265a29beaa6318a3a45b85f7a33 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_21-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_21-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_21.ts:3:5] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_21.ts:19:5] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_22-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_22-expected.txt index 0074500f0363cd7ba3379d8a807cb0104dbb7a69..ce1fe75e268a7011e832a0eb024bf71847ef6065 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_22-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_22-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_22.ts:3:6] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_22.ts:19:6] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_23-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_23-expected.txt index dfc577e888171dca1e195d6ded51715c85973b25..116b876a7c1be0e36a29150747521c23c6ecf8f5 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_23-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_23-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_23.ts:3:6] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_23.ts:19:6] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_24-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_24-expected.txt index 299582411967ba5fb2133d9b422b5751f019ac3b..cb9b10da3657e5c74f9867298da9b1ea7dd89389 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_24-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_24-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_24.ts:3:5] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_24.ts:19:5] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_25-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_25-expected.txt index 86996891d492fea28bdb6eed721026d6f3be177a..0d2dcc2f1e9cc9294f57b685b4ca36e90d81540f 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_25-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_25-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_25.ts:3:5] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_25.ts:19:5] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_26-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_26-expected.txt index e3f2d0f987305422ca20ebf79a02569d4d63f831..1c2a696e7be44533092ea9df9d002f7cc8b35198 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_26-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_26-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_26.ts:3:5] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_26.ts:19:5] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_27-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_27-expected.txt index 4f341159b7a0a7b0dbc51114199cc8510906cc3a..fd8de99200da71fcb4e60ae7b68b16b0f1068c31 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_27-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_27-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_27.ts:3:5] +TypeError: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_27.ts:19:5] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_28-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_28-expected.txt index d55cccd29b846b1b9e7dc61d443a04750eea4582..8e97d7aaa4f940a105d3418d528b3c290f824584 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_28-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_28-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_28.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_28.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_29-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_29-expected.txt index ee063d74163c823dca9811fda0ad0c2fe485e1ad..41dc23e8f340e0293895a0493a14f56b50e8c917 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_29-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_29-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_29.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_29.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_3-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_3-expected.txt index b29a1990d29ee657304c639435bbcd8706fd5c84..04fc7f6636cc9728ac9eea969e1687ff99249e16 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_3-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_3-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_3.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_3.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_30-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_30-expected.txt index 2677cbe71418f159db3ac1b9b956e08e669480a9..8b017d44b68c1692d844b453e4a9e08bc5f01d28 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_30-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_30-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_30.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_30.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_31-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_31-expected.txt index 947308bc7f9c717da0b6350fcab4677cf05948b7..a5a29ad2f14b92c4d6abadee099fda23a717ce4c 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_31-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_31-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_31.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_31.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_32-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_32-expected.txt index 8d2917c3c28c553f879c252cc09d40c89e6e93b6..772265f8f7bbfb942c03218816f302d91ef2e933 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_32-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_32-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_32.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_32.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_33-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_33-expected.txt index f8dcb01986b00a148394b666e2f159c3e203c114..469b70c48d7715a69bfe322d7db6f3456a94a9aa 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_33-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_33-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_33.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_33.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_34-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_34-expected.txt index 6a2d19fa223f3a9b96ed9c9d0b6459b7a289b086..7c1f6c31be3cc548a5e26b610a463b1893edd780 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_34-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_34-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_34.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_34.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_35-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_35-expected.txt index 8a5d13fd528517aa59873176c6c17f710e06e361..39cdad6a2f9c6edd4c551aed8afd83e409e83232 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_35-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_35-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_35.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_35.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_36-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_36-expected.txt index 71d419b4cffb0a4a815b78335c777a1d1176142d..1b431df1d26fa7cb0f8f03116330fa6e8f97e414 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_36-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_36-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_36.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_36.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_37-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_37-expected.txt index 1cf8806a0c56f6ddf167dece88bfdeabd0f4683e..c0621b681b894ab9c03b65f392dcd94437719caa 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_37-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_37-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_37.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_37.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_38-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_38-expected.txt index 684ace52a569d2265d1ca97652719561dddd1df5..116716f5c2f326389be7760000627bd4144b1988 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_38-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_38-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_38.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_38.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_39-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_39-expected.txt index 6d46f312226b132aa497e76a02cde76d8ec4d9ab..ab3ca188b29717d351e402037e2db2c459987d94 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_39-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_39-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_39.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_39.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_4-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_4-expected.txt index 1f3a61ca1554f4f1bfdd18a9ee3f67b7610f07bf..8a45f41100e02e63d71c8041beab989a4808a326 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_4-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_4-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_4.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_4.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_40-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_40-expected.txt index c1821d66f1a2aa2db5f09a33528153f9f7aaedf4..a6517946e27cb4e1e1af087d5c41f5379fc07a46 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_40-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_40-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_40.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_40.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_41-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_41-expected.txt index ab612f004716a80406b91b13d119034efd348ac5..aaa2820556e2083a6ac747c86eb99cb82808bc7f 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_41-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_41-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_41.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_41.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_42-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_42-expected.txt index 9695e4ab4f5ee74c73845874f662d264662a7173..bd136276b40dff788a749467937b79f105878cef 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_42-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_42-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_42.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_42.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_43-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_43-expected.txt index bff8397b9743a492dc2ae251e33c30c8c3848593..0c08f1cd796675cb44ae5470a6a708166650f597 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_43-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_43-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_43.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_43.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_44-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_44-expected.txt index d9dde9b9196c50666dc6c679533256e5dbc2f510..81e587d0665e08988814a2afb2b3ee885cd5f9b3 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_44-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_44-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_44.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_44.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_45-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_45-expected.txt index 62d25f31f6160e7f4a8f19df284d4cb1314b2e24..1c117097c8297f83730ef5ea66b914fe9930824e 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_45-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_45-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_45.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_45.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_46-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_46-expected.txt index 3e9ce0b9f6cea43fa1f96f72fe162aa07382a2ef..9f90ee21f510a4b212a480b778cdfff821c15304 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_46-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_46-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -127,33 +127,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 4 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -165,9 +165,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_46.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_46.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_47-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_47-expected.txt index 565b17be094ebd169cf87bf1a541a10a9987a3fc..fe9394a153f3ea78e183029f802d62ec06afbc6b 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_47-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_47-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -127,33 +127,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 4 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -165,9 +165,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [arithmetic_operators_47.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [arithmetic_operators_47.ts:18:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_48-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_48-expected.txt index e0c0831c4e64cb8795d5e337996a1e325d447fd6..672a74f83f467c080a8ac1d76337ab4857f82281 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_48-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_48-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_48.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_48.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_49-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_49-expected.txt index f05a3a691053fe58c6b05da11b49e7fad341d34f..3bfe3177de6adf2ad25382104fb69dbc391ec398 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_49-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_49-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_49.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_49.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_5-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_5-expected.txt index fb94f41021c29ee945b3bf5f135788e884faf2a8..f48b69e9131297106bd41cba6e19929aa0ddac85 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_5-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_5-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_5.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_5.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_50-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_50-expected.txt index 10e76d91a5cfd1c1d881ed119a8aacd111f2c61a..7cc70a543e6cc0450844f63db2f8d8dbb73bdc81 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_50-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_50-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_50.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_50.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_51-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_51-expected.txt index aba79ac939065de59b9cc03e0ff9b67f00ff7bc0..074005a361320d0f4d64428c525808f78dbcfdd2 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_51-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_51-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_51.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_51.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_52-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_52-expected.txt index 6ac75c77df82ed9c9acf5acf4efed7d6a74632f9..d028743c091818d626fe08e51cc5ab29afc891a5 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_52-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_52-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_52.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_52.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_53-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_53-expected.txt index 8fa0f9f1c1702b41f87b347bd5999304ab7f5bbc..33300be1eeae8c2855be9999be4d6a5201bb7c39 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_53-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_53-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_53.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_53.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_54-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_54-expected.txt index 943e245d8b1c7f291cb321d29bee9c8563a737c1..03f7fb5f8d6ed453ff126b5f9fdd2f6c3d5d8dfb 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_54-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_54-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_54.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_54.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_55-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_55-expected.txt index 4e4995902b21158534e9fff50851fc02f87ba3d2..43041e754d7e7eccaceb21869d3af0c5e9e2064f 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_55-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_55-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_55.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_55.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_56-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_56-expected.txt index aa69aa412ca6d2c4b4b47c3f995d6e05af583ad6..2eda3d2c7da54a78f2410ba0275c3557056d0fef 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_56-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_56-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_56.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_56.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_57-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_57-expected.txt index 78a65f4e0a4c7f13b457521ed30601932612b339..ebc0b7534a7712738c12cdceef99dffabbeda5c5 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_57-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_57-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_57.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_57.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_58-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_58-expected.txt index 5268a57f656e5cd1bcc99ee73f28f0c5a183b93f..e343906e42fde96134c62df06bb30a913cb61614 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_58-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_58-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_58.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_58.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_59-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_59-expected.txt index 4e1f24fae256423a3e5104d02b27c73996b68ab4..13e4b4ca0d2231700e91fb851ca86681e29cafdb 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_59-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_59-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_59.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_59.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_6-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_6-expected.txt index 47907576123402ee625284510b8d7fc607530022..5adb20bf85ceae9755a02fb3431ae1d7cf56624a 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_6-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_6-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_6.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_6.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_60-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_60-expected.txt index 3899e9c05e26ecfe45106aed72929b32873c5f3d..5cb10c2c866f254745b031ac482a5fc521ad6db9 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_60-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_60-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_60.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_60.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_61-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_61-expected.txt index 3b08cb1e20711eeacfb6beefda47698fffc7b100..9cdbf17a8ca7944fcf0ddd18b295de68b01f24e0 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_61-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_61-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_61.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_61.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_62-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_62-expected.txt index 59b10a5615c03c3421a8cbe83b90bfb2179b012f..717db6156e6727fad3b3bbd8d9bebe556c4b190c 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_62-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_62-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_62.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_62.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_63-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_63-expected.txt index bdf93a23c7b6733063480df0d1ffc47af8ef79d9..07532c37d4f8fe44a5784faf55a64a6000af6722 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_63-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_63-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -127,33 +127,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 4 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -165,9 +165,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_63.ts:3:1] +TypeError: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_63.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_64-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_64-expected.txt index a3331079de562d94667735b4a71f66a72f82af09..cb0d342e5abbec62755dc6bfd0966e78c3beb7e6 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_64-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_64-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -127,33 +127,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 4 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -165,9 +165,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_64.ts:3:1] +TypeError: An arithmetic operand must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_64.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_7-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_7-expected.txt index edd8b712afddec2061fca09259c403ecad89ff69..fddd60ad7d9b17775b1ad5b60051cf74fdad12c2 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_7-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_7-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,47 +126,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_7.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_7.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_8-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_8-expected.txt index 82f721436065741d383d1787a6463c7561e3e465..26180e012f9b530536d83a7b0efec15825b8d9ac 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_8-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_8-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_8.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_8.ts:19:1] diff --git a/es2panda/test/compiler/ts/arithmetic_operators_9-expected.txt b/es2panda/test/compiler/ts/arithmetic_operators_9-expected.txt index 8cf64c587daff767666f3286db2359a37b4f900c..f20ab2b644dd7b9b5a41575e87ac63c6909b6e5d 100644 --- a/es2panda/test/compiler/ts/arithmetic_operators_9-expected.txt +++ b/es2panda/test/compiler/ts/arithmetic_operators_9-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -140,33 +140,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_9.ts:3:1] +TypeError: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. [arithmetic_operators_9.ts:19:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring-expected.txt index 11f8d66c2c0eb6dbb16ef64172563178101936da..ae094194a0514e2b7967485383ad2a6b92196bad 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -30,11 +30,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -42,11 +42,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -59,25 +59,25 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -87,11 +87,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -99,22 +99,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -123,11 +123,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -143,11 +143,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -157,33 +157,33 @@ "value": 2, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -199,47 +199,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -256,11 +256,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -268,11 +268,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -280,11 +280,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -293,11 +293,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -314,11 +314,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 18 } } @@ -326,11 +326,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 9 } } @@ -338,11 +338,11 @@ "init": null, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 9 } } @@ -351,11 +351,11 @@ "kind": "var", "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 19 } } @@ -374,11 +374,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 6 }, "end": { - "line": 7, + "line": 23, "column": 10 } } @@ -387,11 +387,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 13 } } @@ -402,11 +402,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 14 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -414,11 +414,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 19 } } @@ -432,11 +432,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 27 } } @@ -445,11 +445,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 7, + "line": 23, "column": 29 }, "end": { - "line": 7, + "line": 23, "column": 30 } } @@ -459,11 +459,11 @@ "value": true, "loc": { "start": { - "line": 7, + "line": 23, "column": 31 }, "end": { - "line": 7, + "line": 23, "column": 35 } } @@ -471,22 +471,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 22 }, "end": { - "line": 7, + "line": 23, "column": 36 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 36 } } @@ -495,11 +495,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 37 } } @@ -520,11 +520,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 6 }, "end": { - "line": 9, + "line": 25, "column": 10 } } @@ -534,22 +534,22 @@ "value": 2, "loc": { "start": { - "line": 9, + "line": 25, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 14 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 6 }, "end": { - "line": 9, + "line": 25, "column": 14 } } @@ -557,11 +557,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 15 } } @@ -571,14 +571,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 9, + "line": 25, "column": 19 }, "end": { - "line": 9, + "line": 25, "column": 24 } } @@ -586,22 +586,22 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 18 }, "end": { - "line": 9, + "line": 25, "column": 25 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 25 } } @@ -610,11 +610,11 @@ "kind": "var", "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 26 } } @@ -634,11 +634,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 11 }, "end": { - "line": 10, + "line": 26, "column": 17 } } @@ -647,11 +647,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 20 }, "end": { - "line": 10, + "line": 26, "column": 26 } } @@ -659,11 +659,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 11 }, "end": { - "line": 10, + "line": 26, "column": 26 } } @@ -671,11 +671,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -683,11 +683,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -696,11 +696,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 27 } } @@ -721,11 +721,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 6 }, "end": { - "line": 12, + "line": 28, "column": 10 } } @@ -735,22 +735,22 @@ "value": 1, "loc": { "start": { - "line": 12, + "line": 28, "column": 13 }, "end": { - "line": 12, + "line": 28, "column": 14 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 6 }, "end": { - "line": 12, + "line": 28, "column": 14 } } @@ -763,36 +763,36 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 16 }, "end": { - "line": 12, + "line": 28, "column": 20 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "asd", "loc": { "start": { - "line": 12, + "line": 28, "column": 23 }, "end": { - "line": 12, + "line": 28, "column": 28 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 16 }, "end": { - "line": 12, + "line": 28, "column": 28 } } @@ -805,11 +805,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 30 }, "end": { - "line": 12, + "line": 28, "column": 34 } } @@ -819,22 +819,22 @@ "value": true, "loc": { "start": { - "line": 12, + "line": 28, "column": 37 }, "end": { - "line": 12, + "line": 28, "column": 41 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 30 }, "end": { - "line": 12, + "line": 28, "column": 41 } } @@ -842,11 +842,11 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 42 } } @@ -856,22 +856,22 @@ "elements": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 45 }, "end": { - "line": 12, + "line": 28, "column": 47 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 47 } } @@ -880,11 +880,11 @@ "kind": "var", "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 48 } } @@ -901,11 +901,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 11 }, "end": { - "line": 13, + "line": 29, "column": 17 } } @@ -913,11 +913,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 9 } } @@ -925,11 +925,11 @@ "init": null, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 9 } } @@ -938,11 +938,11 @@ "kind": "var", "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 18 } } @@ -959,11 +959,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 17 } } @@ -971,11 +971,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 9 } } @@ -983,11 +983,11 @@ "init": null, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 9 } } @@ -996,11 +996,11 @@ "kind": "var", "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 18 } } @@ -1017,11 +1017,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 11 }, "end": { - "line": 15, + "line": 31, "column": 18 } } @@ -1029,11 +1029,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 9 } } @@ -1041,11 +1041,11 @@ "init": null, "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 9 } } @@ -1054,11 +1054,11 @@ "kind": "var", "loc": { "start": { - "line": 15, + "line": 31, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 19 } } @@ -1077,11 +1077,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 6 }, "end": { - "line": 17, + "line": 33, "column": 10 } } @@ -1095,11 +1095,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 13 }, "end": { - "line": 17, + "line": 33, "column": 18 } } @@ -1108,11 +1108,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 17, + "line": 33, "column": 20 }, "end": { - "line": 17, + "line": 33, "column": 21 } } @@ -1123,11 +1123,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 22 }, "end": { - "line": 17, + "line": 33, "column": 27 } } @@ -1135,11 +1135,11 @@ ], "loc": { "start": { - "line": 17, + "line": 33, "column": 12 }, "end": { - "line": 17, + "line": 33, "column": 28 } } @@ -1152,22 +1152,22 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 33 }, "end": { - "line": 17, + "line": 33, "column": 38 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 30 }, "end": { - "line": 17, + "line": 33, "column": 38 } } @@ -1175,11 +1175,11 @@ ], "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 39 } } @@ -1189,15 +1189,108 @@ "elements": [ { "type": "ObjectExpression", - "properties": [], + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 33, + "column": 45 + }, + "end": { + "line": 33, + "column": 46 + } + } + }, + "value": { + "type": "NumberLiteral", + "value": 6, + "loc": { + "start": { + "line": 33, + "column": 48 + }, + "end": { + "line": 33, + "column": 49 + } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 33, + "column": 45 + }, + "end": { + "line": 33, + "column": 49 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 33, + "column": 51 + }, + "end": { + "line": 33, + "column": 52 + } + } + }, + "value": { + "type": "StringLiteral", + "value": "bar", + "loc": { + "start": { + "line": 33, + "column": 54 + }, + "end": { + "line": 33, + "column": 59 + } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 33, + "column": 51 + }, + "end": { + "line": 33, + "column": 59 + } + } + } + ], "loc": { "start": { - "line": 17, + "line": 33, "column": 43 }, "end": { - "line": 17, - "column": 45 + "line": 33, + "column": 61 } } }, @@ -1209,12 +1302,12 @@ "value": 42, "loc": { "start": { - "line": 17, - "column": 48 + "line": 33, + "column": 64 }, "end": { - "line": 17, - "column": 50 + "line": 33, + "column": 66 } } }, @@ -1222,12 +1315,12 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 17, - "column": 52 + "line": 33, + "column": 68 }, "end": { - "line": 17, - "column": 53 + "line": 33, + "column": 69 } } }, @@ -1236,15 +1329,15 @@ "operator": "+", "left": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 17, - "column": 54 + "line": 33, + "column": 70 }, "end": { - "line": 17, - "column": 59 + "line": 33, + "column": 75 } } }, @@ -1253,58 +1346,58 @@ "value": 2, "loc": { "start": { - "line": 17, - "column": 62 + "line": 33, + "column": 78 }, "end": { - "line": 17, - "column": 63 + "line": 33, + "column": 79 } } }, "loc": { "start": { - "line": 17, - "column": 54 + "line": 33, + "column": 70 }, "end": { - "line": 17, - "column": 63 + "line": 33, + "column": 79 } } } ], "loc": { "start": { - "line": 17, - "column": 47 + "line": 33, + "column": 63 }, "end": { - "line": 17, - "column": 64 + "line": 33, + "column": 80 } } } ], "loc": { "start": { - "line": 17, + "line": 33, "column": 42 }, "end": { - "line": 17, - "column": 65 + "line": 33, + "column": 81 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, - "column": 65 + "line": 33, + "column": 81 } } } @@ -1312,12 +1405,12 @@ "kind": "var", "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, - "column": 66 + "line": 33, + "column": 82 } } }, @@ -1332,11 +1425,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 5 } } @@ -1355,11 +1448,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 10 }, "end": { - "line": 18, + "line": 34, "column": 11 } } @@ -1369,11 +1462,11 @@ "value": 5, "loc": { "start": { - "line": 18, + "line": 34, "column": 13 }, "end": { - "line": 18, + "line": 34, "column": 14 } } @@ -1381,11 +1474,11 @@ "kind": "init", "loc": { "start": { - "line": 18, + "line": 34, "column": 10 }, "end": { - "line": 18, + "line": 34, "column": 14 } } @@ -1401,25 +1494,25 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 16 }, "end": { - "line": 18, + "line": 34, "column": 17 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 18, + "line": 34, "column": 19 }, "end": { - "line": 18, + "line": 34, "column": 24 } } @@ -1427,11 +1520,11 @@ "kind": "init", "loc": { "start": { - "line": 18, + "line": 34, "column": 16 }, "end": { - "line": 18, + "line": 34, "column": 24 } } @@ -1439,33 +1532,33 @@ ], "loc": { "start": { - "line": 18, + "line": 34, "column": 8 }, "end": { - "line": 18, + "line": 34, "column": 26 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 26 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 27 } } @@ -1481,11 +1574,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 6 } } @@ -1496,33 +1589,33 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 9 }, "end": { - "line": 19, + "line": 35, "column": 13 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 13 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 14 } } @@ -1538,11 +1631,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 6 } } @@ -1553,33 +1646,33 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 9 }, "end": { - "line": 20, + "line": 36, "column": 13 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 13 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 14 } } @@ -1595,11 +1688,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 6 } } @@ -1609,33 +1702,33 @@ "elements": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 9 }, "end": { - "line": 21, + "line": 37, "column": 11 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 11 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 12 } } @@ -1656,11 +1749,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 6 }, "end": { - "line": 23, + "line": 39, "column": 11 } } @@ -1673,25 +1766,25 @@ "value": 1, "loc": { "start": { - "line": 23, + "line": 39, "column": 15 }, "end": { - "line": 23, + "line": 39, "column": 16 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 23, + "line": 39, "column": 18 }, "end": { - "line": 23, + "line": 39, "column": 23 } } @@ -1699,22 +1792,22 @@ ], "loc": { "start": { - "line": 23, + "line": 39, "column": 14 }, "end": { - "line": 23, + "line": 39, "column": 24 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 6 }, "end": { - "line": 23, + "line": 39, "column": 24 } } @@ -1730,11 +1823,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 27 }, "end": { - "line": 23, + "line": 39, "column": 32 } } @@ -1745,11 +1838,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 34 }, "end": { - "line": 23, + "line": 39, "column": 39 } } @@ -1757,11 +1850,11 @@ ], "loc": { "start": { - "line": 23, + "line": 39, "column": 26 }, "end": { - "line": 23, + "line": 39, "column": 40 } } @@ -1774,11 +1867,11 @@ "properties": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 44 }, "end": { - "line": 23, + "line": 39, "column": 46 } } @@ -1788,11 +1881,11 @@ "value": true, "loc": { "start": { - "line": 23, + "line": 39, "column": 48 }, "end": { - "line": 23, + "line": 39, "column": 52 } } @@ -1800,22 +1893,22 @@ ], "loc": { "start": { - "line": 23, + "line": 39, "column": 43 }, "end": { - "line": 23, + "line": 39, "column": 53 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 26 }, "end": { - "line": 23, + "line": 39, "column": 53 } } @@ -1828,22 +1921,22 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 58 }, "end": { - "line": 23, + "line": 39, "column": 63 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 55 }, "end": { - "line": 23, + "line": 39, "column": 63 } } @@ -1851,11 +1944,11 @@ ], "loc": { "start": { - "line": 23, + "line": 39, "column": 5 }, "end": { - "line": 23, + "line": 39, "column": 64 } } @@ -1868,11 +1961,11 @@ "value": 3, "loc": { "start": { - "line": 23, + "line": 39, "column": 68 }, "end": { - "line": 23, + "line": 39, "column": 69 } } @@ -1885,11 +1978,11 @@ "value": true, "loc": { "start": { - "line": 23, + "line": 39, "column": 72 }, "end": { - "line": 23, + "line": 39, "column": 76 } } @@ -1899,11 +1992,11 @@ "properties": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 78 }, "end": { - "line": 23, + "line": 39, "column": 80 } } @@ -1911,11 +2004,11 @@ ], "loc": { "start": { - "line": 23, + "line": 39, "column": 71 }, "end": { - "line": 23, + "line": 39, "column": 81 } } @@ -1932,14 +2025,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 39, + "column": 96 + }, + "end": { + "line": 39, + "column": 99 + } + } + }, "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 93 }, "end": { - "line": 23, + "line": 39, "column": 94 } } @@ -1947,15 +2053,28 @@ { "type": "Identifier", "name": "b", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 39, + "column": 104 + }, + "end": { + "line": 39, + "column": 107 + } + } + }, "decorators": [], "loc": { "start": { - "line": 23, - "column": 96 + "line": 39, + "column": 101 }, "end": { - "line": 23, - "column": 97 + "line": 39, + "column": 102 } } } @@ -1964,12 +2083,12 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 23, - "column": 100 + "line": 39, + "column": 110 }, "end": { - "line": 23, - "column": 106 + "line": 39, + "column": 116 } } }, @@ -1983,94 +2102,94 @@ "value": 12, "loc": { "start": { - "line": 23, - "column": 116 + "line": 39, + "column": 126 }, "end": { - "line": 23, - "column": 118 + "line": 39, + "column": 128 } } }, "loc": { "start": { - "line": 23, - "column": 109 + "line": 39, + "column": 119 }, "end": { - "line": 23, - "column": 118 + "line": 39, + "column": 128 } } } ], "loc": { "start": { - "line": 23, - "column": 107 + "line": 39, + "column": 117 }, "end": { - "line": 23, - "column": 120 + "line": 39, + "column": 130 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 83 }, "end": { - "line": 23, - "column": 120 + "line": 39, + "column": 130 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 83 }, "end": { - "line": 23, - "column": 120 + "line": 39, + "column": 130 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 23, - "column": 122 + "line": 39, + "column": 132 }, "end": { - "line": 23, - "column": 127 + "line": 39, + "column": 137 } } } ], "loc": { "start": { - "line": 23, + "line": 39, "column": 67 }, "end": { - "line": 23, - "column": 128 + "line": 39, + "column": 138 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 5 }, "end": { - "line": 23, - "column": 128 + "line": 39, + "column": 138 } } } @@ -2078,12 +2197,12 @@ "kind": "var", "loc": { "start": { - "line": 23, + "line": 39, "column": 1 }, "end": { - "line": 23, - "column": 129 + "line": 39, + "column": 139 } } }, @@ -2098,11 +2217,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 6 } } @@ -2112,33 +2231,33 @@ "value": 5, "loc": { "start": { - "line": 24, + "line": 40, "column": 9 }, "end": { - "line": 24, + "line": 40, "column": 10 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 10 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 11 } } @@ -2154,11 +2273,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 1 }, "end": { - "line": 25, + "line": 41, "column": 6 } } @@ -2171,25 +2290,25 @@ "value": 2, "loc": { "start": { - "line": 25, + "line": 41, "column": 10 }, "end": { - "line": 25, + "line": 41, "column": 11 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 25, + "line": 41, "column": 13 }, "end": { - "line": 25, + "line": 41, "column": 18 } } @@ -2197,33 +2316,33 @@ ], "loc": { "start": { - "line": 25, + "line": 41, "column": 9 }, "end": { - "line": 25, + "line": 41, "column": 19 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 1 }, "end": { - "line": 25, + "line": 41, "column": 19 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 1 }, "end": { - "line": 25, + "line": 41, "column": 20 } } @@ -2239,11 +2358,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 6 } } @@ -2253,33 +2372,33 @@ "properties": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 9 }, "end": { - "line": 26, + "line": 42, "column": 11 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 11 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 12 } } @@ -2295,11 +2414,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 1 }, "end": { - "line": 27, + "line": 43, "column": 6 } } @@ -2309,33 +2428,33 @@ "value": false, "loc": { "start": { - "line": 27, + "line": 43, "column": 9 }, "end": { - "line": 27, + "line": 43, "column": 14 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 1 }, "end": { - "line": 27, + "line": 43, "column": 14 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 1 }, "end": { - "line": 27, + "line": 43, "column": 15 } } @@ -2351,11 +2470,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 1 }, "end": { - "line": 28, + "line": 44, "column": 6 } } @@ -2366,33 +2485,33 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 9 }, "end": { - "line": 28, + "line": 44, "column": 14 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 1 }, "end": { - "line": 28, + "line": 44, "column": 14 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 1 }, "end": { - "line": 28, + "line": 44, "column": 15 } } @@ -2418,11 +2537,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 17 }, "end": { - "line": 29, + "line": 45, "column": 20 } } @@ -2430,11 +2549,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 14 }, "end": { - "line": 29, + "line": 45, "column": 15 } } @@ -2446,11 +2565,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 25 }, "end": { - "line": 29, + "line": 45, "column": 28 } } @@ -2458,11 +2577,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 22 }, "end": { - "line": 29, + "line": 45, "column": 23 } } @@ -2472,22 +2591,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 33 }, "end": { - "line": 29, + "line": 45, "column": 39 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 13 }, "end": { - "line": 29, + "line": 45, "column": 40 } } @@ -2496,11 +2615,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 41 }, "end": { - "line": 29, + "line": 45, "column": 48 } } @@ -2508,11 +2627,11 @@ ], "loc": { "start": { - "line": 29, + "line": 45, "column": 12 }, "end": { - "line": 29, + "line": 45, "column": 48 } } @@ -2520,11 +2639,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 10 } } @@ -2532,11 +2651,11 @@ "init": null, "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 10 } } @@ -2545,11 +2664,11 @@ "kind": "var", "loc": { "start": { - "line": 29, + "line": 45, "column": 1 }, "end": { - "line": 29, + "line": 45, "column": 49 } } @@ -2568,11 +2687,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 6 }, "end": { - "line": 31, + "line": 47, "column": 11 } } @@ -2585,11 +2704,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 13 }, "end": { - "line": 31, + "line": 47, "column": 18 } } @@ -2599,22 +2718,22 @@ "value": 6, "loc": { "start": { - "line": 31, + "line": 47, "column": 21 }, "end": { - "line": 31, + "line": 47, "column": 22 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 13 }, "end": { - "line": 31, + "line": 47, "column": 22 } } @@ -2625,11 +2744,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 24 }, "end": { - "line": 31, + "line": 47, "column": 29 } } @@ -2642,11 +2761,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 33 }, "end": { - "line": 31, + "line": 47, "column": 40 } } @@ -2658,11 +2777,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 41 }, "end": { - "line": 31, + "line": 47, "column": 47 } } @@ -2671,11 +2790,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 50 }, "end": { - "line": 31, + "line": 47, "column": 56 } } @@ -2683,11 +2802,11 @@ ], "loc": { "start": { - "line": 31, + "line": 47, "column": 41 }, "end": { - "line": 31, + "line": 47, "column": 57 } } @@ -2698,22 +2817,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 58 }, "end": { - "line": 31, + "line": 47, "column": 65 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 58 }, "end": { - "line": 31, + "line": 47, "column": 68 } } @@ -2721,22 +2840,22 @@ ], "loc": { "start": { - "line": 31, + "line": 47, "column": 32 }, "end": { - "line": 31, + "line": 47, "column": 68 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 5 }, "end": { - "line": 31, + "line": 47, "column": 30 } } @@ -2749,25 +2868,25 @@ "value": 1, "loc": { "start": { - "line": 31, + "line": 47, "column": 72 }, "end": { - "line": 31, + "line": 47, "column": 73 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 31, + "line": 47, "column": 75 }, "end": { - "line": 31, + "line": 47, "column": 80 } } @@ -2780,11 +2899,11 @@ "value": true, "loc": { "start": { - "line": 31, + "line": 47, "column": 83 }, "end": { - "line": 31, + "line": 47, "column": 87 } } @@ -2794,11 +2913,11 @@ "value": false, "loc": { "start": { - "line": 31, + "line": 47, "column": 89 }, "end": { - "line": 31, + "line": 47, "column": 94 } } @@ -2806,11 +2925,11 @@ ], "loc": { "start": { - "line": 31, + "line": 47, "column": 82 }, "end": { - "line": 31, + "line": 47, "column": 95 } } @@ -2818,22 +2937,22 @@ ], "loc": { "start": { - "line": 31, + "line": 47, "column": 71 }, "end": { - "line": 31, + "line": 47, "column": 96 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 5 }, "end": { - "line": 31, + "line": 47, "column": 96 } } @@ -2842,11 +2961,11 @@ "kind": "var", "loc": { "start": { - "line": 31, + "line": 47, "column": 1 }, "end": { - "line": 31, + "line": 47, "column": 97 } } @@ -2865,11 +2984,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 6 }, "end": { - "line": 32, + "line": 48, "column": 11 } } @@ -2878,11 +2997,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 32, + "line": 48, "column": 13 }, "end": { - "line": 32, + "line": 48, "column": 14 } } @@ -2893,11 +3012,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 15 }, "end": { - "line": 32, + "line": 48, "column": 20 } } @@ -2912,22 +3031,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 23 }, "end": { - "line": 32, + "line": 48, "column": 29 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 23 }, "end": { - "line": 32, + "line": 48, "column": 31 } } @@ -2939,11 +3058,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 35 }, "end": { - "line": 32, + "line": 48, "column": 42 } } @@ -2952,11 +3071,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 43 }, "end": { - "line": 32, + "line": 48, "column": 50 } } @@ -2965,11 +3084,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 51 }, "end": { - "line": 32, + "line": 48, "column": 58 } } @@ -2977,11 +3096,11 @@ ], "loc": { "start": { - "line": 32, + "line": 48, "column": 34 }, "end": { - "line": 32, + "line": 48, "column": 58 } } @@ -2989,22 +3108,22 @@ ], "loc": { "start": { - "line": 32, + "line": 48, "column": 23 }, "end": { - "line": 32, + "line": 48, "column": 58 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 5 }, "end": { - "line": 32, + "line": 48, "column": 21 } } @@ -3014,22 +3133,22 @@ "elements": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 61 }, "end": { - "line": 32, + "line": 48, "column": 63 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 5 }, "end": { - "line": 32, + "line": 48, "column": 63 } } @@ -3038,11 +3157,11 @@ "kind": "var", "loc": { "start": { - "line": 32, + "line": 48, "column": 1 }, "end": { - "line": 32, + "line": 48, "column": 64 } } @@ -3061,11 +3180,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 6 }, "end": { - "line": 33, + "line": 49, "column": 11 } } @@ -3078,11 +3197,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 13 }, "end": { - "line": 33, + "line": 49, "column": 18 } } @@ -3104,11 +3223,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 24 }, "end": { - "line": 33, + "line": 49, "column": 25 } } @@ -3118,11 +3237,11 @@ "value": 5, "loc": { "start": { - "line": 33, + "line": 49, "column": 27 }, "end": { - "line": 33, + "line": 49, "column": 28 } } @@ -3130,11 +3249,11 @@ "kind": "init", "loc": { "start": { - "line": 33, + "line": 49, "column": 24 }, "end": { - "line": 33, + "line": 49, "column": 28 } } @@ -3150,25 +3269,25 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 30 }, "end": { - "line": 33, + "line": 49, "column": 31 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 33, + "line": 49, "column": 33 }, "end": { - "line": 33, + "line": 49, "column": 38 } } @@ -3176,11 +3295,11 @@ "kind": "init", "loc": { "start": { - "line": 33, + "line": 49, "column": 30 }, "end": { - "line": 33, + "line": 49, "column": 38 } } @@ -3188,11 +3307,11 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 22 }, "end": { - "line": 33, + "line": 49, "column": 40 } } @@ -3202,11 +3321,11 @@ "value": false, "loc": { "start": { - "line": 33, + "line": 49, "column": 42 }, "end": { - "line": 33, + "line": 49, "column": 47 } } @@ -3214,22 +3333,22 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 21 }, "end": { - "line": 33, + "line": 49, "column": 48 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 13 }, "end": { - "line": 33, + "line": 49, "column": 48 } } @@ -3240,11 +3359,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 50 }, "end": { - "line": 33, + "line": 49, "column": 55 } } @@ -3259,22 +3378,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 58 }, "end": { - "line": 33, + "line": 49, "column": 64 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 58 }, "end": { - "line": 33, + "line": 49, "column": 66 } } @@ -3286,11 +3405,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 70 }, "end": { - "line": 33, + "line": 49, "column": 77 } } @@ -3304,15 +3423,104 @@ "types": [ { "type": "TSTypeLiteral", - "members": [], + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "optional": false, + "readonly": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 49, + "column": 81 + }, + "end": { + "line": 49, + "column": 82 + } + } + }, + "typeAnnotation": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 49, + "column": 84 + }, + "end": { + "line": 49, + "column": 90 + } + } + }, + "loc": { + "start": { + "line": 49, + "column": 81 + }, + "end": { + "line": 49, + "column": 91 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "optional": false, + "readonly": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 49, + "column": 92 + }, + "end": { + "line": 49, + "column": 93 + } + } + }, + "typeAnnotation": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 49, + "column": 95 + }, + "end": { + "line": 49, + "column": 101 + } + } + }, + "loc": { + "start": { + "line": 49, + "column": 92 + }, + "end": { + "line": 49, + "column": 103 + } + } + } + ], "loc": { "start": { - "line": 33, + "line": 49, "column": 79 }, "end": { - "line": 33, - "column": 81 + "line": 49, + "column": 103 } } }, @@ -3320,80 +3528,80 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 33, - "column": 84 + "line": 49, + "column": 106 }, "end": { - "line": 33, - "column": 91 + "line": 49, + "column": 113 } } } ], "loc": { "start": { - "line": 33, + "line": 49, "column": 79 }, "end": { - "line": 33, - "column": 91 + "line": 49, + "column": 113 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 78 }, "end": { - "line": 33, - "column": 92 + "line": 49, + "column": 114 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 78 }, "end": { - "line": 33, - "column": 95 + "line": 49, + "column": 117 } } } ], "loc": { "start": { - "line": 33, + "line": 49, "column": 69 }, "end": { - "line": 33, - "column": 95 + "line": 49, + "column": 117 } } } ], "loc": { "start": { - "line": 33, + "line": 49, "column": 58 }, "end": { - "line": 33, - "column": 95 + "line": 49, + "column": 117 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, + "line": 49, "column": 56 } } @@ -3406,12 +3614,12 @@ "value": 1, "loc": { "start": { - "line": 33, - "column": 99 + "line": 49, + "column": 121 }, "end": { - "line": 33, - "column": 100 + "line": 49, + "column": 122 } } }, @@ -3420,64 +3628,157 @@ "elements": [ { "type": "ObjectExpression", - "properties": [], - "loc": { - "start": { - "line": 33, - "column": 103 - }, - "end": { - "line": 33, - "column": 105 - } - } - }, - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 33, - "column": 107 + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 49, + "column": 127 + }, + "end": { + "line": 49, + "column": 128 + } + } + }, + "value": { + "type": "NumberLiteral", + "value": 1, + "loc": { + "start": { + "line": 49, + "column": 130 + }, + "end": { + "line": 49, + "column": 131 + } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 49, + "column": 127 + }, + "end": { + "line": 49, + "column": 131 + } + } }, - "end": { - "line": 33, - "column": 111 - } - } - } - ], - "loc": { + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 49, + "column": 133 + }, + "end": { + "line": 49, + "column": 134 + } + } + }, + "value": { + "type": "StringLiteral", + "value": "bat", + "loc": { + "start": { + "line": 49, + "column": 136 + }, + "end": { + "line": 49, + "column": 141 + } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 49, + "column": 133 + }, + "end": { + "line": 49, + "column": 141 + } + } + } + ], + "loc": { + "start": { + "line": 49, + "column": 125 + }, + "end": { + "line": 49, + "column": 143 + } + } + }, + { + "type": "BooleanLiteral", + "value": true, + "loc": { + "start": { + "line": 49, + "column": 145 + }, + "end": { + "line": 49, + "column": 149 + } + } + } + ], + "loc": { "start": { - "line": 33, - "column": 102 + "line": 49, + "column": 124 }, "end": { - "line": 33, - "column": 112 + "line": 49, + "column": 150 } } } ], "loc": { "start": { - "line": 33, - "column": 98 + "line": 49, + "column": 120 }, "end": { - "line": 33, - "column": 113 + "line": 49, + "column": 151 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, - "column": 113 + "line": 49, + "column": 151 } } } @@ -3485,12 +3786,12 @@ "kind": "var", "loc": { "start": { - "line": 33, + "line": 49, "column": 1 }, "end": { - "line": 33, - "column": 114 + "line": 49, + "column": 152 } } }, @@ -3513,11 +3814,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 7 }, "end": { - "line": 34, + "line": 50, "column": 12 } } @@ -3528,11 +3829,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 14 }, "end": { - "line": 34, + "line": 50, "column": 19 } } @@ -3540,11 +3841,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 6 }, "end": { - "line": 34, + "line": 50, "column": 20 } } @@ -3554,14 +3855,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 34, + "line": 50, "column": 24 }, "end": { - "line": 34, + "line": 50, "column": 29 } } @@ -3571,11 +3872,11 @@ "properties": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 31 }, "end": { - "line": 34, + "line": 50, "column": 33 } } @@ -3583,22 +3884,22 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 23 }, "end": { - "line": 34, + "line": 50, "column": 34 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 6 }, "end": { - "line": 34, + "line": 50, "column": 34 } } @@ -3615,11 +3916,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 38 }, "end": { - "line": 34, + "line": 50, "column": 43 } } @@ -3627,11 +3928,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 37 }, "end": { - "line": 34, + "line": 50, "column": 44 } } @@ -3639,11 +3940,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 36 }, "end": { - "line": 34, + "line": 50, "column": 45 } } @@ -3662,44 +3963,44 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 48 }, "end": { - "line": 34, + "line": 50, "column": 54 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 48 }, "end": { - "line": 34, + "line": 50, "column": 56 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 48 }, "end": { - "line": 34, + "line": 50, "column": 58 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 48 }, "end": { - "line": 34, + "line": 50, "column": 60 } } @@ -3717,11 +4018,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 65 }, "end": { - "line": 34, + "line": 50, "column": 71 } } @@ -3730,11 +4031,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 74 }, "end": { - "line": 34, + "line": 50, "column": 80 } } @@ -3742,11 +4043,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 65 }, "end": { - "line": 34, + "line": 50, "column": 81 } } @@ -3756,11 +4057,11 @@ "members": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 82 }, "end": { - "line": 34, + "line": 50, "column": 85 } } @@ -3768,11 +4069,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 64 }, "end": { - "line": 34, + "line": 50, "column": 86 } } @@ -3787,11 +4088,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 89 }, "end": { - "line": 34, + "line": 50, "column": 96 } } @@ -3799,11 +4100,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 88 }, "end": { - "line": 34, + "line": 50, "column": 97 } } @@ -3811,11 +4112,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 87 }, "end": { - "line": 34, + "line": 50, "column": 98 } } @@ -3823,11 +4124,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 63 }, "end": { - "line": 34, + "line": 50, "column": 98 } } @@ -3835,22 +4136,22 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 48 }, "end": { - "line": 34, + "line": 50, "column": 98 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 5 }, "end": { - "line": 34, + "line": 50, "column": 46 } } @@ -3866,11 +4167,11 @@ "value": 1, "loc": { "start": { - "line": 34, + "line": 50, "column": 103 }, "end": { - "line": 34, + "line": 50, "column": 104 } } @@ -3880,11 +4181,11 @@ "properties": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 106 }, "end": { - "line": 34, + "line": 50, "column": 108 } } @@ -3892,11 +4193,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 102 }, "end": { - "line": 34, + "line": 50, "column": 109 } } @@ -3912,11 +4213,11 @@ "value": 3, "loc": { "start": { - "line": 34, + "line": 50, "column": 113 }, "end": { - "line": 34, + "line": 50, "column": 114 } } @@ -3924,11 +4225,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 112 }, "end": { - "line": 34, + "line": 50, "column": 115 } } @@ -3936,11 +4237,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 111 }, "end": { - "line": 34, + "line": 50, "column": 116 } } @@ -3948,22 +4249,22 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 101 }, "end": { - "line": 34, + "line": 50, "column": 117 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 5 }, "end": { - "line": 34, + "line": 50, "column": 117 } } @@ -3972,11 +4273,11 @@ "kind": "var", "loc": { "start": { - "line": 34, + "line": 50, "column": 1 }, "end": { - "line": 34, + "line": 50, "column": 118 } } @@ -3997,11 +4298,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 6 }, "end": { - "line": 35, + "line": 51, "column": 11 } } @@ -4011,22 +4312,22 @@ "properties": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 14 }, "end": { - "line": 35, + "line": 51, "column": 16 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 6 }, "end": { - "line": 35, + "line": 51, "column": 16 } } @@ -4045,11 +4346,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 20 }, "end": { - "line": 35, + "line": 51, "column": 25 } } @@ -4060,11 +4361,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 20 }, "end": { - "line": 35, + "line": 51, "column": 25 } } @@ -4072,11 +4373,11 @@ "kind": "init", "loc": { "start": { - "line": 35, + "line": 51, "column": 20 }, "end": { - "line": 35, + "line": 51, "column": 25 } } @@ -4084,11 +4385,11 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 18 }, "end": { - "line": 35, + "line": 51, "column": 27 } } @@ -4101,22 +4402,22 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 32 }, "end": { - "line": 35, + "line": 51, "column": 37 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 29 }, "end": { - "line": 35, + "line": 51, "column": 37 } } @@ -4130,11 +4431,11 @@ "members": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 41 }, "end": { - "line": 35, + "line": 51, "column": 44 } } @@ -4153,11 +4454,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 47 }, "end": { - "line": 35, + "line": 51, "column": 52 } } @@ -4166,22 +4467,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 54 }, "end": { - "line": 35, + "line": 51, "column": 60 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 47 }, "end": { - "line": 35, + "line": 51, "column": 62 } } @@ -4189,88 +4490,60 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 45 }, "end": { - "line": 35, + "line": 51, "column": 63 } } }, { - "type": "TSLiteralType", - "literal": { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 35, - "column": 64 - }, - "end": { - "line": 35, - "column": 65 - } - } - }, + "type": "TSNumberKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 64 }, "end": { - "line": 35, - "column": 66 + "line": 51, + "column": 71 } } }, { - "type": "TSLiteralType", - "literal": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 35, - "column": 67 - }, - "end": { - "line": 35, - "column": 72 - } - } - }, + "type": "TSStringKeyword", "loc": { "start": { - "line": 35, - "column": 67 + "line": 51, + "column": 72 }, "end": { - "line": 35, - "column": 73 + "line": 51, + "column": 79 } } } ], "loc": { "start": { - "line": 35, + "line": 51, "column": 40 }, "end": { - "line": 35, - "column": 73 + "line": 51, + "column": 79 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 38 } } @@ -4283,12 +4556,12 @@ "properties": [], "loc": { "start": { - "line": 35, - "column": 77 + "line": 51, + "column": 83 }, "end": { - "line": 35, - "column": 79 + "line": 51, + "column": 85 } } }, @@ -4306,12 +4579,12 @@ "decorators": [], "loc": { "start": { - "line": 35, - "column": 83 + "line": 51, + "column": 89 }, "end": { - "line": 35, - "column": 88 + "line": 51, + "column": 94 } } }, @@ -4320,36 +4593,36 @@ "value": 5, "loc": { "start": { - "line": 35, - "column": 90 + "line": 51, + "column": 96 }, "end": { - "line": 35, - "column": 91 + "line": 51, + "column": 97 } } }, "kind": "init", "loc": { "start": { - "line": 35, - "column": 83 + "line": 51, + "column": 89 }, "end": { - "line": 35, - "column": 91 + "line": 51, + "column": 97 } } } ], "loc": { "start": { - "line": 35, - "column": 81 + "line": 51, + "column": 87 }, "end": { - "line": 35, - "column": 93 + "line": 51, + "column": 99 } } }, @@ -4358,49 +4631,49 @@ "value": 1, "loc": { "start": { - "line": 35, - "column": 95 + "line": 51, + "column": 101 }, "end": { - "line": 35, - "column": 96 + "line": 51, + "column": 102 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 35, - "column": 98 + "line": 51, + "column": 104 }, "end": { - "line": 35, - "column": 103 + "line": 51, + "column": 109 } } } ], "loc": { "start": { - "line": 35, - "column": 76 + "line": 51, + "column": 82 }, "end": { - "line": 35, - "column": 104 + "line": 51, + "column": 110 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, - "column": 104 + "line": 51, + "column": 110 } } } @@ -4408,12 +4681,12 @@ "kind": "var", "loc": { "start": { - "line": 35, + "line": 51, "column": 1 }, "end": { - "line": 35, - "column": 105 + "line": 51, + "column": 111 } } }, @@ -4429,23 +4702,23 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 37, - "column": 11 + "line": 53, + "column": 12 }, "end": { - "line": 37, - "column": 17 + "line": 53, + "column": 18 } } }, "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 10 } } @@ -4453,11 +4726,11 @@ "init": null, "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 10 } } @@ -4466,12 +4739,12 @@ "kind": "var", "loc": { "start": { - "line": 37, + "line": 53, "column": 1 }, "end": { - "line": 37, - "column": 18 + "line": 53, + "column": 19 } } }, @@ -4487,23 +4760,23 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 38, - "column": 11 + "line": 54, + "column": 12 }, "end": { - "line": 38, - "column": 18 + "line": 54, + "column": 19 } } }, "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 5 }, "end": { - "line": 38, + "line": 54, "column": 10 } } @@ -4511,11 +4784,11 @@ "init": null, "loc": { "start": { - "line": 38, + "line": 54, "column": 5 }, "end": { - "line": 38, + "line": 54, "column": 10 } } @@ -4524,12 +4797,12 @@ "kind": "var", "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 38, - "column": 19 + "line": 54, + "column": 20 } } }, @@ -4547,11 +4820,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 2 }, "end": { - "line": 40, + "line": 56, "column": 7 } } @@ -4562,11 +4835,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 9 }, "end": { - "line": 40, + "line": 56, "column": 14 } } @@ -4574,11 +4847,11 @@ ], "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 15 } } @@ -4592,11 +4865,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 19 }, "end": { - "line": 40, + "line": 56, "column": 24 } } @@ -4606,11 +4879,11 @@ "value": true, "loc": { "start": { - "line": 40, + "line": 56, "column": 26 }, "end": { - "line": 40, + "line": 56, "column": 30 } } @@ -4618,33 +4891,33 @@ ], "loc": { "start": { - "line": 40, + "line": 56, "column": 18 }, "end": { - "line": 40, + "line": 56, "column": 31 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 31 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 32 } } @@ -4663,11 +4936,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 2 }, "end": { - "line": 41, + "line": 57, "column": 7 } } @@ -4678,11 +4951,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 9 }, "end": { - "line": 41, + "line": 57, "column": 14 } } @@ -4690,11 +4963,11 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 15 } } @@ -4707,11 +4980,11 @@ "value": 5, "loc": { "start": { - "line": 41, + "line": 57, "column": 19 }, "end": { - "line": 41, + "line": 57, "column": 20 } } @@ -4721,11 +4994,11 @@ "value": 6, "loc": { "start": { - "line": 41, + "line": 57, "column": 22 }, "end": { - "line": 41, + "line": 57, "column": 23 } } @@ -4733,33 +5006,33 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 18 }, "end": { - "line": 41, + "line": 57, "column": 24 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 24 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 25 } } @@ -4778,11 +5051,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 2 }, "end": { - "line": 42, + "line": 58, "column": 7 } } @@ -4793,11 +5066,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 9 }, "end": { - "line": 42, + "line": 58, "column": 14 } } @@ -4805,11 +5078,11 @@ ], "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 42, + "line": 58, "column": 15 } } @@ -4823,11 +5096,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 19 }, "end": { - "line": 42, + "line": 58, "column": 24 } } @@ -4837,11 +5110,11 @@ "value": true, "loc": { "start": { - "line": 42, + "line": 58, "column": 26 }, "end": { - "line": 42, + "line": 58, "column": 30 } } @@ -4851,11 +5124,11 @@ "value": false, "loc": { "start": { - "line": 42, + "line": 58, "column": 32 }, "end": { - "line": 42, + "line": 58, "column": 37 } } @@ -4865,11 +5138,11 @@ "value": 5, "loc": { "start": { - "line": 42, + "line": 58, "column": 39 }, "end": { - "line": 42, + "line": 58, "column": 40 } } @@ -4877,33 +5150,33 @@ ], "loc": { "start": { - "line": 42, + "line": 58, "column": 18 }, "end": { - "line": 42, + "line": 58, "column": 41 } } }, "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 42, + "line": 58, "column": 41 } } }, "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 42, + "line": 58, "column": 42 } } @@ -4920,11 +5193,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 12 }, "end": { - "line": 44, + "line": 60, "column": 18 } } @@ -4932,11 +5205,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 5 }, "end": { - "line": 44, + "line": 60, "column": 10 } } @@ -4944,11 +5217,11 @@ "init": null, "loc": { "start": { - "line": 44, + "line": 60, "column": 5 }, "end": { - "line": 44, + "line": 60, "column": 10 } } @@ -4957,11 +5230,11 @@ "kind": "var", "loc": { "start": { - "line": 44, + "line": 60, "column": 1 }, "end": { - "line": 44, + "line": 60, "column": 19 } } @@ -4978,11 +5251,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 45, + "line": 61, "column": 12 }, "end": { - "line": 45, + "line": 61, "column": 19 } } @@ -4990,11 +5263,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 10 } } @@ -5002,11 +5275,11 @@ "init": null, "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 10 } } @@ -5015,11 +5288,11 @@ "kind": "var", "loc": { "start": { - "line": 45, + "line": 61, "column": 1 }, "end": { - "line": 45, + "line": 61, "column": 20 } } @@ -5038,11 +5311,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 2 }, "end": { - "line": 47, + "line": 63, "column": 7 } } @@ -5053,11 +5326,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 9 }, "end": { - "line": 47, + "line": 63, "column": 14 } } @@ -5065,11 +5338,11 @@ ], "loc": { "start": { - "line": 47, + "line": 63, "column": 1 }, "end": { - "line": 47, + "line": 63, "column": 15 } } @@ -5083,11 +5356,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 19 }, "end": { - "line": 47, + "line": 63, "column": 24 } } @@ -5098,11 +5371,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 26 }, "end": { - "line": 47, + "line": 63, "column": 31 } } @@ -5110,33 +5383,33 @@ ], "loc": { "start": { - "line": 47, + "line": 63, "column": 18 }, "end": { - "line": 47, + "line": 63, "column": 32 } } }, "loc": { "start": { - "line": 47, + "line": 63, "column": 1 }, "end": { - "line": 47, + "line": 63, "column": 32 } } }, "loc": { "start": { - "line": 47, + "line": 63, "column": 1 }, "end": { - "line": 47, + "line": 63, "column": 33 } } @@ -5156,11 +5429,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 12 }, "end": { - "line": 49, + "line": 65, "column": 18 } } @@ -5169,11 +5442,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 21 }, "end": { - "line": 49, + "line": 65, "column": 27 } } @@ -5181,11 +5454,11 @@ ], "loc": { "start": { - "line": 49, + "line": 65, "column": 12 }, "end": { - "line": 49, + "line": 65, "column": 27 } } @@ -5193,11 +5466,11 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 5 }, "end": { - "line": 49, + "line": 65, "column": 10 } } @@ -5205,11 +5478,11 @@ "init": null, "loc": { "start": { - "line": 49, + "line": 65, "column": 5 }, "end": { - "line": 49, + "line": 65, "column": 10 } } @@ -5218,11 +5491,11 @@ "kind": "var", "loc": { "start": { - "line": 49, + "line": 65, "column": 1 }, "end": { - "line": 49, + "line": 65, "column": 28 } } @@ -5243,11 +5516,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 2 }, "end": { - "line": 51, + "line": 67, "column": 7 } } @@ -5257,22 +5530,22 @@ "value": 2, "loc": { "start": { - "line": 51, + "line": 67, "column": 10 }, "end": { - "line": 51, + "line": 67, "column": 11 } } }, "loc": { "start": { - "line": 51, + "line": 67, "column": 2 }, "end": { - "line": 51, + "line": 67, "column": 11 } } @@ -5280,11 +5553,11 @@ ], "loc": { "start": { - "line": 51, + "line": 67, "column": 1 }, "end": { - "line": 51, + "line": 67, "column": 12 } } @@ -5294,14 +5567,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 51, + "line": 67, "column": 16 }, "end": { - "line": 51, + "line": 67, "column": 21 } } @@ -5309,33 +5582,33 @@ ], "loc": { "start": { - "line": 51, + "line": 67, "column": 15 }, "end": { - "line": 51, + "line": 67, "column": 22 } } }, "loc": { "start": { - "line": 51, + "line": 67, "column": 1 }, "end": { - "line": 51, + "line": 67, "column": 22 } } }, "loc": { "start": { - "line": 51, + "line": 67, "column": 1 }, "end": { - "line": 51, + "line": 67, "column": 23 } } @@ -5352,11 +5625,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 12 }, "end": { - "line": 53, + "line": 69, "column": 18 } } @@ -5364,11 +5637,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 5 }, "end": { - "line": 53, + "line": 69, "column": 10 } } @@ -5376,11 +5649,11 @@ "init": null, "loc": { "start": { - "line": 53, + "line": 69, "column": 5 }, "end": { - "line": 53, + "line": 69, "column": 10 } } @@ -5389,11 +5662,11 @@ "kind": "var", "loc": { "start": { - "line": 53, + "line": 69, "column": 1 }, "end": { - "line": 53, + "line": 69, "column": 19 } } @@ -5410,11 +5683,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 54, + "line": 70, "column": 12 }, "end": { - "line": 54, + "line": 70, "column": 18 } } @@ -5422,11 +5695,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 5 }, "end": { - "line": 54, + "line": 70, "column": 10 } } @@ -5434,11 +5707,11 @@ "init": null, "loc": { "start": { - "line": 54, + "line": 70, "column": 5 }, "end": { - "line": 54, + "line": 70, "column": 10 } } @@ -5447,11 +5720,11 @@ "kind": "var", "loc": { "start": { - "line": 54, + "line": 70, "column": 1 }, "end": { - "line": 54, + "line": 70, "column": 19 } } @@ -5468,11 +5741,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 55, + "line": 71, "column": 12 }, "end": { - "line": 55, + "line": 71, "column": 19 } } @@ -5480,11 +5753,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 10 } } @@ -5492,11 +5765,11 @@ "init": null, "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 10 } } @@ -5505,11 +5778,11 @@ "kind": "var", "loc": { "start": { - "line": 55, + "line": 71, "column": 1 }, "end": { - "line": 55, + "line": 71, "column": 20 } } @@ -5530,11 +5803,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 2 }, "end": { - "line": 56, + "line": 72, "column": 7 } } @@ -5544,22 +5817,22 @@ "value": 1, "loc": { "start": { - "line": 56, + "line": 72, "column": 10 }, "end": { - "line": 56, + "line": 72, "column": 11 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 2 }, "end": { - "line": 56, + "line": 72, "column": 11 } } @@ -5572,36 +5845,36 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 13 }, "end": { - "line": 56, + "line": 72, "column": 18 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "asd", "loc": { "start": { - "line": 56, + "line": 72, "column": 21 }, "end": { - "line": 56, + "line": 72, "column": 26 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 13 }, "end": { - "line": 56, + "line": 72, "column": 26 } } @@ -5614,11 +5887,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 28 }, "end": { - "line": 56, + "line": 72, "column": 33 } } @@ -5628,22 +5901,22 @@ "value": true, "loc": { "start": { - "line": 56, + "line": 72, "column": 36 }, "end": { - "line": 56, + "line": 72, "column": 40 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 28 }, "end": { - "line": 56, + "line": 72, "column": 40 } } @@ -5651,11 +5924,11 @@ ], "loc": { "start": { - "line": 56, + "line": 72, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 41 } } @@ -5665,33 +5938,33 @@ "elements": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 44 }, "end": { - "line": 56, + "line": 72, "column": 46 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 46 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 47 } } @@ -5707,11 +5980,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 10 } } @@ -5721,22 +5994,22 @@ "properties": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 13 }, "end": { - "line": 58, + "line": 74, "column": 15 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 15 } } @@ -5745,11 +6018,11 @@ "kind": "var", "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 16 } } @@ -5765,11 +6038,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 5 }, "end": { - "line": 59, + "line": 75, "column": 10 } } @@ -5780,22 +6053,22 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 13 }, "end": { - "line": 59, + "line": 75, "column": 18 } } }, "loc": { "start": { - "line": 59, + "line": 75, "column": 5 }, "end": { - "line": 59, + "line": 75, "column": 18 } } @@ -5804,11 +6077,11 @@ "kind": "var", "loc": { "start": { - "line": 59, + "line": 75, "column": 1 }, "end": { - "line": 59, + "line": 75, "column": 19 } } @@ -5824,11 +6097,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 5 }, "end": { - "line": 60, + "line": 76, "column": 10 } } @@ -5839,22 +6112,22 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 13 }, "end": { - "line": 60, + "line": 76, "column": 18 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 5 }, "end": { - "line": 60, + "line": 76, "column": 18 } } @@ -5863,11 +6136,11 @@ "kind": "var", "loc": { "start": { - "line": 60, + "line": 76, "column": 1 }, "end": { - "line": 60, + "line": 76, "column": 19 } } @@ -5883,11 +6156,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 5 }, "end": { - "line": 61, + "line": 77, "column": 10 } } @@ -5897,22 +6170,22 @@ "elements": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 13 }, "end": { - "line": 61, + "line": 77, "column": 15 } } }, "loc": { "start": { - "line": 61, + "line": 77, "column": 5 }, "end": { - "line": 61, + "line": 77, "column": 15 } } @@ -5921,11 +6194,11 @@ "kind": "var", "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 16 } } @@ -5944,11 +6217,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 2 }, "end": { - "line": 62, + "line": 78, "column": 7 } } @@ -5962,11 +6235,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 10 }, "end": { - "line": 62, + "line": 78, "column": 15 } } @@ -5975,11 +6248,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 62, + "line": 78, "column": 17 }, "end": { - "line": 62, + "line": 78, "column": 18 } } @@ -5992,36 +6265,36 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 19 }, "end": { - "line": 62, + "line": 78, "column": 24 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 62, + "line": 78, "column": 27 }, "end": { - "line": 62, + "line": 78, "column": 32 } } }, "loc": { "start": { - "line": 62, + "line": 78, "column": 19 }, "end": { - "line": 62, + "line": 78, "column": 32 } } @@ -6029,11 +6302,11 @@ ], "loc": { "start": { - "line": 62, + "line": 78, "column": 9 }, "end": { - "line": 62, + "line": 78, "column": 33 } } @@ -6046,22 +6319,22 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 38 }, "end": { - "line": 62, + "line": 78, "column": 43 } } }, "loc": { "start": { - "line": 62, + "line": 78, "column": 35 }, "end": { - "line": 62, + "line": 78, "column": 43 } } @@ -6069,11 +6342,11 @@ ], "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 44 } } @@ -6086,11 +6359,11 @@ "properties": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 48 }, "end": { - "line": 62, + "line": 78, "column": 50 } } @@ -6103,11 +6376,11 @@ "value": 42, "loc": { "start": { - "line": 62, + "line": 78, "column": 53 }, "end": { - "line": 62, + "line": 78, "column": 55 } } @@ -6116,11 +6389,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 62, + "line": 78, "column": 57 }, "end": { - "line": 62, + "line": 78, "column": 58 } } @@ -6130,14 +6403,14 @@ "operator": "+", "left": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 62, + "line": 78, "column": 59 }, "end": { - "line": 62, + "line": 78, "column": 64 } } @@ -6147,22 +6420,22 @@ "value": 2, "loc": { "start": { - "line": 62, + "line": 78, "column": 67 }, "end": { - "line": 62, + "line": 78, "column": 68 } } }, "loc": { "start": { - "line": 62, + "line": 78, "column": 59 }, "end": { - "line": 62, + "line": 78, "column": 68 } } @@ -6170,11 +6443,11 @@ ], "loc": { "start": { - "line": 62, + "line": 78, "column": 52 }, "end": { - "line": 62, + "line": 78, "column": 69 } } @@ -6182,33 +6455,33 @@ ], "loc": { "start": { - "line": 62, + "line": 78, "column": 47 }, "end": { - "line": 62, + "line": 78, "column": 70 } } }, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 70 } } }, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 71 } } @@ -6227,11 +6500,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 2 }, "end": { - "line": 63, + "line": 79, "column": 7 } } @@ -6245,11 +6518,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 10 }, "end": { - "line": 63, + "line": 79, "column": 15 } } @@ -6258,11 +6531,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 63, + "line": 79, "column": 17 }, "end": { - "line": 63, + "line": 79, "column": 18 } } @@ -6275,36 +6548,36 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 19 }, "end": { - "line": 63, + "line": 79, "column": 24 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 63, + "line": 79, "column": 27 }, "end": { - "line": 63, + "line": 79, "column": 32 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 19 }, "end": { - "line": 63, + "line": 79, "column": 32 } } @@ -6312,11 +6585,11 @@ ], "loc": { "start": { - "line": 63, + "line": 79, "column": 9 }, "end": { - "line": 63, + "line": 79, "column": 33 } } @@ -6329,22 +6602,22 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 38 }, "end": { - "line": 63, + "line": 79, "column": 43 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 35 }, "end": { - "line": 63, + "line": 79, "column": 43 } } @@ -6352,11 +6625,11 @@ ], "loc": { "start": { - "line": 63, + "line": 79, "column": 1 }, "end": { - "line": 63, + "line": 79, "column": 44 } } @@ -6369,11 +6642,11 @@ "properties": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 48 }, "end": { - "line": 63, + "line": 79, "column": 50 } } @@ -6386,11 +6659,11 @@ "value": 42, "loc": { "start": { - "line": 63, + "line": 79, "column": 53 }, "end": { - "line": 63, + "line": 79, "column": 55 } } @@ -6399,11 +6672,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 63, + "line": 79, "column": 57 }, "end": { - "line": 63, + "line": 79, "column": 58 } } @@ -6413,14 +6686,14 @@ "operator": "+", "left": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 63, + "line": 79, "column": 59 }, "end": { - "line": 63, + "line": 79, "column": 64 } } @@ -6430,22 +6703,22 @@ "value": 2, "loc": { "start": { - "line": 63, + "line": 79, "column": 67 }, "end": { - "line": 63, + "line": 79, "column": 68 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 59 }, "end": { - "line": 63, + "line": 79, "column": 68 } } @@ -6453,11 +6726,11 @@ ], "loc": { "start": { - "line": 63, + "line": 79, "column": 52 }, "end": { - "line": 63, + "line": 79, "column": 69 } } @@ -6467,25 +6740,25 @@ "value": 3, "loc": { "start": { - "line": 63, + "line": 79, "column": 71 }, "end": { - "line": 63, + "line": 79, "column": 72 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 63, + "line": 79, "column": 74 }, "end": { - "line": 63, + "line": 79, "column": 79 } } @@ -6495,11 +6768,11 @@ "value": false, "loc": { "start": { - "line": 63, + "line": 79, "column": 81 }, "end": { - "line": 63, + "line": 79, "column": 86 } } @@ -6507,33 +6780,33 @@ ], "loc": { "start": { - "line": 63, + "line": 79, "column": 47 }, "end": { - "line": 63, + "line": 79, "column": 87 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 1 }, "end": { - "line": 63, + "line": 79, "column": 87 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 1 }, "end": { - "line": 63, + "line": 79, "column": 88 } } @@ -6552,11 +6825,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 2 }, "end": { - "line": 65, + "line": 81, "column": 7 } } @@ -6572,11 +6845,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 10 }, "end": { - "line": 65, + "line": 81, "column": 15 } } @@ -6585,11 +6858,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 65, + "line": 81, "column": 17 }, "end": { - "line": 65, + "line": 81, "column": 18 } } @@ -6602,36 +6875,36 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 19 }, "end": { - "line": 65, + "line": 81, "column": 24 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 65, + "line": 81, "column": 27 }, "end": { - "line": 65, + "line": 81, "column": 32 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 19 }, "end": { - "line": 65, + "line": 81, "column": 32 } } @@ -6639,11 +6912,11 @@ ], "loc": { "start": { - "line": 65, + "line": 81, "column": 9 }, "end": { - "line": 65, + "line": 81, "column": 33 } } @@ -6656,11 +6929,11 @@ "value": 45, "loc": { "start": { - "line": 65, + "line": 81, "column": 37 }, "end": { - "line": 65, + "line": 81, "column": 39 } } @@ -6669,25 +6942,25 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 65, + "line": 81, "column": 41 }, "end": { - "line": 65, + "line": 81, "column": 42 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 65, + "line": 81, "column": 43 }, "end": { - "line": 65, + "line": 81, "column": 48 } } @@ -6695,22 +6968,22 @@ ], "loc": { "start": { - "line": 65, + "line": 81, "column": 36 }, "end": { - "line": 65, + "line": 81, "column": 49 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 9 }, "end": { - "line": 65, + "line": 81, "column": 49 } } @@ -6723,22 +6996,22 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 54 }, "end": { - "line": 65, + "line": 81, "column": 59 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 51 }, "end": { - "line": 65, + "line": 81, "column": 59 } } @@ -6746,11 +7019,11 @@ ], "loc": { "start": { - "line": 65, + "line": 81, "column": 1 }, "end": { - "line": 65, + "line": 81, "column": 60 } } @@ -6763,11 +7036,11 @@ "properties": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 64 }, "end": { - "line": 65, + "line": 81, "column": 66 } } @@ -6780,11 +7053,11 @@ "value": 42, "loc": { "start": { - "line": 65, + "line": 81, "column": 69 }, "end": { - "line": 65, + "line": 81, "column": 71 } } @@ -6793,11 +7066,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 65, + "line": 81, "column": 73 }, "end": { - "line": 65, + "line": 81, "column": 74 } } @@ -6807,14 +7080,14 @@ "operator": "+", "left": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 65, + "line": 81, "column": 75 }, "end": { - "line": 65, + "line": 81, "column": 80 } } @@ -6824,22 +7097,22 @@ "value": 2, "loc": { "start": { - "line": 65, + "line": 81, "column": 83 }, "end": { - "line": 65, + "line": 81, "column": 84 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 75 }, "end": { - "line": 65, + "line": 81, "column": 84 } } @@ -6847,11 +7120,11 @@ ], "loc": { "start": { - "line": 65, + "line": 81, "column": 68 }, "end": { - "line": 65, + "line": 81, "column": 85 } } @@ -6859,33 +7132,33 @@ ], "loc": { "start": { - "line": 65, + "line": 81, "column": 63 }, "end": { - "line": 65, + "line": 81, "column": 86 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 1 }, "end": { - "line": 65, + "line": 81, "column": 86 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 1 }, "end": { - "line": 65, + "line": 81, "column": 87 } } @@ -6901,11 +7174,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 5 }, "end": { - "line": 67, + "line": 83, "column": 10 } } @@ -6920,11 +7193,11 @@ "value": 45, "loc": { "start": { - "line": 67, + "line": 83, "column": 14 }, "end": { - "line": 67, + "line": 83, "column": 16 } } @@ -6933,25 +7206,25 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 67, + "line": 83, "column": 18 }, "end": { - "line": 67, + "line": 83, "column": 19 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 67, + "line": 83, "column": 20 }, "end": { - "line": 67, + "line": 83, "column": 25 } } @@ -6959,11 +7232,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 13 }, "end": { - "line": 67, + "line": 83, "column": 26 } } @@ -6976,44 +7249,44 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 30 }, "end": { - "line": 67, + "line": 83, "column": 35 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 30 }, "end": { - "line": 67, + "line": 83, "column": 35 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 13 }, "end": { - "line": 67, + "line": 83, "column": 36 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 5 }, "end": { - "line": 67, + "line": 83, "column": 36 } } @@ -7022,11 +7295,11 @@ "kind": "var", "loc": { "start": { - "line": 67, + "line": 83, "column": 1 }, "end": { - "line": 67, + "line": 83, "column": 36 } } @@ -7042,36 +7315,36 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 69, + "line": 85, "column": 10 } } }, "init": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 69, + "line": 85, "column": 13 }, "end": { - "line": 69, + "line": 85, "column": 18 } } }, "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 69, + "line": 85, "column": 18 } } @@ -7080,11 +7353,11 @@ "kind": "var", "loc": { "start": { - "line": 69, + "line": 85, "column": 1 }, "end": { - "line": 69, + "line": 85, "column": 19 } } @@ -7103,11 +7376,11 @@ "decorators": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 2 }, "end": { - "line": 71, + "line": 87, "column": 7 } } @@ -7123,11 +7396,11 @@ "decorators": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 10 }, "end": { - "line": 71, + "line": 87, "column": 15 } } @@ -7136,11 +7409,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 71, + "line": 87, "column": 17 }, "end": { - "line": 71, + "line": 87, "column": 18 } } @@ -7153,36 +7426,36 @@ "decorators": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 19 }, "end": { - "line": 71, + "line": 87, "column": 24 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 71, + "line": 87, "column": 27 }, "end": { - "line": 71, + "line": 87, "column": 32 } } }, "loc": { "start": { - "line": 71, + "line": 87, "column": 19 }, "end": { - "line": 71, + "line": 87, "column": 32 } } @@ -7190,11 +7463,11 @@ ], "loc": { "start": { - "line": 71, + "line": 87, "column": 9 }, "end": { - "line": 71, + "line": 87, "column": 33 } } @@ -7205,22 +7478,22 @@ "decorators": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 36 }, "end": { - "line": 71, + "line": 87, "column": 41 } } }, "loc": { "start": { - "line": 71, + "line": 87, "column": 9 }, "end": { - "line": 71, + "line": 87, "column": 41 } } @@ -7233,22 +7506,22 @@ "decorators": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 46 }, "end": { - "line": 71, + "line": 87, "column": 51 } } }, "loc": { "start": { - "line": 71, + "line": 87, "column": 43 }, "end": { - "line": 71, + "line": 87, "column": 51 } } @@ -7256,11 +7529,11 @@ ], "loc": { "start": { - "line": 71, + "line": 87, "column": 1 }, "end": { - "line": 71, + "line": 87, "column": 52 } } @@ -7273,11 +7546,11 @@ "properties": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 56 }, "end": { - "line": 71, + "line": 87, "column": 58 } } @@ -7290,11 +7563,11 @@ "value": 42, "loc": { "start": { - "line": 71, + "line": 87, "column": 61 }, "end": { - "line": 71, + "line": 87, "column": 63 } } @@ -7303,11 +7576,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 71, + "line": 87, "column": 65 }, "end": { - "line": 71, + "line": 87, "column": 66 } } @@ -7321,11 +7594,11 @@ "decorators": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 67 }, "end": { - "line": 71, + "line": 87, "column": 72 } } @@ -7335,22 +7608,22 @@ "value": 2, "loc": { "start": { - "line": 71, + "line": 87, "column": 75 }, "end": { - "line": 71, + "line": 87, "column": 76 } } }, "loc": { "start": { - "line": 71, + "line": 87, "column": 67 }, "end": { - "line": 71, + "line": 87, "column": 76 } } @@ -7358,11 +7631,11 @@ ], "loc": { "start": { - "line": 71, + "line": 87, "column": 60 }, "end": { - "line": 71, + "line": 87, "column": 77 } } @@ -7370,33 +7643,33 @@ ], "loc": { "start": { - "line": 71, + "line": 87, "column": 55 }, "end": { - "line": 71, + "line": 87, "column": 78 } } }, "loc": { "start": { - "line": 71, + "line": 87, "column": 1 }, "end": { - "line": 71, + "line": 87, "column": 78 } } }, "loc": { "start": { - "line": 71, + "line": 87, "column": 1 }, "end": { - "line": 71, + "line": 87, "column": 79 } } @@ -7415,22 +7688,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 73, + "line": 89, "column": 12 }, "end": { - "line": 73, + "line": 89, "column": 18 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 12 }, "end": { - "line": 73, + "line": 89, "column": 20 } } @@ -7438,11 +7711,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 5 }, "end": { - "line": 73, + "line": 89, "column": 10 } } @@ -7450,11 +7723,11 @@ "init": null, "loc": { "start": { - "line": 73, + "line": 89, "column": 5 }, "end": { - "line": 73, + "line": 89, "column": 10 } } @@ -7463,11 +7736,11 @@ "kind": "var", "loc": { "start": { - "line": 73, + "line": 89, "column": 1 }, "end": { - "line": 73, + "line": 89, "column": 21 } } @@ -7486,22 +7759,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 74, + "line": 90, "column": 12 }, "end": { - "line": 74, + "line": 90, "column": 18 } } }, "loc": { "start": { - "line": 74, + "line": 90, "column": 12 }, "end": { - "line": 74, + "line": 90, "column": 20 } } @@ -7509,11 +7782,11 @@ "decorators": [], "loc": { "start": { - "line": 74, + "line": 90, "column": 5 }, "end": { - "line": 74, + "line": 90, "column": 10 } } @@ -7521,11 +7794,11 @@ "init": null, "loc": { "start": { - "line": 74, + "line": 90, "column": 5 }, "end": { - "line": 74, + "line": 90, "column": 10 } } @@ -7534,11 +7807,11 @@ "kind": "var", "loc": { "start": { - "line": 74, + "line": 90, "column": 1 }, "end": { - "line": 74, + "line": 90, "column": 21 } } @@ -7562,11 +7835,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 75, + "line": 91, "column": 13 }, "end": { - "line": 75, + "line": 91, "column": 19 } } @@ -7575,11 +7848,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 75, + "line": 91, "column": 22 }, "end": { - "line": 75, + "line": 91, "column": 28 } } @@ -7587,33 +7860,33 @@ ], "loc": { "start": { - "line": 75, + "line": 91, "column": 13 }, "end": { - "line": 75, + "line": 91, "column": 28 } } }, "loc": { "start": { - "line": 75, + "line": 91, "column": 12 }, "end": { - "line": 75, + "line": 91, "column": 29 } } }, "loc": { "start": { - "line": 75, + "line": 91, "column": 12 }, "end": { - "line": 75, + "line": 91, "column": 31 } } @@ -7621,11 +7894,11 @@ "decorators": [], "loc": { "start": { - "line": 75, + "line": 91, "column": 5 }, "end": { - "line": 75, + "line": 91, "column": 10 } } @@ -7633,11 +7906,11 @@ "init": null, "loc": { "start": { - "line": 75, + "line": 91, "column": 5 }, "end": { - "line": 75, + "line": 91, "column": 10 } } @@ -7646,11 +7919,11 @@ "kind": "var", "loc": { "start": { - "line": 75, + "line": 91, "column": 1 }, "end": { - "line": 75, + "line": 91, "column": 32 } } @@ -7669,22 +7942,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 76, + "line": 92, "column": 12 }, "end": { - "line": 76, + "line": 92, "column": 18 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 12 }, "end": { - "line": 76, + "line": 92, "column": 20 } } @@ -7692,11 +7965,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 5 }, "end": { - "line": 76, + "line": 92, "column": 10 } } @@ -7704,11 +7977,11 @@ "init": null, "loc": { "start": { - "line": 76, + "line": 92, "column": 5 }, "end": { - "line": 76, + "line": 92, "column": 10 } } @@ -7717,11 +7990,11 @@ "kind": "var", "loc": { "start": { - "line": 76, + "line": 92, "column": 1 }, "end": { - "line": 76, + "line": 92, "column": 21 } } @@ -7740,11 +8013,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 2 }, "end": { - "line": 78, + "line": 94, "column": 7 } } @@ -7755,11 +8028,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 9 }, "end": { - "line": 78, + "line": 94, "column": 14 } } @@ -7770,11 +8043,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 16 }, "end": { - "line": 78, + "line": 94, "column": 21 } } @@ -7785,11 +8058,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 23 }, "end": { - "line": 78, + "line": 94, "column": 28 } } @@ -7800,11 +8073,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 30 }, "end": { - "line": 78, + "line": 94, "column": 35 } } @@ -7817,22 +8090,22 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 40 }, "end": { - "line": 78, + "line": 94, "column": 45 } } }, "loc": { "start": { - "line": 78, + "line": 94, "column": 37 }, "end": { - "line": 78, + "line": 94, "column": 45 } } @@ -7840,11 +8113,11 @@ ], "loc": { "start": { - "line": 78, + "line": 94, "column": 1 }, "end": { - "line": 78, + "line": 94, "column": 46 } } @@ -7857,28 +8130,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 78, + "line": 94, "column": 51 }, "end": { - "line": 78, + "line": 94, "column": 56 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 78, + "line": 94, "column": 58 }, "end": { - "line": 78, + "line": 94, "column": 63 } } @@ -7886,11 +8159,11 @@ ], "loc": { "start": { - "line": 78, + "line": 94, "column": 50 }, "end": { - "line": 78, + "line": 94, "column": 64 } } @@ -7903,11 +8176,11 @@ "value": 1, "loc": { "start": { - "line": 78, + "line": 94, "column": 67 }, "end": { - "line": 78, + "line": 94, "column": 68 } } @@ -7917,11 +8190,11 @@ "value": 2, "loc": { "start": { - "line": 78, + "line": 94, "column": 70 }, "end": { - "line": 78, + "line": 94, "column": 71 } } @@ -7929,11 +8202,11 @@ ], "loc": { "start": { - "line": 78, + "line": 94, "column": 66 }, "end": { - "line": 78, + "line": 94, "column": 72 } } @@ -7943,28 +8216,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 78, + "line": 94, "column": 75 }, "end": { - "line": 78, + "line": 94, "column": 80 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 78, + "line": 94, "column": 82 }, "end": { - "line": 78, + "line": 94, "column": 87 } } @@ -7972,11 +8245,11 @@ ], "loc": { "start": { - "line": 78, + "line": 94, "column": 74 }, "end": { - "line": 78, + "line": 94, "column": 88 } } @@ -7989,11 +8262,11 @@ "value": 1, "loc": { "start": { - "line": 78, + "line": 94, "column": 91 }, "end": { - "line": 78, + "line": 94, "column": 92 } } @@ -8003,11 +8276,11 @@ "value": 2, "loc": { "start": { - "line": 78, + "line": 94, "column": 94 }, "end": { - "line": 78, + "line": 94, "column": 95 } } @@ -8015,11 +8288,11 @@ ], "loc": { "start": { - "line": 78, + "line": 94, "column": 90 }, "end": { - "line": 78, + "line": 94, "column": 96 } } @@ -8032,25 +8305,25 @@ "value": 1, "loc": { "start": { - "line": 78, + "line": 94, "column": 99 }, "end": { - "line": 78, + "line": 94, "column": 100 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 78, + "line": 94, "column": 102 }, "end": { - "line": 78, + "line": 94, "column": 107 } } @@ -8058,39 +8331,39 @@ ], "loc": { "start": { - "line": 78, + "line": 94, "column": 98 }, "end": { - "line": 78, + "line": 94, "column": 108 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 78, + "line": 94, "column": 110 }, "end": { - "line": 78, + "line": 94, "column": 115 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 78, + "line": 94, "column": 117 }, "end": { - "line": 78, + "line": 94, "column": 122 } } @@ -8098,33 +8371,33 @@ ], "loc": { "start": { - "line": 78, + "line": 94, "column": 49 }, "end": { - "line": 78, + "line": 94, "column": 123 } } }, "loc": { "start": { - "line": 78, + "line": 94, "column": 1 }, "end": { - "line": 78, + "line": 94, "column": 123 } } }, "loc": { "start": { - "line": 78, + "line": 94, "column": 1 }, "end": { - "line": 78, + "line": 94, "column": 123 } } @@ -8143,22 +8416,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 80, + "line": 96, "column": 12 }, "end": { - "line": 80, + "line": 96, "column": 18 } } }, "loc": { "start": { - "line": 80, + "line": 96, "column": 12 }, "end": { - "line": 80, + "line": 96, "column": 20 } } @@ -8166,11 +8439,11 @@ "decorators": [], "loc": { "start": { - "line": 80, + "line": 96, "column": 5 }, "end": { - "line": 80, + "line": 96, "column": 10 } } @@ -8178,11 +8451,11 @@ "init": null, "loc": { "start": { - "line": 80, + "line": 96, "column": 5 }, "end": { - "line": 80, + "line": 96, "column": 10 } } @@ -8191,11 +8464,11 @@ "kind": "var", "loc": { "start": { - "line": 80, + "line": 96, "column": 1 }, "end": { - "line": 80, + "line": 96, "column": 21 } } @@ -8214,22 +8487,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 81, + "line": 97, "column": 12 }, "end": { - "line": 81, + "line": 97, "column": 18 } } }, "loc": { "start": { - "line": 81, + "line": 97, "column": 12 }, "end": { - "line": 81, + "line": 97, "column": 20 } } @@ -8237,11 +8510,11 @@ "decorators": [], "loc": { "start": { - "line": 81, + "line": 97, "column": 5 }, "end": { - "line": 81, + "line": 97, "column": 10 } } @@ -8249,11 +8522,11 @@ "init": null, "loc": { "start": { - "line": 81, + "line": 97, "column": 5 }, "end": { - "line": 81, + "line": 97, "column": 10 } } @@ -8262,11 +8535,11 @@ "kind": "var", "loc": { "start": { - "line": 81, + "line": 97, "column": 1 }, "end": { - "line": 81, + "line": 97, "column": 21 } } @@ -8290,22 +8563,22 @@ "decorators": [], "loc": { "start": { - "line": 82, + "line": 98, "column": 6 }, "end": { - "line": 82, + "line": 98, "column": 11 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 3 }, "end": { - "line": 82, + "line": 98, "column": 11 } } @@ -8313,11 +8586,11 @@ ], "loc": { "start": { - "line": 82, + "line": 98, "column": 2 }, "end": { - "line": 82, + "line": 98, "column": 12 } } @@ -8330,22 +8603,22 @@ "decorators": [], "loc": { "start": { - "line": 82, + "line": 98, "column": 17 }, "end": { - "line": 82, + "line": 98, "column": 22 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 14 }, "end": { - "line": 82, + "line": 98, "column": 22 } } @@ -8353,11 +8626,11 @@ ], "loc": { "start": { - "line": 82, + "line": 98, "column": 1 }, "end": { - "line": 82, + "line": 98, "column": 23 } } @@ -8370,28 +8643,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 82, + "line": 98, "column": 28 }, "end": { - "line": 82, + "line": 98, "column": 33 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 82, + "line": 98, "column": 35 }, "end": { - "line": 82, + "line": 98, "column": 40 } } @@ -8399,11 +8672,11 @@ ], "loc": { "start": { - "line": 82, + "line": 98, "column": 27 }, "end": { - "line": 82, + "line": 98, "column": 41 } } @@ -8413,11 +8686,11 @@ "value": 1, "loc": { "start": { - "line": 82, + "line": 98, "column": 43 }, "end": { - "line": 82, + "line": 98, "column": 44 } } @@ -8427,11 +8700,11 @@ "value": 2, "loc": { "start": { - "line": 82, + "line": 98, "column": 46 }, "end": { - "line": 82, + "line": 98, "column": 47 } } @@ -8439,33 +8712,33 @@ ], "loc": { "start": { - "line": 82, + "line": 98, "column": 26 }, "end": { - "line": 82, + "line": 98, "column": 48 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 1 }, "end": { - "line": 82, + "line": 98, "column": 48 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 1 }, "end": { - "line": 82, + "line": 98, "column": 48 } } @@ -8477,8 +8750,8 @@ "column": 1 }, "end": { - "line": 82, - "column": 48 + "line": 99, + "column": 1 } } } diff --git a/es2panda/test/compiler/ts/arrayDestructuring.ts b/es2panda/test/compiler/ts/arrayDestructuring.ts index 80c5a510c9ed583b6fd13d2ce33f9d352f128ef9..7eef63afc0738ee9fa691be0920cf75e6bac16dd 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring.ts +++ b/es2panda/test/compiler/ts/arrayDestructuring.ts @@ -30,13 +30,13 @@ var var6: number; var var7: string; var var8: boolean; -var [var9, [var10, , var11], ...var12] = [{}, [42, , "foo" + 2]]; +var [var9, [var10, , var11], ...var12] = [{ a: 6, b: "bar" }, [42, , "foo" + 2]]; var9 = { a: 5, b: "foo" }; var10 = var3; var11 = var7; var12 = []; -var [var13 = [1, "foo"], [var14, var15] = [{}, true], ...var16] = [3, [true, {}], function (a, b): number { return 12 }, "bar"]; +var [var13 = [1, "foo"], [var14, var15] = [{}, true], ...var16] = [3, [true, {}], function (a: any, b: any): number { return 12 }, "bar"]; var13 = 5; var13 = [2, "baz"]; var14 = {}; @@ -46,12 +46,12 @@ var var16: [(a: any, b: any) => number, string]; var [var17, var18 = 6, var19]: [number, number | string, boolean[]] = [1, "foo", [true, false]]; var [var20, , var21]: number[] | [number, number, string] = []; -var [var22, var23 = [{ a: 5, b: "foo" }, false], var24]: string[] | [number, ({} | boolean)[]] = [1, [{}, true]]; +var [var22, var23 = [{ a: 5, b: "foo" }, false], var24]: string[] | [number, ({ a: number, b: string } | boolean)[]] = [1, [{ a: 1, b: "bat" }, true]]; var [[var25, var26] = ["foo", {}], [[var27]]]: number[][][] | [[number | string, {}], [[number]]] = [[1, {}], [[3]]]; -var [var28 = {}, { var29 }, ...var30]: [{}, { var29: number }, 1, "foo"] = [{}, { var29: 5 }, 1, "foo"]; +var [var28 = {}, { var29 }, ...var30]: [{}, { var29: number }, number, string] = [{}, { var29: 5 }, 1, "foo"]; -var var31:number; -var var32:boolean; +var var31: number; +var var32: boolean; [var31, var32] = [var31, true]; [var31, var31] = [5, 6]; @@ -95,4 +95,4 @@ var var48: string[]; var var49: string[]; var var50: number[]; -[[...var49], ...var50] = [["foo", "bar"], 1, 2] \ No newline at end of file +[[...var49], ...var50] = [["foo", "bar"], 1, 2] diff --git a/es2panda/test/compiler/ts/arrayDestructuring1-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring1-expected.txt index f6074d42dc5110e5f2a26d8f524ddd81a07f857c..5517ec5d9611027aa27b95cc79f2740a87d1382d 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring1-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring1-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -27,11 +27,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -41,22 +41,22 @@ "elements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 13 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -65,11 +65,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -81,9 +81,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring1.ts:1:6] +TypeError: Tuple type [] of length 0 has no element at index 0. [arrayDestructuring1.ts:17:5] diff --git a/es2panda/test/compiler/ts/arrayDestructuring10-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring10-expected.txt index 003fc94e0e89ac736f596b9ccf185c51c29aa3df..6306b0b1506ecf79ce85efc9afb3de81a45409f9 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring10-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring10-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -31,22 +31,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -57,11 +57,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -74,22 +74,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -97,11 +97,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -113,25 +113,25 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -141,11 +141,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -155,11 +155,11 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -211,11 +211,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -225,33 +225,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -263,9 +263,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type '[boolean, { }]'. [arrayDestructuring10.ts:2:1] +TypeError: Type '{ }' is not assignable to type '[boolean, { }]'. [arrayDestructuring10.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring11-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring11-expected.txt index f7aa0d177fe39a0491e30e63891b6d3493efab60..3ad6411930e5e97776d6f25aa833b368f904f32c 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring11-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring11-expected.txt @@ -17,22 +17,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 10 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -40,11 +40,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -57,25 +57,25 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -85,11 +85,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -155,33 +155,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -193,9 +193,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type '(number | string | boolean)[]'. [arrayDestructuring11.ts:2:1] +TypeError: Type '{ }' is not assignable to type '[number, string, boolean]'. [arrayDestructuring11.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring12-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring12-expected.txt index 520d543bb756519752c56a0fcdc5d2aef4c93f66..17ef89fd5cd3ec4f4b329fc19de0dd0b9689de1f 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring12-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring12-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -31,22 +31,22 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -59,22 +59,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -90,11 +90,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -103,11 +103,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -116,11 +116,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -128,11 +128,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -143,72 +143,58 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 54 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 56 } } }, { - "type": "TSLiteralType", - "literal": { - "type": "NumberLiteral", - "value": 5, - "loc": { - "start": { - "line": 1, - "column": 59 - }, - "end": { - "line": 1, - "column": 60 - } - } - }, + "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, - "column": 60 + "line": 17, + "column": 65 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, - "column": 60 + "line": 17, + "column": 65 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -218,52 +204,52 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, - "column": 64 + "line": 17, + "column": 69 }, "end": { - "line": 1, - "column": 69 + "line": 17, + "column": 74 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, - "column": 71 + "line": 17, + "column": 76 }, "end": { - "line": 1, - "column": 76 + "line": 17, + "column": 81 } } } ], "loc": { "start": { - "line": 1, - "column": 63 + "line": 17, + "column": 68 }, "end": { - "line": 1, - "column": 77 + "line": 17, + "column": 82 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, - "column": 77 + "line": 17, + "column": 82 } } } @@ -271,12 +257,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 78 + "line": 17, + "column": 83 } } } @@ -287,9 +273,9 @@ "column": 1 }, "end": { - "line": 1, - "column": 78 + "line": 18, + "column": 1 } } } -TypeError: Type '[number, string, boolean] | string[] | 5' must have a '[Symbol.iterator]()' method that returns an interator [arrayDestructuring12.ts:1:6] +TypeError: Type [number, string, boolean] | string[] | number must have a '[Symbol.iterator]()' method that returns an iterator. [arrayDestructuring12.ts:17:5] diff --git a/es2panda/test/compiler/ts/arrayDestructuring12.ts b/es2panda/test/compiler/ts/arrayDestructuring12.ts index 0e9e388a9f0365f471007464fdf58bb37a9b8514..43daab2c7183a6e4ed1013103fc6e874dcd34132 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring12.ts +++ b/es2panda/test/compiler/ts/arrayDestructuring12.ts @@ -14,4 +14,4 @@ */ -var [a = 5, ...b]: [number, string, boolean] | string[] | 5 = ["foo", "bar"]; \ No newline at end of file +var [a = 5, ...b]: [number, string, boolean] | string[] | number = ["foo", "bar"]; diff --git a/es2panda/test/compiler/ts/arrayDestructuring13-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring13-expected.txt index 4ace32cef81e33ce60f70a3036db00cef8960030..c61888739323e4c91f2c3fb475c74c48db4f9e06 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring13-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring13-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -42,11 +42,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -54,11 +54,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -66,11 +66,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -91,11 +91,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -114,11 +114,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -129,11 +129,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -141,11 +141,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -156,22 +156,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -180,11 +180,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -200,11 +200,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -214,33 +214,33 @@ "properties": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -252,9 +252,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type '{ }' is not assignable to type 'number'. [arrayDestructuring13.ts:3:1] +TypeError: Type '{ }' is not assignable to type 'number'. [arrayDestructuring13.ts:19:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring14-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring14-expected.txt index f0f16ae1fe9ac3e2148d9ffe6440f23752933260..75155cfcbca7722a6d10d2fbfc844873cce70653 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring14-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring14-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -75,11 +75,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -89,22 +89,22 @@ "value": 6, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -117,11 +117,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -131,22 +131,22 @@ "value": 6, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -154,11 +154,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -169,22 +169,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -193,11 +193,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } } -TypeError: Type 'number' must have a '[Symbol.iterator]()' method that returns an interator [arrayDestructuring14.ts:2:5] +TypeError: Type number must have a '[Symbol.iterator]()' method that returns an iterator. [arrayDestructuring14.ts:18:5] diff --git a/es2panda/test/compiler/ts/arrayDestructuring15-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring15-expected.txt index 3a18a57ccb96cb49d583ebfa194a1da4bd2280a1..cb1ccc7a9219221d46e997821b936ec2fa7df878 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring15-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring15-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -28,11 +28,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -40,11 +40,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -52,11 +52,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -65,11 +65,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -88,11 +88,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -103,11 +103,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -115,11 +115,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -130,22 +130,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -154,11 +154,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,9 +170,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring15.ts:2:9] +TypeError: Tuple type [number] of length 1 has no element at index 1. [arrayDestructuring15.ts:18:5] diff --git a/es2panda/test/compiler/ts/arrayDestructuring16-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring16-expected.txt index b76069037fc1ccdf80781c88d3be7857eb1aafc3..0a708c25c2f485d112e9f20dbb2f9c8aeecb084e 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring16-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring16-expected.txt @@ -16,11 +16,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -28,11 +28,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -40,11 +40,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -52,11 +52,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -65,11 +65,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -88,11 +88,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -105,36 +105,36 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -142,11 +142,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -157,22 +157,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -181,11 +181,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -201,11 +201,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -215,33 +215,33 @@ "properties": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -253,9 +253,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'string'. [arrayDestructuring16.ts:3:1] +TypeError: Type '{ }' is not assignable to type 'string'. [arrayDestructuring16.ts:19:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring17-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring17-expected.txt index 272ed00659b0b77d6e0a717c97d09cc40cbc159d..20dec895eb665f7b8e63f7862322dff9c2742c42 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring17-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring17-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -88,11 +88,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -101,11 +101,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -113,11 +113,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -135,25 +135,25 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -161,22 +161,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -184,33 +184,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -229,11 +229,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -244,11 +244,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -259,11 +259,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 13 } } @@ -271,11 +271,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 14 } } @@ -288,11 +288,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -303,25 +303,25 @@ "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 19 }, "end": { - "line": 5, + "line": 21, "column": 20 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 5, + "line": 21, "column": 22 }, "end": { - "line": 5, + "line": 21, "column": 27 } } @@ -330,22 +330,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 28 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 28 } } @@ -354,11 +354,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 29 } } @@ -370,9 +370,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 29 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring17.ts:5:12] +TypeError: Tuple type [number, string] of length 2 has no element at index 2. [arrayDestructuring17.ts:21:5] diff --git a/es2panda/test/compiler/ts/arrayDestructuring18-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring18-expected.txt index f603308a8045cdb0e44998a7e979794cbee68dba..77f68693131a40fbf3efe970e271f722b78e513a 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring18-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring18-expected.txt @@ -17,22 +17,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 10 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -48,11 +48,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -61,11 +61,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -73,11 +73,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -88,22 +88,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 39 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -115,11 +115,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -128,11 +128,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -142,11 +142,11 @@ "members": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -154,11 +154,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -166,22 +166,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -194,11 +194,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 66 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -208,11 +208,11 @@ "value": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 72 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -220,22 +220,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 78 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -244,11 +244,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -264,11 +264,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -278,33 +278,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -316,9 +316,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type '(number | string | boolean | bigint | void | { })[]'. [arrayDestructuring18.ts:2:1] +TypeError: Type '{ }' is not assignable to type '(number | string | boolean | bigint | void | { })[]'. [arrayDestructuring18.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring19-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring19-expected.txt index a2a17aed78cc4abe942879af36baa20cec5f6e7c..206661a32475bbaa46632d74e19eb47958df32e8 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring19-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring19-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -32,22 +32,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -63,11 +63,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -76,11 +76,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -88,11 +88,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -103,22 +103,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -130,11 +130,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -143,11 +143,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -157,11 +157,11 @@ "members": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 62 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -169,11 +169,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -181,22 +181,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 65 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -209,11 +209,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 69 }, "end": { - "line": 1, + "line": 17, "column": 73 } } @@ -223,11 +223,11 @@ "value": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 75 }, "end": { - "line": 1, + "line": 17, "column": 80 } } @@ -235,22 +235,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 68 }, "end": { - "line": 1, + "line": 17, "column": 81 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 81 } } @@ -259,11 +259,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -279,11 +279,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -293,33 +293,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -331,9 +331,9 @@ "column": 1 }, "end": { - "line": 2, - "column": 8 + "line": 19, + "column": 1 } } } -TypeError: Type '{ }' is not assignable to type '(string | boolean | void | { })[]'. [arrayDestructuring19.ts:2:1] +TypeError: Type '{ }' is not assignable to type '(string | boolean | void | { })[]'. [arrayDestructuring19.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring19.ts b/es2panda/test/compiler/ts/arrayDestructuring19.ts index a63bdd4f2549c48e1c1b62528742f9aa9955c2a6..a2c9af9fa600e778c59d9f114b71c8fa338a3188 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring19.ts +++ b/es2panda/test/compiler/ts/arrayDestructuring19.ts @@ -15,4 +15,4 @@ var [a, ...b]: [number, string] | boolean[] | [bigint, void, {}] = [true, false]; -b = {}; \ No newline at end of file +b = {}; diff --git a/es2panda/test/compiler/ts/arrayDestructuring2-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring2-expected.txt index c4c77d8e01f70bfedecf7b4a24f61c97f8e38ff7..9e7e1d1aa77967dcb0d07f857a701d62d1fee93c 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring2-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring2-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -31,22 +31,22 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -54,11 +54,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -68,22 +68,22 @@ "elements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 17 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -92,11 +92,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -112,47 +112,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } } -TypeError: Type '"foo"' is not assignable to type 'number'. [arrayDestructuring2.ts:2:1] +TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring2.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring20-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring20-expected.txt index cb7b2425ba9f4b74055e06867fc284ff4b207c6f..89b98c24ba92fcd4a50fea1ff089a84b0119231e 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring20-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring20-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -33,11 +33,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -48,11 +48,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -60,11 +60,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -72,11 +72,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -89,11 +89,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -103,11 +103,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -115,22 +115,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -139,11 +139,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -155,9 +155,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 26 } } } -TypeError: Type 'number' must have a '[Symbol.iterator]()' method that returns an interator [arrayDestructuring20.ts:1:9] +TypeError: Type number must have a '[Symbol.iterator]()' method that returns an iterator. [arrayDestructuring20.ts:17:9] diff --git a/es2panda/test/compiler/ts/arrayDestructuring21-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring21-expected.txt index 3f4963ceda493ce9d3e41e8e74ac08c0c60fb319..3aabe955739452f4f726a01a5bc296295c4a8bc7 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring21-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring21-expected.txt @@ -18,11 +18,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -33,11 +33,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -57,11 +57,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -77,11 +77,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -89,11 +89,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -101,22 +101,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -125,11 +125,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -141,9 +141,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 22 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring21.ts:1:10] +TypeError: Tuple type [number] of length 1 has no element at index 1. [arrayDestructuring21.ts:17:6] diff --git a/es2panda/test/compiler/ts/arrayDestructuring22-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring22-expected.txt index e8c4c06a4e096bd82aec0f6472ef05021c21dd46..34448ea3ac0fc89b1992c36b7e3ed02c0a71d887 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring22-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring22-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -50,11 +50,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -62,11 +62,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -79,11 +79,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -93,11 +93,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -105,22 +105,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -128,11 +128,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -145,11 +145,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -159,14 +159,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -174,11 +174,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -186,22 +186,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -210,11 +210,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -226,9 +226,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 41 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number', but here has type 'number | string'. [arrayDestructuring22.ts:1:10] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number', but here has type 'string | number'. [arrayDestructuring22.ts:17:10] diff --git a/es2panda/test/compiler/ts/arrayDestructuring23-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring23-expected.txt index 48af5209e6f9471197494c73518474bdf24f2cd8..b44beb3b0e5cc70103d4bf137c64d1f31f2632d9 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring23-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring23-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -50,11 +50,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -62,11 +62,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -79,11 +79,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -91,22 +91,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -114,11 +114,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -131,11 +131,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -145,14 +145,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -160,11 +160,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -172,22 +172,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -196,11 +196,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -212,9 +212,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 38 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring23.ts:1:13] +TypeError: Property 1 does not exist on type [string] | [number]. [arrayDestructuring23.ts:17:9] diff --git a/es2panda/test/compiler/ts/arrayDestructuring24-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring24-expected.txt index 77859c8c3d41f4d1922740ba17f8b259e802d596..4cb9dc61b9ec822c0a16d908e9d294283636a464 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring24-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring24-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -50,11 +50,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -62,11 +62,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -79,25 +79,25 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 23 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -105,22 +105,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 31 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -128,11 +128,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -145,11 +145,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -159,14 +159,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -185,25 +185,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -211,11 +211,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -223,11 +223,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -235,11 +235,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 60 } } @@ -247,22 +247,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 61 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -271,11 +271,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -291,11 +291,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -314,11 +314,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -328,11 +328,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -340,11 +340,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -352,33 +352,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -390,9 +390,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } } -TypeError: Type 'number' is not assignable to type 'string'. [arrayDestructuring24.ts:2:7] +TypeError: Type 'number' is not assignable to type 'string'. [arrayDestructuring24.ts:18:7] diff --git a/es2panda/test/compiler/ts/arrayDestructuring25-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring25-expected.txt index 65d90c4f02eedaef0e726d548694fe822dd57172..5b1757a0a3a980a6ae0417a7188200b5dfbfc44e 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring25-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring25-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -50,11 +50,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -62,22 +62,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 18 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -102,11 +102,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -116,11 +116,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -128,22 +128,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -152,11 +152,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -168,9 +168,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 29 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring25.ts:1:16] +TypeError: Tuple type [number] of length 1 has no element at index 1. [arrayDestructuring25.ts:17:12] diff --git a/es2panda/test/compiler/ts/arrayDestructuring26-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring26-expected.txt index 1382a1042a8c4a86cfe9e3ca621fb64b65b1f112..3b74798a4b305c96b27927557f2053cad4d3fbbe 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring26-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring26-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -31,22 +31,22 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -65,11 +65,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -80,11 +80,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -92,11 +92,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -127,11 +127,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -139,11 +139,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -151,11 +151,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -163,11 +163,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -179,11 +179,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -202,11 +202,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -216,11 +216,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -228,11 +228,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -240,11 +240,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -252,22 +252,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -276,11 +276,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -292,9 +292,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 37 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring26.ts:1:18] +TypeError: Property c does not exist on type { b: number; }. [arrayDestructuring26.ts:17:13] diff --git a/es2panda/test/compiler/ts/arrayDestructuring27-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring27-expected.txt index 0ff199e2f8473aff68a934ddccd56e51794cf073..34f429253fff2294882de7c33940cbe84313e6aa 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring27-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring27-expected.txt @@ -22,11 +22,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -64,36 +64,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 18 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -104,11 +104,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -116,22 +116,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -144,11 +144,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -160,11 +160,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -173,11 +173,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -185,11 +185,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -197,22 +197,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 58 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -225,11 +225,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 62 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -239,11 +239,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -251,22 +251,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 67 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -275,11 +275,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -291,9 +291,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 68 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring27.ts:1:28] +TypeError: Tuple type [number, number | string] of length 2 has no element at index 2. [arrayDestructuring27.ts:17:9] diff --git a/es2panda/test/compiler/ts/arrayDestructuring28-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring28-expected.txt index 2c340ac0aa840ec2868b30bb94dffd9d6a82af12..ff0087b53e988eacd7d9e0f79d429629a9c4674d 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring28-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring28-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -41,11 +41,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -72,22 +72,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -95,11 +95,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -115,11 +115,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -130,11 +130,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -154,11 +154,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -174,11 +174,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -188,22 +188,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -214,11 +214,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -226,11 +226,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -238,11 +238,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -250,11 +250,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -267,11 +267,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -293,11 +293,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -307,11 +307,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -319,11 +319,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -331,11 +331,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -348,25 +348,25 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 61 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 63 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -374,11 +374,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 69 } } @@ -386,11 +386,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -398,22 +398,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 71 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -422,11 +422,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 72 } } @@ -442,11 +442,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -456,33 +456,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -494,9 +494,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'string'. [arrayDestructuring28.ts:2:1] +TypeError: Type '{ }' is not assignable to type 'string'. [arrayDestructuring28.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring29-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring29-expected.txt index 46d3ed959ab2322df676715b2b65ab5870725b64..af976bdbce50562179092dbf1eab10e4d6ba1f3b 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring29-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring29-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -73,11 +73,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 2 }, "end": { - "line": 2, + "line": 18, "column": 3 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -99,33 +99,33 @@ "elements": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -137,9 +137,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring29.ts:2:2] +TypeError: Tuple type [] of length 0 has no element at index 0. [arrayDestructuring29.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring3-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring3-expected.txt index cf136aab073a239ac05a3c1447dcb77c17e39e33..f36f632a11fe248152ffe8367f3a375707d5c7d2 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring3-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring3-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -31,22 +31,22 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -54,11 +54,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -68,14 +68,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -83,22 +83,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -107,11 +107,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -127,11 +127,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -141,33 +141,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -179,9 +179,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'number | string'. [arrayDestructuring3.ts:2:1] +TypeError: Type '{ }' is not assignable to type 'string | number'. [arrayDestructuring3.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring30-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring30-expected.txt index 402b8a0c010c11dd6635379575a300401f8fd6c9..71565bd336fef8e7ab31534a6c6606be7a51cf51 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring30-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring30-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -133,11 +133,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 3 } } @@ -147,22 +147,22 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -185,11 +185,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -199,33 +199,33 @@ "elements": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -237,9 +237,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 17 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring30.ts:3:9] +TypeError: Tuple type [] of length 0 has no element at index 1. [arrayDestructuring30.ts:19:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring31-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring31-expected.txt index e0e74494e12a4a20abd07b20211eabe408c82963..029bb7ddd29f476feabdf56bf3cccce9821b472b 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring31-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring31-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -75,36 +75,36 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 2 }, "end": { - "line": 2, + "line": 18, "column": 3 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 2 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -112,11 +112,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -126,33 +126,33 @@ "elements": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 17 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } } -TypeError: Type '"foo"' is not assignable to type 'number'. [arrayDestructuring31.ts:2:2] +TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring31.ts:18:2] diff --git a/es2panda/test/compiler/ts/arrayDestructuring32-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring32-expected.txt index 53c4a24a15d63027fb93ab22bc7b5563bada7072..711dd4388e5f4bf5bebd62e6cfef9582871cb266 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring32-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring32-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 2 }, "end": { - "line": 1, + "line": 17, "column": 3 } } @@ -27,11 +27,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 4 } } @@ -41,33 +41,33 @@ "elements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 9 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 9 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -79,9 +79,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 10 } } } -TypeError: Cannot find name 'a'. [arrayDestructuring32.ts:1:2] +TypeError: Tuple type [] of length 0 has no element at index 0. [arrayDestructuring32.ts:17:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring33-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring33-expected.txt index b52eb582b0a6c9ee9181dd937de73bc4f18c9519..9a10144d1d77e44df92d7c1328e0e0e2ee2c07e4 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring33-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring33-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 2 }, "end": { - "line": 2, + "line": 18, "column": 3 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -99,14 +99,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -114,33 +114,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -152,9 +152,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } } -TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring33.ts:2:2] +TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring33.ts:18:2] diff --git a/es2panda/test/compiler/ts/arrayDestructuring34-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring34-expected.txt index 93243271d9a17b2576cdb5eb52eb811da8283785..5e859d82a0534d231832858c0c87f23c97f070ce 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring34-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring34-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -84,22 +84,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -131,11 +131,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 3 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 4 } } @@ -158,33 +158,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } @@ -196,9 +196,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } } -TypeError: Type 'number' must have a '[Symbol.iterator]()' method that returns an interator [arrayDestructuring34.ts:3:1] +TypeError: Type number must have a '[Symbol.iterator]()' method that returns an iterator. [arrayDestructuring34.ts:19:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring35-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring35-expected.txt index b9f17f884899a86a11c5b5337577cc3be8725727..c177e02cddf146cd8488a05c6628b67b256da01f 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring35-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring35-expected.txt @@ -16,11 +16,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -29,11 +29,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -41,11 +41,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -53,11 +53,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -65,11 +65,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -103,11 +103,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 3 } } @@ -117,22 +117,22 @@ "value": 2, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -140,11 +140,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -157,11 +157,11 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -169,33 +169,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -207,9 +207,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } } -TypeError: Type 'boolean' is not assignable to type 'string | number'. [arrayDestructuring35.ts:3:2] +TypeError: Type 'boolean' is not assignable to type 'string | number'. [arrayDestructuring35.ts:19:2] diff --git a/es2panda/test/compiler/ts/arrayDestructuring36-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring36-expected.txt index 878de3251a1e641526d9cc5d72c403005f247248..96da6d439b375e39d1d211d0e8b5c4dee64efb4d 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring36-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring36-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -26,22 +26,22 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -129,11 +129,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -153,11 +153,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -166,11 +166,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -186,11 +186,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -200,22 +200,22 @@ "elements": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 11 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -244,11 +244,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -260,14 +260,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -277,11 +277,11 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -289,11 +289,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 19 } } @@ -306,44 +306,44 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 28 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 28 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 29 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 29 } } @@ -352,11 +352,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 29 } } @@ -375,11 +375,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 2 }, "end": { - "line": 6, + "line": 22, "column": 3 } } @@ -395,11 +395,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 6 }, "end": { - "line": 6, + "line": 22, "column": 7 } } @@ -408,11 +408,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 10 } } @@ -425,36 +425,36 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 6, + "line": 22, "column": 15 }, "end": { - "line": 6, + "line": 22, "column": 20 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 20 } } @@ -462,11 +462,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 21 } } @@ -477,22 +477,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 24 }, "end": { - "line": 6, + "line": 22, "column": 25 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -505,22 +505,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 30 }, "end": { - "line": 6, + "line": 22, "column": 31 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 27 }, "end": { - "line": 6, + "line": 22, "column": 31 } } @@ -528,11 +528,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 32 } } @@ -545,11 +545,11 @@ "properties": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 36 }, "end": { - "line": 6, + "line": 22, "column": 38 } } @@ -562,11 +562,11 @@ "value": 42, "loc": { "start": { - "line": 6, + "line": 22, "column": 41 }, "end": { - "line": 6, + "line": 22, "column": 43 } } @@ -575,11 +575,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 6, + "line": 22, "column": 45 }, "end": { - "line": 6, + "line": 22, "column": 46 } } @@ -589,14 +589,14 @@ "operator": "+", "left": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 6, + "line": 22, "column": 47 }, "end": { - "line": 6, + "line": 22, "column": 52 } } @@ -606,22 +606,22 @@ "value": 2, "loc": { "start": { - "line": 6, + "line": 22, "column": 55 }, "end": { - "line": 6, + "line": 22, "column": 56 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 47 }, "end": { - "line": 6, + "line": 22, "column": 56 } } @@ -629,11 +629,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 40 }, "end": { - "line": 6, + "line": 22, "column": 57 } } @@ -641,33 +641,33 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 35 }, "end": { - "line": 6, + "line": 22, "column": 58 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 58 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 59 } } @@ -679,9 +679,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 59 } } } -TypeError: Type '"foo"' is not assignable to type 'number'. [arrayDestructuring36.ts:6:6] +TypeError: Type 'number | "foo"' is not assignable to type 'number'. [arrayDestructuring36.ts:22:6] diff --git a/es2panda/test/compiler/ts/arrayDestructuring37-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring37-expected.txt index 58329f5498c21a03639793a45484ba2bc6028532..1eb1ba2a28c6d5ec0f9abee83b73edb7b3ea05cc 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring37-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring37-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -26,22 +26,22 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -129,11 +129,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -153,11 +153,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -166,11 +166,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -186,11 +186,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -200,22 +200,22 @@ "elements": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 11 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -247,11 +247,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 2 }, "end": { - "line": 5, + "line": 21, "column": 3 } } @@ -267,11 +267,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -280,11 +280,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -297,36 +297,36 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 5, + "line": 21, "column": 15 }, "end": { - "line": 5, + "line": 21, "column": 20 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 20 } } @@ -334,11 +334,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 21 } } @@ -348,14 +348,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 25 }, "end": { - "line": 5, + "line": 21, "column": 30 } } @@ -365,11 +365,11 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 32 }, "end": { - "line": 5, + "line": 21, "column": 33 } } @@ -377,22 +377,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 24 }, "end": { - "line": 5, + "line": 21, "column": 34 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 34 } } @@ -405,22 +405,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 39 }, "end": { - "line": 5, + "line": 21, "column": 40 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 36 }, "end": { - "line": 5, + "line": 21, "column": 40 } } @@ -428,11 +428,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 41 } } @@ -445,11 +445,11 @@ "properties": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 45 }, "end": { - "line": 5, + "line": 21, "column": 47 } } @@ -462,11 +462,11 @@ "value": 42, "loc": { "start": { - "line": 5, + "line": 21, "column": 50 }, "end": { - "line": 5, + "line": 21, "column": 52 } } @@ -475,11 +475,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 5, + "line": 21, "column": 54 }, "end": { - "line": 5, + "line": 21, "column": 55 } } @@ -489,14 +489,14 @@ "operator": "+", "left": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 56 }, "end": { - "line": 5, + "line": 21, "column": 61 } } @@ -506,22 +506,22 @@ "value": 2, "loc": { "start": { - "line": 5, + "line": 21, "column": 64 }, "end": { - "line": 5, + "line": 21, "column": 65 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 56 }, "end": { - "line": 5, + "line": 21, "column": 65 } } @@ -529,11 +529,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 49 }, "end": { - "line": 5, + "line": 21, "column": 66 } } @@ -541,33 +541,33 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 44 }, "end": { - "line": 5, + "line": 21, "column": 67 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 67 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 68 } } @@ -579,9 +579,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 68 } } } -TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring37.ts:5:6] +TypeError: Type 'number | string' is not assignable to type 'number'. [arrayDestructuring37.ts:21:6] diff --git a/es2panda/test/compiler/ts/arrayDestructuring38-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring38-expected.txt index 9b88e36186ba5e59dbfee4556ef6f3f274c8b42e..782f263065ad93de15ed04dc1442eb32afa34308 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring38-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring38-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -76,11 +76,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -88,11 +88,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 2 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -100,11 +100,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -117,11 +117,11 @@ "elements": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -129,33 +129,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -167,9 +167,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring38.ts:2:3] +TypeError: Tuple type [] of length 0 has no element at index 0. [arrayDestructuring38.ts:18:2] diff --git a/es2panda/test/compiler/ts/arrayDestructuring39-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring39-expected.txt index ffc9fffa1a4b19fa69272371b1f356fddda754f2..d16ca5243a41fc782df48c12f97b29aee18031e6 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring39-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring39-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -136,11 +136,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 3 }, "end": { - "line": 3, + "line": 19, "column": 4 } } @@ -150,22 +150,22 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 3 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -176,11 +176,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -188,11 +188,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -200,11 +200,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -217,11 +217,11 @@ "elements": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -229,33 +229,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -267,9 +267,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring39.ts:3:10] +TypeError: Tuple type [] of length 0 has no element at index 1. [arrayDestructuring39.ts:19:2] diff --git a/es2panda/test/compiler/ts/arrayDestructuring4-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring4-expected.txt index 2879558ad380ab52992c5d8aa03fbfbb0544268b..fd2657f8e50b0ce7a51c60da1c3ce9167f29f1c4 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring4-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring4-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -32,11 +32,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -45,11 +45,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -57,22 +57,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -85,11 +85,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 32 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -137,9 +137,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 33 } } } -TypeError: Type '[number]' is not assignable to type '[number, string]'. [arrayDestructuring4.ts:1:5] +TypeError: Type '[1]' is not assignable to type '[number, string]'. [arrayDestructuring4.ts:17:5] diff --git a/es2panda/test/compiler/ts/arrayDestructuring40-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring40-expected.txt index c946d705c236d8e9757e47c67fefae538600f9ed..d03a61a5e73ce5816ccd218ec2a57b4b2011e0d5 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring40-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring40-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -76,11 +76,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -88,11 +88,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 2 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -100,11 +100,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -117,14 +117,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -132,11 +132,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -144,33 +144,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -182,9 +182,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } } -TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring40.ts:2:3] +TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring40.ts:18:3] diff --git a/es2panda/test/compiler/ts/arrayDestructuring41-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring41-expected.txt index c2063a6f29142b904510b342871f2d2932c39a93..618b477f91ccacf27c22095e405f81d1f08ca23d 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring41-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring41-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -84,22 +84,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -134,11 +134,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 3 }, "end": { - "line": 3, + "line": 19, "column": 4 } } @@ -146,11 +146,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -158,11 +158,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -176,11 +176,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -188,33 +188,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 12 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -226,9 +226,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } } -TypeError: Type 'number' must have a '[Symbol.iterator]()' method that returns an interator [arrayDestructuring41.ts:3:2] +TypeError: Type number must have a '[Symbol.iterator]()' method that returns an iterator. [arrayDestructuring41.ts:19:2] diff --git a/es2panda/test/compiler/ts/arrayDestructuring42-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring42-expected.txt index 4e600195d6269a818e47855b47998897bc2f8026..ca216ad10edd017bb9b30b36889ccf574f772ae7 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring42-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring42-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -86,11 +86,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 3 } } @@ -98,11 +98,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 4 } } @@ -115,14 +115,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -132,11 +132,11 @@ "value": 1, "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -144,11 +144,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 18 } } @@ -156,33 +156,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -194,9 +194,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } } -TypeError: Type '(string | number)[]' is not assignable to type 'string[]'. [arrayDestructuring42.ts:3:2] +TypeError: Type '(string | number)[]' is not assignable to type 'string[]'. [arrayDestructuring42.ts:19:2] diff --git a/es2panda/test/compiler/ts/arrayDestructuring43-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring43-expected.txt index 063d3db0dc7e15e239264ac4dca7593062def1ef..73991af08f1d2648a07238ff13b4b7cb8bbb7b58 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring43-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring43-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -88,22 +88,22 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -111,11 +111,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -128,11 +128,11 @@ "value": 2, "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -140,33 +140,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -178,9 +178,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } } -TypeError: Type 'number[]' is not assignable to type 'string[]'. [arrayDestructuring43.ts:3:5] +TypeError: Type '[number]' is not assignable to type 'string[]'. [arrayDestructuring43.ts:19:5] diff --git a/es2panda/test/compiler/ts/arrayDestructuring44-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring44-expected.txt index 8cfa02c7460cab095451a84721345b258c81d214..4bf503a251c1534ef95ad35a69ce70ef3e52646c 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring44-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring44-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -86,22 +86,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -109,11 +109,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -121,11 +121,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -134,11 +134,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -162,22 +162,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 7 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 3 }, "end": { - "line": 4, + "line": 20, "column": 7 } } @@ -185,11 +185,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 2 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -202,22 +202,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -225,11 +225,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -242,14 +242,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 20 }, "end": { - "line": 4, + "line": 20, "column": 25 } } @@ -259,11 +259,11 @@ "value": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 27 }, "end": { - "line": 4, + "line": 20, "column": 32 } } @@ -271,25 +271,25 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 4, + "line": 20, "column": 33 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 35 }, "end": { - "line": 4, + "line": 20, "column": 40 } } @@ -297,33 +297,33 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 18 }, "end": { - "line": 4, + "line": 20, "column": 41 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 41 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 41 } } @@ -335,9 +335,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 41 } } } -TypeError: Type '(string | boolean)[]' is not assignable to type 'string[]'. [arrayDestructuring44.ts:4:6] +TypeError: Type '[string, boolean]' is not assignable to type 'string[]'. [arrayDestructuring44.ts:20:6] diff --git a/es2panda/test/compiler/ts/arrayDestructuring5-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring5-expected.txt index 735dc64d7f7a70411a1a13ee370185033bf8930c..d16b14b9938ea85e33c703c83ad1a9bf7718890e 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring5-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring5-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -31,22 +31,22 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -59,36 +59,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -101,11 +101,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -114,11 +114,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -126,22 +126,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -154,11 +154,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -168,11 +168,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -180,22 +180,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 50 } } @@ -204,11 +204,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -220,9 +220,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 51 } } } -TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring5.ts:1:13] +TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring5.ts:17:13] diff --git a/es2panda/test/compiler/ts/arrayDestructuring6-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring6-expected.txt index 88e0bb70b80da5ca875f1251c65de0d53def159a..90445bd028f8f35b5c12b598921c0fbbdca916cf 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring6-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring6-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -30,11 +30,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -49,22 +49,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -76,11 +76,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -89,11 +89,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -101,11 +101,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -113,22 +113,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -141,11 +141,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -155,11 +155,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 49 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 50 } } @@ -211,11 +211,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -225,33 +225,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -263,9 +263,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'number | string'. [arrayDestructuring6.ts:2:1] +TypeError: Type '{ }' is not assignable to type 'number | string'. [arrayDestructuring6.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring7-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring7-expected.txt index de1907b8a13cadfcfa09899907d911fe8b0f56be..fd12b0aeb9c7fb9a63f7a5eeaa30167aecf73247 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring7-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring7-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -34,25 +34,25 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -60,22 +60,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -86,11 +86,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -98,11 +98,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -118,11 +118,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -132,11 +132,11 @@ "value": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -144,11 +144,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -156,22 +156,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -180,11 +180,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -196,9 +196,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [arrayDestructuring7.ts:1:22] +TypeError: Tuple type [boolean[]] of length 1 has no element at index 1. [arrayDestructuring7.ts:17:5] diff --git a/es2panda/test/compiler/ts/arrayDestructuring8-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring8-expected.txt index 4c570dffae60266854d667b5230d9e94cf20936a..e26c0dd64d78582e693273c7be0552d2e28ade18 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring8-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring8-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -34,25 +34,25 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -60,22 +60,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -86,11 +86,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -98,11 +98,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -118,11 +118,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -132,11 +132,11 @@ "value": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -144,11 +144,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -158,28 +158,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 49 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -187,11 +187,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 58 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -243,11 +243,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -257,33 +257,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -295,9 +295,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type '(number | string)[] | boolean[]'. [arrayDestructuring8.ts:2:1] +TypeError: Type '{ }' is not assignable to type 'boolean[] | (number | string)[]'. [arrayDestructuring8.ts:18:1] diff --git a/es2panda/test/compiler/ts/arrayDestructuring9-expected.txt b/es2panda/test/compiler/ts/arrayDestructuring9-expected.txt index d87dfae53afc1b1796c4a8ef932dd382a32ecad0..7dbfae9f83415e9a1720ae0d6fba8d8e6f560c27 100644 --- a/es2panda/test/compiler/ts/arrayDestructuring9-expected.txt +++ b/es2panda/test/compiler/ts/arrayDestructuring9-expected.txt @@ -15,11 +15,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -32,22 +32,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -55,11 +55,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -72,11 +72,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -84,22 +84,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -145,11 +145,11 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -157,33 +157,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 8 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -195,9 +195,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } } -TypeError: Type '[number]' is not assignable to type '[]'. [arrayDestructuring9.ts:2:1] +TypeError: Type '[1]' is not assignable to type '[]'. [arrayDestructuring9.ts:18:1] diff --git a/es2panda/test/compiler/ts/array_1-expected.txt b/es2panda/test/compiler/ts/array_1-expected.txt index b7e2dbe33f6f1093d7666b5f54d886bf7894c077..4f0d40dd8791495c76543ea6d0574977565f0302 100644 --- a/es2panda/test/compiler/ts/array_1-expected.txt +++ b/es2panda/test/compiler/ts/array_1-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,14 +97,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -114,11 +114,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [array_1.ts:2:12] +TypeError: Type 'number' is not assignable to type 'string'. [array_1.ts:18:12] diff --git a/es2panda/test/compiler/ts/array_10-expected.txt b/es2panda/test/compiler/ts/array_10-expected.txt index 23a6c5641946e4d1ebbd0bad3e1c9f399560bac3..6cad05de2761ccdb73fc20619ef599255a7ceeb8 100644 --- a/es2panda/test/compiler/ts/array_10-expected.txt +++ b/es2panda/test/compiler/ts/array_10-expected.txt @@ -15,22 +15,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,11 +100,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -114,11 +114,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'boolean' is not assignable to type 'number'. [array_10.ts:2:6] +TypeError: Type 'boolean' is not assignable to type 'number'. [array_10.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_11-expected.txt b/es2panda/test/compiler/ts/array_11-expected.txt index fd58980b024f70e3905dd29533ea14c845ad46bf..de52c32077fca64d0781d522fc99fbb9caa3b388 100644 --- a/es2panda/test/compiler/ts/array_11-expected.txt +++ b/es2panda/test/compiler/ts/array_11-expected.txt @@ -15,22 +15,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,26 +100,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'bigint' is not assignable to type 'number'. [array_11.ts:2:8] +TypeError: Type 'bigint' is not assignable to type 'number'. [array_11.ts:18:8] diff --git a/es2panda/test/compiler/ts/array_12-expected.txt b/es2panda/test/compiler/ts/array_12-expected.txt index 75d5413b0ef9eb9eb042228d5d92757b2c756998..12573987be52a10f297828b0cec4d8700d58b75b 100644 --- a/es2panda/test/compiler/ts/array_12-expected.txt +++ b/es2panda/test/compiler/ts/array_12-expected.txt @@ -15,22 +15,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,15 +97,14 @@ "elements": [ { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -115,11 +114,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'bigint' is not assignable to type 'number'. [array_12.ts:2:6] +TypeError: Type 'bigint' is not assignable to type 'number'. [array_12.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_13-expected.txt b/es2panda/test/compiler/ts/array_13-expected.txt index 4654cc58a08c02e1f54832511953fd8bf531eca0..f7d3f0ef9717d43138e3294f2fd75a0b32a2b9ea 100644 --- a/es2panda/test/compiler/ts/array_13-expected.txt +++ b/es2panda/test/compiler/ts/array_13-expected.txt @@ -15,22 +15,22 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,29 +97,28 @@ "elements": [ { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 8 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'bigint'. [array_13.ts:2:9] +TypeError: Type 'string' is not assignable to type 'bigint'. [array_13.ts:18:9] diff --git a/es2panda/test/compiler/ts/array_14-expected.txt b/es2panda/test/compiler/ts/array_14-expected.txt index f56a52c4b5942f29bdfc6d48ff528ebafd698802..377b7f1186119df71be55bbbca2ee66d56b937d2 100644 --- a/es2panda/test/compiler/ts/array_14-expected.txt +++ b/es2panda/test/compiler/ts/array_14-expected.txt @@ -15,22 +15,22 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,29 +97,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'bigint'. [array_14.ts:2:6] +TypeError: Type 'string' is not assignable to type 'bigint'. [array_14.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_15-expected.txt b/es2panda/test/compiler/ts/array_15-expected.txt index c2a132421f8c96558dfb9ba3c3d8372d14b56898..f2578132c384e16ddfc60f159d902208630ff97f 100644 --- a/es2panda/test/compiler/ts/array_15-expected.txt +++ b/es2panda/test/compiler/ts/array_15-expected.txt @@ -15,22 +15,22 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,15 +97,14 @@ "elements": [ { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -115,11 +114,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [array_15.ts:2:9] +TypeError: Type 'number' is not assignable to type 'bigint'. [array_15.ts:18:9] diff --git a/es2panda/test/compiler/ts/array_16-expected.txt b/es2panda/test/compiler/ts/array_16-expected.txt index 3b7fd5001b85b1ba02d0dfc3e67ab9c3c34423a9..8112a053afc5ed8e16edb27e7a98834260fa3d3a 100644 --- a/es2panda/test/compiler/ts/array_16-expected.txt +++ b/es2panda/test/compiler/ts/array_16-expected.txt @@ -15,22 +15,22 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,26 +100,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [array_16.ts:2:6] +TypeError: Type 'number' is not assignable to type 'bigint'. [array_16.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_17-expected.txt b/es2panda/test/compiler/ts/array_17-expected.txt index c368ec059d2b3919b317164f669527cb691a2a95..7e86b99487e6fb35933ac31241742cdc4d79bfc8 100644 --- a/es2panda/test/compiler/ts/array_17-expected.txt +++ b/es2panda/test/compiler/ts/array_17-expected.txt @@ -15,22 +15,22 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,15 +97,14 @@ "elements": [ { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -115,11 +114,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'boolean' is not assignable to type 'bigint'. [array_17.ts:2:9] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [array_17.ts:18:9] diff --git a/es2panda/test/compiler/ts/array_18-expected.txt b/es2panda/test/compiler/ts/array_18-expected.txt index dbacad2a124521f822492445dd1cb65dbe3473fa..29a7d2930253b07a9137c5beb01204466922c12c 100644 --- a/es2panda/test/compiler/ts/array_18-expected.txt +++ b/es2panda/test/compiler/ts/array_18-expected.txt @@ -15,22 +15,22 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,26 +100,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'boolean' is not assignable to type 'bigint'. [array_18.ts:2:6] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [array_18.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_19-expected.txt b/es2panda/test/compiler/ts/array_19-expected.txt index 94e7c8bf2fd814e987adc992346653c9966f1a51..3968c3c2829a04fd7c31c47cd55c6afe1ff94cdb 100644 --- a/es2panda/test/compiler/ts/array_19-expected.txt +++ b/es2panda/test/compiler/ts/array_19-expected.txt @@ -15,22 +15,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,25 +100,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'boolean'. [array_19.ts:2:12] +TypeError: Type 'string' is not assignable to type 'boolean'. [array_19.ts:18:12] diff --git a/es2panda/test/compiler/ts/array_2-expected.txt b/es2panda/test/compiler/ts/array_2-expected.txt index 445363a2712a8a0a5ce6050de36d2d9a300558ad..cd02bf06afa018cce0e7b1c905e9e34495c85f7a 100644 --- a/es2panda/test/compiler/ts/array_2-expected.txt +++ b/es2panda/test/compiler/ts/array_2-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,25 +100,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [array_2.ts:2:6] +TypeError: Type 'number' is not assignable to type 'string'. [array_2.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_20-expected.txt b/es2panda/test/compiler/ts/array_20-expected.txt index eb8fd7639e604c98e0494779f426ad0440e51acd..6c659b60a67e01b597d2729b7a19f8a7cdf5e7b1 100644 --- a/es2panda/test/compiler/ts/array_20-expected.txt +++ b/es2panda/test/compiler/ts/array_20-expected.txt @@ -15,22 +15,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,14 +97,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -114,11 +114,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'boolean'. [array_20.ts:2:6] +TypeError: Type 'string' is not assignable to type 'boolean'. [array_20.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_21-expected.txt b/es2panda/test/compiler/ts/array_21-expected.txt index 15c9c123c3d7f92652606661c4aa3d4a57febdd4..2177cc489c1463a1fb804c937b1dc40affb96d90 100644 --- a/es2panda/test/compiler/ts/array_21-expected.txt +++ b/es2panda/test/compiler/ts/array_21-expected.txt @@ -15,22 +15,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,11 +100,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -114,11 +114,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [array_21.ts:2:12] +TypeError: Type 'number' is not assignable to type 'boolean'. [array_21.ts:18:12] diff --git a/es2panda/test/compiler/ts/array_22-expected.txt b/es2panda/test/compiler/ts/array_22-expected.txt index f81fd136140088c7f9052ac6db4a450cbb4bbee8..567328e46bd61b8e9c0cdd1cd0808a238a1d15e7 100644 --- a/es2panda/test/compiler/ts/array_22-expected.txt +++ b/es2panda/test/compiler/ts/array_22-expected.txt @@ -15,22 +15,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,11 +100,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -114,11 +114,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [array_22.ts:2:6] +TypeError: Type 'number' is not assignable to type 'boolean'. [array_22.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_23-expected.txt b/es2panda/test/compiler/ts/array_23-expected.txt index 6a237b832f0d73c113ce0a17aae4d81ba71278f7..4dcf756eed053eb510675376d0ca9630c09c8d94 100644 --- a/es2panda/test/compiler/ts/array_23-expected.txt +++ b/es2panda/test/compiler/ts/array_23-expected.txt @@ -15,22 +15,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,26 +100,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'bigint' is not assignable to type 'boolean'. [array_23.ts:2:12] +TypeError: Type 'bigint' is not assignable to type 'boolean'. [array_23.ts:18:12] diff --git a/es2panda/test/compiler/ts/array_24-expected.txt b/es2panda/test/compiler/ts/array_24-expected.txt index 3e566fba7464430a4ae972345260028ad93f568e..d941f2e59d677491ad1ccc5f6bea46b733f9fa0c 100644 --- a/es2panda/test/compiler/ts/array_24-expected.txt +++ b/es2panda/test/compiler/ts/array_24-expected.txt @@ -15,22 +15,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,15 +97,14 @@ "elements": [ { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -115,11 +114,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'bigint' is not assignable to type 'boolean'. [array_24.ts:2:6] +TypeError: Type 'bigint' is not assignable to type 'boolean'. [array_24.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_3-expected.txt b/es2panda/test/compiler/ts/array_3-expected.txt index 68dfe9ac83db40d0f652a99b848db2c91c26207a..22aec25ed29af5449902a0c43c08c5cd548ea1e2 100644 --- a/es2panda/test/compiler/ts/array_3-expected.txt +++ b/es2panda/test/compiler/ts/array_3-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,14 +97,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -114,11 +114,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'boolean' is not assignable to type 'string'. [array_3.ts:2:12] +TypeError: Type 'boolean' is not assignable to type 'string'. [array_3.ts:18:12] diff --git a/es2panda/test/compiler/ts/array_4-expected.txt b/es2panda/test/compiler/ts/array_4-expected.txt index 12a1fa2d69547ffefaec5a658e8035092942d2ec..6b8d4be005e8985dc071582b204cea60c41ca916 100644 --- a/es2panda/test/compiler/ts/array_4-expected.txt +++ b/es2panda/test/compiler/ts/array_4-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,25 +100,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'boolean' is not assignable to type 'string'. [array_4.ts:2:6] +TypeError: Type 'boolean' is not assignable to type 'string'. [array_4.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_5-expected.txt b/es2panda/test/compiler/ts/array_5-expected.txt index 09cb8ec7cb345b5486a129069f52d9199c328d85..491b826f9c0bb5af2a70f6335f2294be0a0b67b9 100644 --- a/es2panda/test/compiler/ts/array_5-expected.txt +++ b/es2panda/test/compiler/ts/array_5-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,29 +97,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'bigint' is not assignable to type 'string'. [array_5.ts:2:12] +TypeError: Type 'bigint' is not assignable to type 'string'. [array_5.ts:18:12] diff --git a/es2panda/test/compiler/ts/array_6-expected.txt b/es2panda/test/compiler/ts/array_6-expected.txt index 67bfe597c87341780b1715183fb32e3a4f7d61ff..257668474639806c0fbabcd9b4fc864cd7e70fb2 100644 --- a/es2panda/test/compiler/ts/array_6-expected.txt +++ b/es2panda/test/compiler/ts/array_6-expected.txt @@ -15,22 +15,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,29 +97,28 @@ "elements": [ { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 8 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -127,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -165,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'bigint' is not assignable to type 'string'. [array_6.ts:2:6] +TypeError: Type 'bigint' is not assignable to type 'string'. [array_6.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_7-expected.txt b/es2panda/test/compiler/ts/array_7-expected.txt index 86d90875bf02aa43ab9520140a6a779f270679d0..c1e8f284576baba958e73d7d8c9919c82437ea41 100644 --- a/es2panda/test/compiler/ts/array_7-expected.txt +++ b/es2panda/test/compiler/ts/array_7-expected.txt @@ -15,22 +15,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,25 +100,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [array_7.ts:2:8] +TypeError: Type 'string' is not assignable to type 'number'. [array_7.ts:18:8] diff --git a/es2panda/test/compiler/ts/array_8-expected.txt b/es2panda/test/compiler/ts/array_8-expected.txt index 25bc4258bd29c5fb2c8ba14ac1c77e17f61b2d9e..25db986847a7a3454dd8e8448791e35cb5995a28 100644 --- a/es2panda/test/compiler/ts/array_8-expected.txt +++ b/es2panda/test/compiler/ts/array_8-expected.txt @@ -15,22 +15,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -97,14 +97,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -114,11 +114,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [array_8.ts:2:6] +TypeError: Type 'string' is not assignable to type 'number'. [array_8.ts:18:6] diff --git a/es2panda/test/compiler/ts/array_9-expected.txt b/es2panda/test/compiler/ts/array_9-expected.txt index f0853be994971a59b95dbb0967c0e27e8aabe8aa..02d13f663eca58c412b16486f5d375fd35946fcb 100644 --- a/es2panda/test/compiler/ts/array_9-expected.txt +++ b/es2panda/test/compiler/ts/array_9-expected.txt @@ -15,22 +15,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -100,11 +100,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -114,11 +114,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -126,33 +126,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -164,9 +164,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type 'boolean' is not assignable to type 'number'. [array_9.ts:2:8] +TypeError: Type 'boolean' is not assignable to type 'number'. [array_9.ts:18:8] diff --git a/es2panda/test/compiler/ts/as_expression_1-expected.txt b/es2panda/test/compiler/ts/as_expression_1-expected.txt index d74f3fd14a18d6a26388af10ea196dc2235deeee..66315256ec07ec824b24e88ed7cb118afc8b2393 100644 --- a/es2panda/test/compiler/ts/as_expression_1-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_1-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -25,14 +25,14 @@ "type": "TSAsExpression", "expression": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -41,33 +41,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -76,11 +76,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -92,9 +92,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 1 } } } -TypeError: Conversion of type 'string' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. [as_expression_1.ts:1:9] +TypeError: Conversion of type 'string' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. [as_expression_1.ts:17:9] diff --git a/es2panda/test/compiler/ts/as_expression_10-expected.txt b/es2panda/test/compiler/ts/as_expression_10-expected.txt index 3d1b8ce40aeaf9d867f6b2f26693a20d1bb4eccc..61080194770181b075d3fff80ec2dcfcc3ab4f27 100644 --- a/es2panda/test/compiler/ts/as_expression_10-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_10-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -182,33 +182,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -220,9 +220,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'readonly [5, 5, 5, 5]'. [as_expression_10.ts:2:1] +TypeError: Type 'number' is not assignable to type 'readonly [5, 5, 5, 5]'. [as_expression_10.ts:18:1] diff --git a/es2panda/test/compiler/ts/as_expression_11-expected.txt b/es2panda/test/compiler/ts/as_expression_11-expected.txt index 53076f9b745cbba06697165f97f607e0b54dc8fa..b04baf86179cd14e0b3d1542ce8c5c9e944dd0a6 100644 --- a/es2panda/test/compiler/ts/as_expression_11-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_11-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -170,11 +170,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -184,11 +184,11 @@ "value": 0, "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -197,11 +197,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -211,33 +211,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -249,9 +249,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Cannot assign to '0' because it is a read-only property. [as_expression_11.ts:2:3] +TypeError: Cannot assign to this property because it is readonly. [as_expression_11.ts:18:1] diff --git a/es2panda/test/compiler/ts/as_expression_12-expected.txt b/es2panda/test/compiler/ts/as_expression_12-expected.txt index 67e68e4482352c10849d9b2e81f5b148a4482357..d44cca1f26afa8d8868758e9876baf652bdccd6b 100644 --- a/es2panda/test/compiler/ts/as_expression_12-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_12-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -170,11 +170,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -184,11 +184,11 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -197,11 +197,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -211,33 +211,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -249,9 +249,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Cannot assign to '1' because it is a read-only property. [as_expression_12.ts:2:3] +TypeError: Cannot assign to this property because it is readonly. [as_expression_12.ts:18:1] diff --git a/es2panda/test/compiler/ts/as_expression_13-expected.txt b/es2panda/test/compiler/ts/as_expression_13-expected.txt index a1c657097f35e978abce7b61e184af3c8dc0e656..99a3a9abdbf35d54eb2adf472c7ab4f175415ad1 100644 --- a/es2panda/test/compiler/ts/as_expression_13-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_13-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -170,11 +170,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -184,11 +184,11 @@ "value": 2, "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -197,11 +197,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -211,33 +211,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -249,9 +249,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Cannot assign to '2' because it is a read-only property. [as_expression_13.ts:2:3] +TypeError: Cannot assign to this property because it is readonly. [as_expression_13.ts:18:1] diff --git a/es2panda/test/compiler/ts/as_expression_14-expected.txt b/es2panda/test/compiler/ts/as_expression_14-expected.txt index 5ae25f1d8363126a2c8bfe1ff3f419d005425540..4d413b44e6a70c6fb751d6dd48cf3f670e32f617 100644 --- a/es2panda/test/compiler/ts/as_expression_14-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_14-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -170,11 +170,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -184,11 +184,11 @@ "value": 3, "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -197,11 +197,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -211,33 +211,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -249,9 +249,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Cannot assign to '3' because it is a read-only property. [as_expression_14.ts:2:3] +TypeError: Cannot assign to this property because it is readonly. [as_expression_14.ts:18:1] diff --git a/es2panda/test/compiler/ts/as_expression_15-expected.txt b/es2panda/test/compiler/ts/as_expression_15-expected.txt index 86eb885bd86a338097af2b2c0db09d87f5836a25..29016fb7be86bd2534879aec603712b428dcbd65 100644 --- a/es2panda/test/compiler/ts/as_expression_15-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_15-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 31 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -170,11 +170,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -184,11 +184,11 @@ "value": 4, "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -197,11 +197,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -211,33 +211,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -249,9 +249,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Tuple type 'readonly [5, 5, 5, 5]' of length '4' has no element at index '4'. [as_expression_15.ts:2:3] +TypeError: Property 4 does not exist on this type. [as_expression_15.ts:18:3] diff --git a/es2panda/test/compiler/ts/as_expression_2-expected.txt b/es2panda/test/compiler/ts/as_expression_2-expected.txt index a92d47bb871ff8ed48f07377f499abd98940adbf..6d21d9546f7e726f1573970a1a65a5b4e6219423 100644 --- a/es2panda/test/compiler/ts/as_expression_2-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_2-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -69,11 +69,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -86,44 +86,44 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -135,9 +135,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. [as_expression_2.ts:2:1] +TypeError: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. [as_expression_2.ts:18:1] diff --git a/es2panda/test/compiler/ts/as_expression_3-expected.txt b/es2panda/test/compiler/ts/as_expression_3-expected.txt index ca7a905bb2018da715e8835de3693cd09ff16036..fe74cb3cc5cb030ee013c3df96cd6fa52e7fb85a 100644 --- a/es2panda/test/compiler/ts/as_expression_3-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_3-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,12 +45,12 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 12 + "line": 17, + "column": 13 }, "end": { - "line": 1, - "column": 13 + "line": 17, + "column": 14 } } }, @@ -59,12 +59,12 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 14 + "line": 17, + "column": 16 }, "end": { - "line": 1, - "column": 15 + "line": 17, + "column": 17 } } }, @@ -73,24 +73,24 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 16 + "line": 17, + "column": 19 }, "end": { - "line": 1, - "column": 17 + "line": 17, + "column": 20 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, - "column": 18 + "line": 17, + "column": 21 } } }, @@ -102,45 +102,45 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 22 + "line": 17, + "column": 25 }, "end": { - "line": 1, - "column": 27 + "line": 17, + "column": 30 } } }, "loc": { "start": { - "line": 1, - "column": 22 + "line": 17, + "column": 25 }, "end": { - "line": 1, - "column": 27 + "line": 17, + "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, - "column": 28 + "line": 17, + "column": 31 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, - "column": 28 + "line": 17, + "column": 31 } } } @@ -148,12 +148,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 28 + "line": 17, + "column": 31 } } }, @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -182,14 +182,14 @@ "elements": [ { "type": "NumberLiteral", - "value": 4, + "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -199,12 +199,12 @@ "value": 5, "loc": { "start": { - "line": 2, - "column": 8 + "line": 18, + "column": 9 }, "end": { - "line": 2, - "column": 9 + "line": 18, + "column": 10 } } }, @@ -213,60 +213,60 @@ "value": 5, "loc": { "start": { - "line": 2, - "column": 10 + "line": 18, + "column": 12 }, "end": { - "line": 2, - "column": 11 + "line": 18, + "column": 13 } } }, { - "type": "NumberLiteral", - "value": 5, + "type": "StringLiteral", + "value": "bar", "loc": { "start": { - "line": 2, - "column": 12 + "line": 18, + "column": 15 }, "end": { - "line": 2, - "column": 13 + "line": 18, + "column": 20 } } } ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, - "column": 14 + "line": 18, + "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, - "column": 14 + "line": 18, + "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, - "column": 15 + "line": 18, + "column": 22 } } } @@ -277,9 +277,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type '4' is not assignable to type '5'. [as_expression_3.ts:2:6] +TypeError: Type '"bar"' is not assignable to type '5'. [as_expression_3.ts:18:15] diff --git a/es2panda/test/compiler/ts/as_expression_3.ts b/es2panda/test/compiler/ts/as_expression_3.ts index b0e9d7e8e3689f73bfdb1387fe7083ba8a825fa3..b78c737f8f31e18ce6ce51d5c02a997734078e25 100644 --- a/es2panda/test/compiler/ts/as_expression_3.ts +++ b/es2panda/test/compiler/ts/as_expression_3.ts @@ -14,5 +14,5 @@ */ -var a = [5,5,5,5] as const; -a = [4,5,5,5]; +var a = [5, 5, 5, 5] as const; +a = [5, 5, 5, "bar"]; diff --git a/es2panda/test/compiler/ts/as_expression_4-expected.txt b/es2panda/test/compiler/ts/as_expression_4-expected.txt index a606afec1356cb89cb613e05d7756e8ed0af9316..1b8efe2e7a003c01004030ab58c65adddfee107d 100644 --- a/es2panda/test/compiler/ts/as_expression_4-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_4-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -185,11 +185,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -199,11 +199,11 @@ "value": 4, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -213,11 +213,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -227,11 +227,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -239,33 +239,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -277,9 +277,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type '4' is not assignable to type '5'. [as_expression_4.ts:2:8] +TypeError: Type '4' is not assignable to type '5'. [as_expression_4.ts:18:8] diff --git a/es2panda/test/compiler/ts/as_expression_5-expected.txt b/es2panda/test/compiler/ts/as_expression_5-expected.txt index 56d0e25d38b66c05ead4325032061fd9b94cfb66..96fb1d4030388380f68ef441853d0749b569cadb 100644 --- a/es2panda/test/compiler/ts/as_expression_5-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_5-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -185,11 +185,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -199,11 +199,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -213,11 +213,11 @@ "value": 4, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -227,11 +227,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -239,33 +239,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -277,9 +277,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type '4' is not assignable to type '5'. [as_expression_5.ts:2:10] +TypeError: Type '4' is not assignable to type '5'. [as_expression_5.ts:18:10] diff --git a/es2panda/test/compiler/ts/as_expression_6-expected.txt b/es2panda/test/compiler/ts/as_expression_6-expected.txt index 26df7e458ec62a62f72c8dc12c57a337d69a8a31..b53a8efc76445672911a28ef2bf2669406f28cfb 100644 --- a/es2panda/test/compiler/ts/as_expression_6-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_6-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 31 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -185,11 +185,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -199,11 +199,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -213,11 +213,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -227,11 +227,11 @@ "value": 4, "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -239,33 +239,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 17 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -277,9 +277,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type '4' is not assignable to type '5'. [as_expression_6.ts:2:15] +TypeError: Type '4' is not assignable to type '5'. [as_expression_6.ts:18:15] diff --git a/es2panda/test/compiler/ts/as_expression_7-expected.txt b/es2panda/test/compiler/ts/as_expression_7-expected.txt index b8d37b6a0da4b18a953a8e0e12bddd3a4563b5e4..5e40b943d244c7f05da3cb6802fa26a7df6cd495 100644 --- a/es2panda/test/compiler/ts/as_expression_7-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_7-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -185,11 +185,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -199,11 +199,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -213,11 +213,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -227,11 +227,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -241,11 +241,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -253,33 +253,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -291,9 +291,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type '[5, 5, 5, 5, 5]' is not assignable to type 'readonly [5, 5, 5, 5]'. [as_expression_7.ts:2:1] +TypeError: Type '[5, 5, 5, 5, 5]' is not assignable to type 'readonly [5, 5, 5, 5]'. [as_expression_7.ts:18:1] diff --git a/es2panda/test/compiler/ts/as_expression_8-expected.txt b/es2panda/test/compiler/ts/as_expression_8-expected.txt index e66afc663540bfcdc5a1ac20438d7f7b24c91529..8306e7a66377e3a48fe72d8c2519ad68dcb7c83b 100644 --- a/es2panda/test/compiler/ts/as_expression_8-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_8-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,11 +45,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -73,11 +73,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -102,44 +102,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -148,11 +148,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -185,11 +185,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -199,11 +199,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -213,11 +213,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -225,33 +225,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 12 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -263,9 +263,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type '[5, 5, 5]' is not assignable to type 'readonly [5, 5, 5, 5]'. [as_expression_8.ts:2:1] +TypeError: Type '[5, 5, 5]' is not assignable to type 'readonly [5, 5, 5, 5]'. [as_expression_8.ts:18:1] diff --git a/es2panda/test/compiler/ts/as_expression_9-expected.txt b/es2panda/test/compiler/ts/as_expression_9-expected.txt index 862d7f62a5327100009e7b146e618c9a36b7a3c9..dc0df92d897a18f9e5d9615e493ad6e68d9ba0d7 100644 --- a/es2panda/test/compiler/ts/as_expression_9-expected.txt +++ b/es2panda/test/compiler/ts/as_expression_9-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -31,11 +31,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -45,12 +45,12 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 12 + "line": 17, + "column": 13 }, "end": { - "line": 1, - "column": 13 + "line": 17, + "column": 14 } } }, @@ -59,12 +59,12 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 14 + "line": 17, + "column": 16 }, "end": { - "line": 1, - "column": 15 + "line": 17, + "column": 17 } } }, @@ -73,24 +73,24 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 16 + "line": 17, + "column": 19 }, "end": { - "line": 1, - "column": 17 + "line": 17, + "column": 20 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, - "column": 18 + "line": 17, + "column": 21 } } }, @@ -102,45 +102,45 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 22 + "line": 17, + "column": 25 }, "end": { - "line": 1, - "column": 27 + "line": 17, + "column": 30 } } }, "loc": { "start": { - "line": 1, - "column": 22 + "line": 17, + "column": 25 }, "end": { - "line": 1, - "column": 27 + "line": 17, + "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, - "column": 28 + "line": 17, + "column": 31 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, - "column": 28 + "line": 17, + "column": 31 } } } @@ -148,12 +148,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 28 + "line": 17, + "column": 31 } } }, @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -181,16 +181,16 @@ "type": "ArrayExpression", "elements": [ { - "type": "NumberLiteral", - "value": 5, + "type": "StringLiteral", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, - "column": 7 + "line": 18, + "column": 11 } } }, @@ -199,46 +199,46 @@ "value": 5, "loc": { "start": { - "line": 2, - "column": 8 + "line": 18, + "column": 13 }, "end": { - "line": 2, - "column": 9 + "line": 18, + "column": 14 } } } ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, - "column": 10 + "line": 18, + "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, - "column": 10 + "line": 18, + "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, - "column": 11 + "line": 18, + "column": 16 } } } @@ -249,9 +249,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Type '[5, 5]' is not assignable to type 'readonly [5, 5, 5, 5]'. [as_expression_9.ts:2:1] +TypeError: Type '"foo"' is not assignable to type '5'. [as_expression_9.ts:18:6] diff --git a/es2panda/test/compiler/ts/as_expression_9.ts b/es2panda/test/compiler/ts/as_expression_9.ts index 55d5491dd417b089a45ac756fe657cfef99ff07b..d4b43d87988b41d489f22fb10733f476e1466e9d 100644 --- a/es2panda/test/compiler/ts/as_expression_9.ts +++ b/es2panda/test/compiler/ts/as_expression_9.ts @@ -14,5 +14,5 @@ */ -var a = [5,5,5,5] as const; -a = [5,5]; +var a = [5, 5, 5, 5] as const; +a = ["foo", 5]; diff --git a/es2panda/test/compiler/ts/assignment_never-expected.txt b/es2panda/test/compiler/ts/assignment_never-expected.txt index a6878af6553ea9eeb29e50e96fe50e1488600b31..fc884a856db860fe6dbf31b552f8ab3c3d83c729 100644 --- a/es2panda/test/compiler/ts/assignment_never-expected.txt +++ b/es2panda/test/compiler/ts/assignment_never-expected.txt @@ -13,11 +13,11 @@ "type": "TSNeverKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -39,22 +39,22 @@ "value": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -63,11 +63,11 @@ "kind": "let", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -79,9 +79,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 1 } } } -TypeError: Type 'null' is not assignable to type 'never' [assignment_never.ts:1:5] +TypeError: Type 'null' is not assignable to type 'never'. [assignment_never.ts:17:5] diff --git a/es2panda/test/compiler/ts/assignment_unknown-expected.txt b/es2panda/test/compiler/ts/assignment_unknown-expected.txt index 4d4e9485ccb2d14eba14224322ab1d4f4fb95809..a05df3d19037776a9a167e9d044688151d00ac94 100644 --- a/es2panda/test/compiler/ts/assignment_unknown-expected.txt +++ b/es2panda/test/compiler/ts/assignment_unknown-expected.txt @@ -13,11 +13,11 @@ "type": "TSUnknownKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -50,11 +50,11 @@ "kind": "let", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } @@ -84,33 +84,33 @@ "value": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 9 } } @@ -140,33 +140,33 @@ "value": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 16 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 17 } } @@ -182,11 +182,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -196,33 +196,33 @@ "value": 12, "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -238,47 +238,47 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 9 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "Hello World", "loc": { "start": { - "line": 6, + "line": 22, "column": 12 }, "end": { - "line": 6, + "line": 22, "column": 25 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 25 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 26 } } @@ -294,11 +294,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 9 } } @@ -308,33 +308,33 @@ "elements": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -350,11 +350,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 9 } } @@ -364,33 +364,33 @@ "properties": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 12 }, "end": { - "line": 8, + "line": 24, "column": 14 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 14 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 15 } } @@ -402,7 +402,7 @@ "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 1 } } diff --git a/es2panda/test/compiler/ts/cannotAssignToConst-expected.txt b/es2panda/test/compiler/ts/cannotAssignToConst-expected.txt index 6d48b72b9c386b59ed4d626ea64e18fac1902902..a120f0ec42bfd27f824b844323a83e92dec1dd63 100644 --- a/es2panda/test/compiler/ts/cannotAssignToConst-expected.txt +++ b/es2panda/test/compiler/ts/cannotAssignToConst-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -26,22 +26,22 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -50,11 +50,11 @@ "kind": "const", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "NumberLiteral", - "value": 6, + "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -122,9 +122,9 @@ "column": 1 }, "end": { - "line": 2, - "column": 7 + "line": 19, + "column": 1 } } } -TypeError: Cannot assign to 'a' because it is a constant [cannotAssignToConst.ts:2:1] +TypeError: Cannot assign to a because it is a constant. [cannotAssignToConst.ts:18:1] diff --git a/es2panda/test/compiler/ts/cannotAssignToConst.ts b/es2panda/test/compiler/ts/cannotAssignToConst.ts index 9bde3ebc760191dc64047a89bfb29762e125a067..e82138fd82b3ab0b9012fbb32abf8516452a1583 100644 --- a/es2panda/test/compiler/ts/cannotAssignToConst.ts +++ b/es2panda/test/compiler/ts/cannotAssignToConst.ts @@ -15,4 +15,4 @@ const a = 5; -a = 6; \ No newline at end of file +a = 5; diff --git a/es2panda/test/compiler/ts/constUsedBeforeDeclaration-expected.txt b/es2panda/test/compiler/ts/constUsedBeforeDeclaration-expected.txt index 12b074a3f9f2139ee8c47f3682e9e9da8e80f7d1..e58a6121ca39ad1effd3c67d6410eb64ecdd5391 100644 --- a/es2panda/test/compiler/ts/constUsedBeforeDeclaration-expected.txt +++ b/es2panda/test/compiler/ts/constUsedBeforeDeclaration-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 2 } } @@ -26,33 +26,33 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 6 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -82,22 +82,22 @@ "value": 6, "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 12 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -106,11 +106,11 @@ "kind": "const", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -122,9 +122,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } } -TypeError: Block-scoped variable 'a' used before its declaration [constUsedBeforeDeclaration.ts:1:1] +TypeError: Block-scoped variable 'a' used before its declaration [constUsedBeforeDeclaration.ts:18:7] diff --git a/es2panda/test/compiler/ts/functionCall-expected.txt b/es2panda/test/compiler/ts/functionCall-expected.txt index 188d10ff4f5329ea47f2692fbca3fdd1be01a58b..d917eae1dfa2cae816948677e179bcd45fb82cc3 100644 --- a/es2panda/test/compiler/ts/functionCall-expected.txt +++ b/es2panda/test/compiler/ts/functionCall-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -57,11 +57,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -71,33 +71,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -127,11 +127,11 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -140,22 +140,22 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 9 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -170,11 +170,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 10 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -190,11 +190,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 19 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -202,11 +202,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 16 }, "end": { - "line": 6, + "line": 22, "column": 17 } } @@ -216,11 +216,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 28 }, "end": { - "line": 6, + "line": 22, "column": 34 } } @@ -236,22 +236,22 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 13 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 14 } } @@ -259,33 +259,33 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 35 }, "end": { - "line": 8, + "line": 24, "column": 2 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -298,11 +298,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 6 }, "end": { - "line": 10, + "line": 26, "column": 18 } } @@ -320,11 +320,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 9 }, "end": { - "line": 11, + "line": 27, "column": 15 } } @@ -332,11 +332,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 6 }, "end": { - "line": 11, + "line": 27, "column": 7 } } @@ -346,22 +346,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 18 }, "end": { - "line": 11, + "line": 27, "column": 24 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 2 } } @@ -369,22 +369,22 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 21 }, "end": { - "line": 12, + "line": 28, "column": 2 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 9 } } @@ -399,11 +399,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 10 }, "end": { - "line": 14, + "line": 30, "column": 15 } } @@ -423,22 +423,22 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 20 }, "end": { - "line": 14, + "line": 30, "column": 32 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 20 }, "end": { - "line": 14, + "line": 30, "column": 32 } } @@ -446,11 +446,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 16 }, "end": { - "line": 14, + "line": 30, "column": 18 } } @@ -460,11 +460,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 35 }, "end": { - "line": 14, + "line": 30, "column": 41 } } @@ -482,11 +482,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 12 }, "end": { - "line": 15, + "line": 31, "column": 14 } } @@ -497,11 +497,11 @@ "value": 5, "loc": { "start": { - "line": 15, + "line": 31, "column": 15 }, "end": { - "line": 15, + "line": 31, "column": 16 } } @@ -510,22 +510,22 @@ "optional": false, "loc": { "start": { - "line": 15, + "line": 31, "column": 12 }, "end": { - "line": 15, + "line": 31, "column": 17 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 18 } } @@ -533,33 +533,33 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 42 }, "end": { - "line": 16, + "line": 32, "column": 2 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 2 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -580,22 +580,22 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 11 }, "end": { - "line": 18, + "line": 34, "column": 23 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 11 }, "end": { - "line": 18, + "line": 34, "column": 23 } } @@ -603,11 +603,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 5 }, "end": { - "line": 18, + "line": 34, "column": 9 } } @@ -615,11 +615,11 @@ "init": null, "loc": { "start": { - "line": 18, + "line": 34, "column": 5 }, "end": { - "line": 18, + "line": 34, "column": 9 } } @@ -628,11 +628,11 @@ "kind": "var", "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 24 } } @@ -647,11 +647,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 6 } } @@ -665,11 +665,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 7 }, "end": { - "line": 19, + "line": 35, "column": 12 } } @@ -683,11 +683,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 13 }, "end": { - "line": 19, + "line": 35, "column": 18 } } @@ -699,11 +699,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 19 }, "end": { - "line": 19, + "line": 35, "column": 23 } } @@ -712,11 +712,11 @@ "optional": false, "loc": { "start": { - "line": 19, + "line": 35, "column": 13 }, "end": { - "line": 19, + "line": 35, "column": 24 } } @@ -725,11 +725,11 @@ "optional": false, "loc": { "start": { - "line": 19, + "line": 35, "column": 7 }, "end": { - "line": 19, + "line": 35, "column": 25 } } @@ -738,22 +738,22 @@ "optional": false, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 26 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 27 } } @@ -768,11 +768,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 10 }, "end": { - "line": 21, + "line": 37, "column": 15 } } @@ -788,11 +788,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 19 }, "end": { - "line": 21, + "line": 37, "column": 25 } } @@ -800,11 +800,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 16 }, "end": { - "line": 21, + "line": 37, "column": 17 } } @@ -814,11 +814,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 28 }, "end": { - "line": 21, + "line": 37, "column": 34 } } @@ -838,33 +838,33 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 5 }, "end": { - "line": 22, + "line": 38, "column": 6 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 5 }, "end": { - "line": 22, + "line": 38, "column": 8 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 5 }, "end": { - "line": 22, + "line": 38, "column": 9 } } @@ -882,11 +882,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 12 }, "end": { - "line": 23, + "line": 39, "column": 13 } } @@ -896,22 +896,22 @@ "value": 0, "loc": { "start": { - "line": 23, + "line": 39, "column": 16 }, "end": { - "line": 23, + "line": 39, "column": 17 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 12 }, "end": { - "line": 23, + "line": 39, "column": 17 } } @@ -924,11 +924,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 20 }, "end": { - "line": 23, + "line": 39, "column": 25 } } @@ -940,11 +940,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 26 }, "end": { - "line": 23, + "line": 39, "column": 27 } } @@ -953,11 +953,11 @@ "optional": false, "loc": { "start": { - "line": 23, + "line": 39, "column": 20 }, "end": { - "line": 23, + "line": 39, "column": 28 } } @@ -968,33 +968,33 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 31 }, "end": { - "line": 23, + "line": 39, "column": 32 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 12 }, "end": { - "line": 23, + "line": 39, "column": 32 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 5 }, "end": { - "line": 23, + "line": 39, "column": 33 } } @@ -1002,33 +1002,33 @@ ], "loc": { "start": { - "line": 21, + "line": 37, "column": 35 }, "end": { - "line": 24, + "line": 40, "column": 2 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 2 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 2 } } @@ -1043,11 +1043,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 6 } } @@ -1062,22 +1062,22 @@ "value": 5, "loc": { "start": { - "line": 26, + "line": 42, "column": 8 }, "end": { - "line": 26, + "line": 42, "column": 9 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 7 }, "end": { - "line": 26, + "line": 42, "column": 9 } } @@ -1086,22 +1086,22 @@ "optional": false, "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 10 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 11 } } @@ -1116,11 +1116,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 1 }, "end": { - "line": 27, + "line": 43, "column": 6 } } @@ -1131,11 +1131,11 @@ "value": 0, "loc": { "start": { - "line": 27, + "line": 43, "column": 7 }, "end": { - "line": 27, + "line": 43, "column": 8 } } @@ -1144,22 +1144,22 @@ "optional": false, "loc": { "start": { - "line": 27, + "line": 43, "column": 1 }, "end": { - "line": 27, + "line": 43, "column": 9 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 1 }, "end": { - "line": 27, + "line": 43, "column": 10 } } @@ -1174,11 +1174,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 10 }, "end": { - "line": 29, + "line": 45, "column": 15 } } @@ -1194,11 +1194,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 19 }, "end": { - "line": 29, + "line": 45, "column": 25 } } @@ -1206,11 +1206,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 16 }, "end": { - "line": 29, + "line": 45, "column": 17 } } @@ -1222,11 +1222,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 30 }, "end": { - "line": 29, + "line": 45, "column": 36 } } @@ -1234,11 +1234,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 27 }, "end": { - "line": 29, + "line": 45, "column": 28 } } @@ -1251,22 +1251,22 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 41 }, "end": { - "line": 29, + "line": 45, "column": 42 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 38 }, "end": { - "line": 29, + "line": 45, "column": 42 } } @@ -1282,22 +1282,22 @@ "value": 5, "loc": { "start": { - "line": 30, + "line": 46, "column": 12 }, "end": { - "line": 30, + "line": 46, "column": 13 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 5 }, "end": { - "line": 30, + "line": 46, "column": 14 } } @@ -1305,33 +1305,33 @@ ], "loc": { "start": { - "line": 29, + "line": 45, "column": 44 }, "end": { - "line": 31, + "line": 47, "column": 2 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 1 }, "end": { - "line": 31, + "line": 47, "column": 2 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 1 }, "end": { - "line": 31, + "line": 47, "column": 2 } } @@ -1346,11 +1346,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 1 }, "end": { - "line": 33, + "line": 49, "column": 6 } } @@ -1361,25 +1361,25 @@ "value": 1, "loc": { "start": { - "line": 33, + "line": 49, "column": 7 }, "end": { - "line": 33, + "line": 49, "column": 8 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 33, + "line": 49, "column": 10 }, "end": { - "line": 33, + "line": 49, "column": 15 } } @@ -1388,22 +1388,22 @@ "optional": false, "loc": { "start": { - "line": 33, + "line": 49, "column": 1 }, "end": { - "line": 33, + "line": 49, "column": 16 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 1 }, "end": { - "line": 33, + "line": 49, "column": 17 } } @@ -1418,11 +1418,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 1 }, "end": { - "line": 34, + "line": 50, "column": 6 } } @@ -1433,25 +1433,25 @@ "value": 1, "loc": { "start": { - "line": 34, + "line": 50, "column": 7 }, "end": { - "line": 34, + "line": 50, "column": 8 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 34, + "line": 50, "column": 10 }, "end": { - "line": 34, + "line": 50, "column": 15 } } @@ -1461,11 +1461,11 @@ "value": 2, "loc": { "start": { - "line": 34, + "line": 50, "column": 17 }, "end": { - "line": 34, + "line": 50, "column": 18 } } @@ -1475,11 +1475,11 @@ "value": true, "loc": { "start": { - "line": 34, + "line": 50, "column": 20 }, "end": { - "line": 34, + "line": 50, "column": 24 } } @@ -1489,11 +1489,11 @@ "properties": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 26 }, "end": { - "line": 34, + "line": 50, "column": 28 } } @@ -1502,22 +1502,22 @@ "optional": false, "loc": { "start": { - "line": 34, + "line": 50, "column": 1 }, "end": { - "line": 34, + "line": 50, "column": 29 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 1 }, "end": { - "line": 34, + "line": 50, "column": 30 } } @@ -1532,11 +1532,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 10 }, "end": { - "line": 36, + "line": 52, "column": 15 } } @@ -1548,14 +1548,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 52, + "column": 19 + }, + "end": { + "line": 52, + "column": 22 + } + } + }, "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 16 }, "end": { - "line": 36, + "line": 52, "column": 17 } } @@ -1569,23 +1582,23 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 36, - "column": 23 + "line": 52, + "column": 28 }, "end": { - "line": 36, - "column": 29 + "line": 52, + "column": 34 } } }, "loc": { "start": { - "line": 36, - "column": 23 + "line": 52, + "column": 28 }, "end": { - "line": 36, - "column": 31 + "line": 52, + "column": 36 } } }, @@ -1593,12 +1606,12 @@ "decorators": [], "loc": { "start": { - "line": 36, - "column": 19 + "line": 52, + "column": 24 }, "end": { - "line": 36, - "column": 20 + "line": 52, + "column": 25 } } }, @@ -1607,52 +1620,52 @@ "argument": { "type": "Identifier", "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 36, - "column": 36 + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 52, + "column": 44 + }, + "end": { + "line": 52, + "column": 50 + } + } }, - "end": { - "line": 36, - "column": 37 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", "loc": { "start": { - "line": 36, - "column": 39 + "line": 52, + "column": 44 }, "end": { - "line": 36, - "column": 45 + "line": 52, + "column": 52 } } }, + "decorators": [], "loc": { "start": { - "line": 36, - "column": 39 + "line": 52, + "column": 41 }, "end": { - "line": 36, - "column": 47 + "line": 52, + "column": 42 } } }, "loc": { "start": { - "line": 36, - "column": 33 + "line": 52, + "column": 38 }, "end": { - "line": 36, - "column": 47 + "line": 52, + "column": 42 } } } @@ -1667,22 +1680,22 @@ "value": true, "loc": { "start": { - "line": 37, + "line": 53, "column": 12 }, "end": { - "line": 37, + "line": 53, "column": 16 } } }, "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 17 } } @@ -1690,33 +1703,33 @@ ], "loc": { "start": { - "line": 36, - "column": 49 + "line": 52, + "column": 54 }, "end": { - "line": 38, + "line": 54, "column": 2 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 2 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 2 } } @@ -1731,11 +1744,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 6 } } @@ -1746,11 +1759,11 @@ "value": 2, "loc": { "start": { - "line": 40, + "line": 56, "column": 7 }, "end": { - "line": 40, + "line": 56, "column": 8 } } @@ -1759,22 +1772,22 @@ "optional": false, "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 9 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 10 } } @@ -1789,11 +1802,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 6 } } @@ -1804,11 +1817,11 @@ "value": false, "loc": { "start": { - "line": 41, + "line": 57, "column": 7 }, "end": { - "line": 41, + "line": 57, "column": 12 } } @@ -1818,14 +1831,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 41, + "line": 57, "column": 15 }, "end": { - "line": 41, + "line": 57, "column": 20 } } @@ -1833,11 +1846,11 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 14 }, "end": { - "line": 41, + "line": 57, "column": 21 } } @@ -1846,22 +1859,22 @@ "optional": false, "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 22 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 23 } } @@ -1876,11 +1889,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 42, + "line": 58, "column": 6 } } @@ -1891,11 +1904,11 @@ "properties": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 7 }, "end": { - "line": 42, + "line": 58, "column": 9 } } @@ -1905,14 +1918,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 42, + "line": 58, "column": 12 }, "end": { - "line": 42, + "line": 58, "column": 17 } } @@ -1920,11 +1933,11 @@ ], "loc": { "start": { - "line": 42, + "line": 58, "column": 11 }, "end": { - "line": 42, + "line": 58, "column": 18 } } @@ -1934,11 +1947,11 @@ "value": 2, "loc": { "start": { - "line": 42, + "line": 58, "column": 20 }, "end": { - "line": 42, + "line": 58, "column": 21 } } @@ -1948,11 +1961,11 @@ "value": 3, "loc": { "start": { - "line": 42, + "line": 58, "column": 23 }, "end": { - "line": 42, + "line": 58, "column": 24 } } @@ -1962,11 +1975,11 @@ "value": 4, "loc": { "start": { - "line": 42, + "line": 58, "column": 26 }, "end": { - "line": 42, + "line": 58, "column": 27 } } @@ -1975,22 +1988,22 @@ "optional": false, "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 42, + "line": 58, "column": 28 } } }, "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 42, + "line": 58, "column": 29 } } @@ -2016,11 +2029,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 18 }, "end": { - "line": 44, + "line": 60, "column": 24 } } @@ -2028,11 +2041,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 15 }, "end": { - "line": 44, + "line": 60, "column": 16 } } @@ -2044,11 +2057,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 29 }, "end": { - "line": 44, + "line": 60, "column": 35 } } @@ -2056,11 +2069,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 26 }, "end": { - "line": 44, + "line": 60, "column": 27 } } @@ -2070,22 +2083,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 38 }, "end": { - "line": 44, + "line": 60, "column": 44 } } }, "loc": { "start": { - "line": 44, + "line": 60, "column": 14 }, "end": { - "line": 44, + "line": 60, "column": 45 } } @@ -2101,22 +2114,22 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 50 }, "end": { - "line": 44, + "line": 60, "column": 51 } } }, "loc": { "start": { - "line": 44, + "line": 60, "column": 47 }, "end": { - "line": 44, + "line": 60, "column": 51 } } @@ -2126,22 +2139,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 54 }, "end": { - "line": 44, + "line": 60, "column": 60 } } }, "loc": { "start": { - "line": 44, + "line": 60, "column": 46 }, "end": { - "line": 44, + "line": 60, "column": 62 } } @@ -2149,11 +2162,11 @@ ], "loc": { "start": { - "line": 44, + "line": 60, "column": 12 }, "end": { - "line": 44, + "line": 60, "column": 62 } } @@ -2161,11 +2174,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 5 }, "end": { - "line": 44, + "line": 60, "column": 10 } } @@ -2173,11 +2186,11 @@ "init": null, "loc": { "start": { - "line": 44, + "line": 60, "column": 5 }, "end": { - "line": 44, + "line": 60, "column": 10 } } @@ -2186,11 +2199,11 @@ "kind": "var", "loc": { "start": { - "line": 44, + "line": 60, "column": 1 }, "end": { - "line": 44, + "line": 60, "column": 63 } } @@ -2207,11 +2220,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 45, + "line": 61, "column": 8 }, "end": { - "line": 45, + "line": 61, "column": 14 } } @@ -2219,11 +2232,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 6 } } @@ -2236,11 +2249,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 17 }, "end": { - "line": 45, + "line": 61, "column": 22 } } @@ -2249,22 +2262,22 @@ "optional": false, "loc": { "start": { - "line": 45, + "line": 61, "column": 17 }, "end": { - "line": 45, + "line": 61, "column": 24 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 24 } } @@ -2273,11 +2286,11 @@ "kind": "var", "loc": { "start": { - "line": 45, + "line": 61, "column": 1 }, "end": { - "line": 45, + "line": 61, "column": 25 } } @@ -2294,11 +2307,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 46, + "line": 62, "column": 8 }, "end": { - "line": 46, + "line": 62, "column": 14 } } @@ -2306,11 +2319,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 5 }, "end": { - "line": 46, + "line": 62, "column": 6 } } @@ -2323,11 +2336,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 17 }, "end": { - "line": 46, + "line": 62, "column": 22 } } @@ -2338,11 +2351,11 @@ "value": 1, "loc": { "start": { - "line": 46, + "line": 62, "column": 23 }, "end": { - "line": 46, + "line": 62, "column": 24 } } @@ -2351,22 +2364,22 @@ "optional": false, "loc": { "start": { - "line": 46, + "line": 62, "column": 17 }, "end": { - "line": 46, + "line": 62, "column": 25 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 5 }, "end": { - "line": 46, + "line": 62, "column": 25 } } @@ -2375,11 +2388,11 @@ "kind": "var", "loc": { "start": { - "line": 46, + "line": 62, "column": 1 }, "end": { - "line": 46, + "line": 62, "column": 26 } } @@ -2396,11 +2409,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 47, + "line": 63, "column": 8 }, "end": { - "line": 47, + "line": 63, "column": 14 } } @@ -2408,11 +2421,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 5 }, "end": { - "line": 47, + "line": 63, "column": 6 } } @@ -2425,11 +2438,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 17 }, "end": { - "line": 47, + "line": 63, "column": 22 } } @@ -2440,25 +2453,25 @@ "value": 1, "loc": { "start": { - "line": 47, + "line": 63, "column": 23 }, "end": { - "line": 47, + "line": 63, "column": 24 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 47, + "line": 63, "column": 26 }, "end": { - "line": 47, + "line": 63, "column": 31 } } @@ -2467,22 +2480,22 @@ "optional": false, "loc": { "start": { - "line": 47, + "line": 63, "column": 17 }, "end": { - "line": 47, + "line": 63, "column": 32 } } }, "loc": { "start": { - "line": 47, + "line": 63, "column": 5 }, "end": { - "line": 47, + "line": 63, "column": 32 } } @@ -2491,11 +2504,11 @@ "kind": "var", "loc": { "start": { - "line": 47, + "line": 63, "column": 1 }, "end": { - "line": 47, + "line": 63, "column": 33 } } @@ -2521,11 +2534,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 19 }, "end": { - "line": 49, + "line": 65, "column": 25 } } @@ -2534,11 +2547,11 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 15 }, "end": { - "line": 49, + "line": 65, "column": 16 } } @@ -2551,22 +2564,22 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 30 }, "end": { - "line": 49, + "line": 65, "column": 31 } } }, "loc": { "start": { - "line": 49, + "line": 65, "column": 27 }, "end": { - "line": 49, + "line": 65, "column": 31 } } @@ -2576,22 +2589,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 34 }, "end": { - "line": 49, + "line": 65, "column": 41 } } }, "loc": { "start": { - "line": 49, + "line": 65, "column": 14 }, "end": { - "line": 49, + "line": 65, "column": 42 } } @@ -2602,14 +2615,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 65, + "column": 47 + }, + "end": { + "line": 65, + "column": 50 + } + } + }, "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 44 }, "end": { - "line": 49, + "line": 65, "column": 45 } } @@ -2623,35 +2649,35 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 49, - "column": 50 + "line": 65, + "column": 55 }, "end": { - "line": 49, - "column": 56 + "line": 65, + "column": 61 } } }, "loc": { "start": { - "line": 49, - "column": 50 + "line": 65, + "column": 55 }, "end": { - "line": 49, - "column": 58 + "line": 65, + "column": 63 } } }, "decorators": [], "loc": { "start": { - "line": 49, - "column": 47 + "line": 65, + "column": 52 }, "end": { - "line": 49, - "column": 48 + "line": 65, + "column": 53 } } }, @@ -2660,52 +2686,52 @@ "argument": { "type": "Identifier", "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 49, - "column": 63 + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 65, + "column": 71 + }, + "end": { + "line": 65, + "column": 77 + } + } }, - "end": { - "line": 49, - "column": 64 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", "loc": { "start": { - "line": 49, - "column": 66 + "line": 65, + "column": 71 }, "end": { - "line": 49, - "column": 72 + "line": 65, + "column": 79 } } }, + "decorators": [], "loc": { "start": { - "line": 49, - "column": 66 + "line": 65, + "column": 68 }, "end": { - "line": 49, - "column": 74 + "line": 65, + "column": 69 } } }, "loc": { "start": { - "line": 49, - "column": 60 + "line": 65, + "column": 65 }, "end": { - "line": 49, - "column": 74 + "line": 65, + "column": 69 } } } @@ -2714,23 +2740,23 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 49, - "column": 77 + "line": 65, + "column": 82 }, "end": { - "line": 49, - "column": 83 + "line": 65, + "column": 88 } } }, "loc": { "start": { - "line": 49, + "line": 65, "column": 43 }, "end": { - "line": 49, - "column": 84 + "line": 65, + "column": 89 } } }, @@ -2744,24 +2770,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 49, - "column": 89 + "line": 65, + "column": 94 }, "end": { - "line": 49, - "column": 95 + "line": 65, + "column": 100 } } }, "decorators": [], "loc": { "start": { - "line": 49, - "column": 86 + "line": 65, + "column": 91 }, "end": { - "line": 49, - "column": 87 + "line": 65, + "column": 92 } } }, @@ -2772,24 +2798,24 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 49, - "column": 100 + "line": 65, + "column": 105 }, "end": { - "line": 49, - "column": 107 + "line": 65, + "column": 112 } } }, "decorators": [], "loc": { "start": { - "line": 49, - "column": 97 + "line": 65, + "column": 102 }, "end": { - "line": 49, - "column": 98 + "line": 65, + "column": 103 } } } @@ -2798,46 +2824,46 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 49, - "column": 110 + "line": 65, + "column": 115 }, "end": { - "line": 49, - "column": 116 + "line": 65, + "column": 121 } } }, "loc": { "start": { - "line": 49, - "column": 85 + "line": 65, + "column": 90 }, "end": { - "line": 49, - "column": 118 + "line": 65, + "column": 123 } } } ], "loc": { "start": { - "line": 49, + "line": 65, "column": 12 }, "end": { - "line": 49, - "column": 118 + "line": 65, + "column": 123 } } }, "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 5 }, "end": { - "line": 49, + "line": 65, "column": 10 } } @@ -2845,11 +2871,11 @@ "init": null, "loc": { "start": { - "line": 49, + "line": 65, "column": 5 }, "end": { - "line": 49, + "line": 65, "column": 10 } } @@ -2858,12 +2884,12 @@ "kind": "var", "loc": { "start": { - "line": 49, + "line": 65, "column": 1 }, "end": { - "line": 49, - "column": 119 + "line": 65, + "column": 124 } } }, @@ -2879,11 +2905,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 50, + "line": 66, "column": 8 }, "end": { - "line": 50, + "line": 66, "column": 15 } } @@ -2891,11 +2917,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 5 }, "end": { - "line": 50, + "line": 66, "column": 6 } } @@ -2908,11 +2934,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 18 }, "end": { - "line": 50, + "line": 66, "column": 23 } } @@ -2921,22 +2947,22 @@ "optional": false, "loc": { "start": { - "line": 50, + "line": 66, "column": 18 }, "end": { - "line": 50, + "line": 66, "column": 25 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 5 }, "end": { - "line": 50, + "line": 66, "column": 25 } } @@ -2945,11 +2971,11 @@ "kind": "var", "loc": { "start": { - "line": 50, + "line": 66, "column": 1 }, "end": { - "line": 50, + "line": 66, "column": 26 } } @@ -2966,11 +2992,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 51, + "line": 67, "column": 8 }, "end": { - "line": 51, + "line": 67, "column": 15 } } @@ -2978,11 +3004,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 5 }, "end": { - "line": 51, + "line": 67, "column": 6 } } @@ -2995,11 +3021,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 18 }, "end": { - "line": 51, + "line": 67, "column": 23 } } @@ -3010,11 +3036,11 @@ "value": 1, "loc": { "start": { - "line": 51, + "line": 67, "column": 24 }, "end": { - "line": 51, + "line": 67, "column": 25 } } @@ -3023,22 +3049,22 @@ "optional": false, "loc": { "start": { - "line": 51, + "line": 67, "column": 18 }, "end": { - "line": 51, + "line": 67, "column": 26 } } }, "loc": { "start": { - "line": 51, + "line": 67, "column": 5 }, "end": { - "line": 51, + "line": 67, "column": 26 } } @@ -3047,11 +3073,11 @@ "kind": "var", "loc": { "start": { - "line": 51, + "line": 67, "column": 1 }, "end": { - "line": 51, + "line": 67, "column": 27 } } @@ -3068,11 +3094,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 8 }, "end": { - "line": 52, + "line": 68, "column": 15 } } @@ -3080,11 +3106,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 5 }, "end": { - "line": 52, + "line": 68, "column": 6 } } @@ -3097,11 +3123,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 18 }, "end": { - "line": 52, + "line": 68, "column": 23 } } @@ -3112,11 +3138,11 @@ "value": 2, "loc": { "start": { - "line": 52, + "line": 68, "column": 24 }, "end": { - "line": 52, + "line": 68, "column": 25 } } @@ -3126,11 +3152,11 @@ "value": true, "loc": { "start": { - "line": 52, + "line": 68, "column": 27 }, "end": { - "line": 52, + "line": 68, "column": 31 } } @@ -3139,22 +3165,22 @@ "optional": false, "loc": { "start": { - "line": 52, + "line": 68, "column": 18 }, "end": { - "line": 52, + "line": 68, "column": 32 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 5 }, "end": { - "line": 52, + "line": 68, "column": 32 } } @@ -3163,11 +3189,11 @@ "kind": "var", "loc": { "start": { - "line": 52, + "line": 68, "column": 1 }, "end": { - "line": 52, + "line": 68, "column": 33 } } @@ -3184,11 +3210,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 8 }, "end": { - "line": 53, + "line": 69, "column": 15 } } @@ -3196,11 +3222,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 5 }, "end": { - "line": 53, + "line": 69, "column": 6 } } @@ -3213,11 +3239,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 18 }, "end": { - "line": 53, + "line": 69, "column": 23 } } @@ -3228,11 +3254,11 @@ "value": 2, "loc": { "start": { - "line": 53, + "line": 69, "column": 24 }, "end": { - "line": 53, + "line": 69, "column": 25 } } @@ -3242,28 +3268,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 53, + "line": 69, "column": 28 }, "end": { - "line": 53, + "line": 69, "column": 33 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 53, + "line": 69, "column": 35 }, "end": { - "line": 53, + "line": 69, "column": 40 } } @@ -3271,11 +3297,11 @@ ], "loc": { "start": { - "line": 53, + "line": 69, "column": 27 }, "end": { - "line": 53, + "line": 69, "column": 41 } } @@ -3285,11 +3311,11 @@ "properties": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 43 }, "end": { - "line": 53, + "line": 69, "column": 45 } } @@ -3298,22 +3324,22 @@ "optional": false, "loc": { "start": { - "line": 53, + "line": 69, "column": 18 }, "end": { - "line": 53, + "line": 69, "column": 46 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 5 }, "end": { - "line": 53, + "line": 69, "column": 46 } } @@ -3322,11 +3348,11 @@ "kind": "var", "loc": { "start": { - "line": 53, + "line": 69, "column": 1 }, "end": { - "line": 53, + "line": 69, "column": 47 } } @@ -3343,11 +3369,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 54, + "line": 70, "column": 8 }, "end": { - "line": 54, + "line": 70, "column": 14 } } @@ -3355,11 +3381,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 5 }, "end": { - "line": 54, + "line": 70, "column": 6 } } @@ -3372,11 +3398,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 17 }, "end": { - "line": 54, + "line": 70, "column": 22 } } @@ -3387,11 +3413,11 @@ "properties": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 23 }, "end": { - "line": 54, + "line": 70, "column": 25 } } @@ -3401,14 +3427,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 54, + "line": 70, "column": 28 }, "end": { - "line": 54, + "line": 70, "column": 33 } } @@ -3416,11 +3442,11 @@ ], "loc": { "start": { - "line": 54, + "line": 70, "column": 27 }, "end": { - "line": 54, + "line": 70, "column": 34 } } @@ -3429,22 +3455,22 @@ "optional": false, "loc": { "start": { - "line": 54, + "line": 70, "column": 17 }, "end": { - "line": 54, + "line": 70, "column": 35 } } }, "loc": { "start": { - "line": 54, + "line": 70, "column": 5 }, "end": { - "line": 54, + "line": 70, "column": 35 } } @@ -3453,11 +3479,11 @@ "kind": "var", "loc": { "start": { - "line": 54, + "line": 70, "column": 1 }, "end": { - "line": 54, + "line": 70, "column": 36 } } @@ -3474,11 +3500,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 55, + "line": 71, "column": 8 }, "end": { - "line": 55, + "line": 71, "column": 14 } } @@ -3486,11 +3512,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 6 } } @@ -3503,11 +3529,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 17 }, "end": { - "line": 55, + "line": 71, "column": 22 } } @@ -3518,11 +3544,11 @@ "properties": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 23 }, "end": { - "line": 55, + "line": 71, "column": 25 } } @@ -3532,14 +3558,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 55, + "line": 71, "column": 28 }, "end": { - "line": 55, + "line": 71, "column": 33 } } @@ -3547,11 +3573,11 @@ ], "loc": { "start": { - "line": 55, + "line": 71, "column": 27 }, "end": { - "line": 55, + "line": 71, "column": 34 } } @@ -3561,11 +3587,11 @@ "value": 3, "loc": { "start": { - "line": 55, + "line": 71, "column": 36 }, "end": { - "line": 55, + "line": 71, "column": 37 } } @@ -3575,11 +3601,11 @@ "value": 4, "loc": { "start": { - "line": 55, + "line": 71, "column": 39 }, "end": { - "line": 55, + "line": 71, "column": 40 } } @@ -3589,11 +3615,11 @@ "value": 5, "loc": { "start": { - "line": 55, + "line": 71, "column": 42 }, "end": { - "line": 55, + "line": 71, "column": 43 } } @@ -3602,22 +3628,22 @@ "optional": false, "loc": { "start": { - "line": 55, + "line": 71, "column": 17 }, "end": { - "line": 55, + "line": 71, "column": 44 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 44 } } @@ -3626,11 +3652,11 @@ "kind": "var", "loc": { "start": { - "line": 55, + "line": 71, "column": 1 }, "end": { - "line": 55, + "line": 71, "column": 45 } } @@ -3645,11 +3671,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 10 }, "end": { - "line": 57, + "line": 73, "column": 15 } } @@ -3665,11 +3691,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 57, + "line": 73, "column": 19 }, "end": { - "line": 57, + "line": 73, "column": 25 } } @@ -3677,11 +3703,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 16 }, "end": { - "line": 57, + "line": 73, "column": 17 } } @@ -3693,11 +3719,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 57, + "line": 73, "column": 30 }, "end": { - "line": 57, + "line": 73, "column": 36 } } @@ -3705,11 +3731,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 27 }, "end": { - "line": 57, + "line": 73, "column": 28 } } @@ -3719,33 +3745,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 57, + "line": 73, "column": 39 }, "end": { - "line": 57, + "line": 73, "column": 45 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 46 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 46 } } @@ -3760,11 +3786,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 10 }, "end": { - "line": 58, + "line": 74, "column": 15 } } @@ -3780,11 +3806,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 58, + "line": 74, "column": 19 }, "end": { - "line": 58, + "line": 74, "column": 25 } } @@ -3792,11 +3818,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 16 }, "end": { - "line": 58, + "line": 74, "column": 17 } } @@ -3808,11 +3834,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 74, "column": 30 }, "end": { - "line": 58, + "line": 74, "column": 36 } } @@ -3820,11 +3846,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 27 }, "end": { - "line": 58, + "line": 74, "column": 28 } } @@ -3837,11 +3863,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 74, "column": 39 }, "end": { - "line": 58, + "line": 74, "column": 45 } } @@ -3850,11 +3876,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 58, + "line": 74, "column": 48 }, "end": { - "line": 58, + "line": 74, "column": 54 } } @@ -3862,33 +3888,33 @@ ], "loc": { "start": { - "line": 58, + "line": 74, "column": 39 }, "end": { - "line": 58, + "line": 74, "column": 54 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 55 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 55 } } @@ -3903,11 +3929,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 10 }, "end": { - "line": 59, + "line": 75, "column": 15 } } @@ -3926,11 +3952,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 59, + "line": 75, "column": 19 }, "end": { - "line": 59, + "line": 75, "column": 25 } } @@ -3939,11 +3965,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 59, + "line": 75, "column": 28 }, "end": { - "line": 59, + "line": 75, "column": 34 } } @@ -3951,11 +3977,11 @@ ], "loc": { "start": { - "line": 59, + "line": 75, "column": 19 }, "end": { - "line": 59, + "line": 75, "column": 34 } } @@ -3963,11 +3989,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 16 }, "end": { - "line": 59, + "line": 75, "column": 17 } } @@ -3982,11 +4008,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 59, + "line": 75, "column": 40 }, "end": { - "line": 59, + "line": 75, "column": 46 } } @@ -3995,11 +4021,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 59, + "line": 75, "column": 49 }, "end": { - "line": 59, + "line": 75, "column": 55 } } @@ -4007,11 +4033,11 @@ ], "loc": { "start": { - "line": 59, + "line": 75, "column": 40 }, "end": { - "line": 59, + "line": 75, "column": 55 } } @@ -4020,11 +4046,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 36 }, "end": { - "line": 59, + "line": 75, "column": 37 } } @@ -4037,11 +4063,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 59, + "line": 75, "column": 58 }, "end": { - "line": 59, + "line": 75, "column": 64 } } @@ -4050,11 +4076,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 59, + "line": 75, "column": 67 }, "end": { - "line": 59, + "line": 75, "column": 73 } } @@ -4063,11 +4089,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 59, + "line": 75, "column": 76 }, "end": { - "line": 59, + "line": 75, "column": 83 } } @@ -4075,11 +4101,11 @@ ], "loc": { "start": { - "line": 59, + "line": 75, "column": 58 }, "end": { - "line": 59, + "line": 75, "column": 83 } } @@ -4094,22 +4120,22 @@ "value": true, "loc": { "start": { - "line": 60, + "line": 76, "column": 12 }, "end": { - "line": 60, + "line": 76, "column": 16 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 5 }, "end": { - "line": 60, + "line": 76, "column": 17 } } @@ -4117,33 +4143,33 @@ ], "loc": { "start": { - "line": 59, + "line": 75, "column": 84 }, "end": { - "line": 61, + "line": 77, "column": 2 } } }, "loc": { "start": { - "line": 59, + "line": 75, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 2 } } }, "loc": { "start": { - "line": 59, + "line": 75, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 2 } } @@ -4160,11 +4186,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 63, + "line": 79, "column": 8 }, "end": { - "line": 63, + "line": 79, "column": 14 } } @@ -4172,11 +4198,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 6 } } @@ -4189,11 +4215,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 17 }, "end": { - "line": 63, + "line": 79, "column": 22 } } @@ -4204,25 +4230,25 @@ "value": 1, "loc": { "start": { - "line": 63, + "line": 79, "column": 23 }, "end": { - "line": 63, + "line": 79, "column": 24 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 63, + "line": 79, "column": 26 }, "end": { - "line": 63, + "line": 79, "column": 31 } } @@ -4231,22 +4257,22 @@ "optional": false, "loc": { "start": { - "line": 63, + "line": 79, "column": 17 }, "end": { - "line": 63, + "line": 79, "column": 32 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 32 } } @@ -4255,11 +4281,11 @@ "kind": "var", "loc": { "start": { - "line": 63, + "line": 79, "column": 1 }, "end": { - "line": 63, + "line": 79, "column": 33 } } @@ -4279,11 +4305,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 64, + "line": 80, "column": 8 }, "end": { - "line": 64, + "line": 80, "column": 14 } } @@ -4292,11 +4318,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 64, + "line": 80, "column": 17 }, "end": { - "line": 64, + "line": 80, "column": 23 } } @@ -4304,11 +4330,11 @@ ], "loc": { "start": { - "line": 64, + "line": 80, "column": 8 }, "end": { - "line": 64, + "line": 80, "column": 23 } } @@ -4316,11 +4342,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 5 }, "end": { - "line": 64, + "line": 80, "column": 6 } } @@ -4333,11 +4359,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 26 }, "end": { - "line": 64, + "line": 80, "column": 31 } } @@ -4345,14 +4371,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 64, + "line": 80, "column": 32 }, "end": { - "line": 64, + "line": 80, "column": 37 } } @@ -4362,11 +4388,11 @@ "value": 2, "loc": { "start": { - "line": 64, + "line": 80, "column": 39 }, "end": { - "line": 64, + "line": 80, "column": 40 } } @@ -4375,22 +4401,22 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 26 }, "end": { - "line": 64, + "line": 80, "column": 41 } } }, "loc": { "start": { - "line": 64, + "line": 80, "column": 5 }, "end": { - "line": 64, + "line": 80, "column": 41 } } @@ -4399,11 +4425,11 @@ "kind": "var", "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 42 } } @@ -4418,11 +4444,11 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 10 }, "end": { - "line": 66, + "line": 82, "column": 16 } } @@ -4448,11 +4474,11 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 22 }, "end": { - "line": 66, + "line": 82, "column": 23 } } @@ -4461,22 +4487,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 66, + "line": 82, "column": 25 }, "end": { - "line": 66, + "line": 82, "column": 31 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 22 }, "end": { - "line": 66, + "line": 82, "column": 32 } } @@ -4492,11 +4518,11 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 33 }, "end": { - "line": 66, + "line": 82, "column": 34 } } @@ -4505,22 +4531,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 66, + "line": 82, "column": 36 }, "end": { - "line": 66, + "line": 82, "column": 42 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 33 }, "end": { - "line": 66, + "line": 82, "column": 44 } } @@ -4528,11 +4554,11 @@ ], "loc": { "start": { - "line": 66, + "line": 82, "column": 20 }, "end": { - "line": 66, + "line": 82, "column": 44 } } @@ -4540,11 +4566,11 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 17 }, "end": { - "line": 66, + "line": 82, "column": 18 } } @@ -4556,44 +4582,44 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 66, + "line": 82, "column": 47 }, "end": { - "line": 66, + "line": 82, "column": 53 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 47 }, "end": { - "line": 66, + "line": 82, "column": 55 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 1 }, "end": { - "line": 66, + "line": 82, "column": 56 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 1 }, "end": { - "line": 66, + "line": 82, "column": 56 } } @@ -4608,11 +4634,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 10 }, "end": { - "line": 67, + "line": 83, "column": 16 } } @@ -4638,11 +4664,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 22 }, "end": { - "line": 67, + "line": 83, "column": 23 } } @@ -4651,22 +4677,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 67, + "line": 83, "column": 25 }, "end": { - "line": 67, + "line": 83, "column": 31 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 22 }, "end": { - "line": 67, + "line": 83, "column": 32 } } @@ -4682,11 +4708,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 33 }, "end": { - "line": 67, + "line": 83, "column": 34 } } @@ -4695,22 +4721,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 67, + "line": 83, "column": 36 }, "end": { - "line": 67, + "line": 83, "column": 42 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 33 }, "end": { - "line": 67, + "line": 83, "column": 44 } } @@ -4718,11 +4744,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 20 }, "end": { - "line": 67, + "line": 83, "column": 44 } } @@ -4730,11 +4756,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 17 }, "end": { - "line": 67, + "line": 83, "column": 18 } } @@ -4746,44 +4772,44 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 67, + "line": 83, "column": 47 }, "end": { - "line": 67, + "line": 83, "column": 53 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 47 }, "end": { - "line": 67, + "line": 83, "column": 55 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 1 }, "end": { - "line": 67, + "line": 83, "column": 56 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 1 }, "end": { - "line": 67, + "line": 83, "column": 56 } } @@ -4798,11 +4824,11 @@ "decorators": [], "loc": { "start": { - "line": 68, + "line": 84, "column": 10 }, "end": { - "line": 68, + "line": 84, "column": 16 } } @@ -4828,11 +4854,11 @@ "decorators": [], "loc": { "start": { - "line": 68, + "line": 84, "column": 22 }, "end": { - "line": 68, + "line": 84, "column": 23 } } @@ -4844,11 +4870,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 68, + "line": 84, "column": 25 }, "end": { - "line": 68, + "line": 84, "column": 31 } } @@ -4857,11 +4883,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 68, + "line": 84, "column": 34 }, "end": { - "line": 68, + "line": 84, "column": 40 } } @@ -4869,22 +4895,22 @@ ], "loc": { "start": { - "line": 68, + "line": 84, "column": 25 }, "end": { - "line": 68, + "line": 84, "column": 40 } } }, "loc": { "start": { - "line": 68, + "line": 84, "column": 22 }, "end": { - "line": 68, + "line": 84, "column": 42 } } @@ -4892,11 +4918,11 @@ ], "loc": { "start": { - "line": 68, + "line": 84, "column": 20 }, "end": { - "line": 68, + "line": 84, "column": 42 } } @@ -4904,11 +4930,11 @@ "decorators": [], "loc": { "start": { - "line": 68, + "line": 84, "column": 17 }, "end": { - "line": 68, + "line": 84, "column": 18 } } @@ -4927,11 +4953,11 @@ "value": 1, "loc": { "start": { - "line": 69, + "line": 85, "column": 13 }, "end": { - "line": 69, + "line": 85, "column": 14 } } @@ -4941,11 +4967,11 @@ "value": 2, "loc": { "start": { - "line": 69, + "line": 85, "column": 16 }, "end": { - "line": 69, + "line": 85, "column": 17 } } @@ -4955,11 +4981,11 @@ "value": 3, "loc": { "start": { - "line": 69, + "line": 85, "column": 19 }, "end": { - "line": 69, + "line": 85, "column": 20 } } @@ -4967,22 +4993,22 @@ ], "loc": { "start": { - "line": 69, + "line": 85, "column": 12 }, "end": { - "line": 69, + "line": 85, "column": 21 } } }, "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 69, + "line": 85, "column": 22 } } @@ -4990,33 +5016,33 @@ ], "loc": { "start": { - "line": 68, + "line": 84, "column": 44 }, "end": { - "line": 70, + "line": 86, "column": 2 } } }, "loc": { "start": { - "line": 68, + "line": 84, "column": 1 }, "end": { - "line": 70, + "line": 86, "column": 2 } } }, "loc": { "start": { - "line": 68, + "line": 84, "column": 1 }, "end": { - "line": 70, + "line": 86, "column": 2 } } @@ -5035,22 +5061,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 72, + "line": 88, "column": 8 }, "end": { - "line": 72, + "line": 88, "column": 14 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 8 }, "end": { - "line": 72, + "line": 88, "column": 16 } } @@ -5058,11 +5084,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 5 }, "end": { - "line": 72, + "line": 88, "column": 6 } } @@ -5075,11 +5101,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 19 }, "end": { - "line": 72, + "line": 88, "column": 25 } } @@ -5099,11 +5125,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 28 }, "end": { - "line": 72, + "line": 88, "column": 29 } } @@ -5113,11 +5139,11 @@ "value": 1, "loc": { "start": { - "line": 72, + "line": 88, "column": 31 }, "end": { - "line": 72, + "line": 88, "column": 32 } } @@ -5125,11 +5151,11 @@ "kind": "init", "loc": { "start": { - "line": 72, + "line": 88, "column": 28 }, "end": { - "line": 72, + "line": 88, "column": 32 } } @@ -5145,25 +5171,25 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 34 }, "end": { - "line": 72, + "line": 88, "column": 35 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 72, + "line": 88, "column": 37 }, "end": { - "line": 72, + "line": 88, "column": 42 } } @@ -5171,11 +5197,11 @@ "kind": "init", "loc": { "start": { - "line": 72, + "line": 88, "column": 34 }, "end": { - "line": 72, + "line": 88, "column": 42 } } @@ -5183,11 +5209,11 @@ ], "loc": { "start": { - "line": 72, + "line": 88, "column": 26 }, "end": { - "line": 72, + "line": 88, "column": 44 } } @@ -5196,22 +5222,22 @@ "optional": false, "loc": { "start": { - "line": 72, + "line": 88, "column": 19 }, "end": { - "line": 72, + "line": 88, "column": 45 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 5 }, "end": { - "line": 72, + "line": 88, "column": 45 } } @@ -5220,11 +5246,11 @@ "kind": "var", "loc": { "start": { - "line": 72, + "line": 88, "column": 1 }, "end": { - "line": 72, + "line": 88, "column": 46 } } @@ -5243,22 +5269,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 73, + "line": 89, "column": 8 }, "end": { - "line": 73, + "line": 89, "column": 14 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 8 }, "end": { - "line": 73, + "line": 89, "column": 16 } } @@ -5266,11 +5292,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 5 }, "end": { - "line": 73, + "line": 89, "column": 6 } } @@ -5283,11 +5309,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 19 }, "end": { - "line": 73, + "line": 89, "column": 25 } } @@ -5307,25 +5333,25 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 28 }, "end": { - "line": 73, + "line": 89, "column": 29 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 73, + "line": 89, "column": 31 }, "end": { - "line": 73, + "line": 89, "column": 36 } } @@ -5333,11 +5359,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 28 }, "end": { - "line": 73, + "line": 89, "column": 36 } } @@ -5353,11 +5379,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 38 }, "end": { - "line": 73, + "line": 89, "column": 39 } } @@ -5367,11 +5393,11 @@ "value": 2, "loc": { "start": { - "line": 73, + "line": 89, "column": 41 }, "end": { - "line": 73, + "line": 89, "column": 42 } } @@ -5379,11 +5405,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 38 }, "end": { - "line": 73, + "line": 89, "column": 42 } } @@ -5391,11 +5417,11 @@ ], "loc": { "start": { - "line": 73, + "line": 89, "column": 26 }, "end": { - "line": 73, + "line": 89, "column": 44 } } @@ -5404,22 +5430,22 @@ "optional": false, "loc": { "start": { - "line": 73, + "line": 89, "column": 19 }, "end": { - "line": 73, + "line": 89, "column": 45 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 5 }, "end": { - "line": 73, + "line": 89, "column": 45 } } @@ -5428,11 +5454,11 @@ "kind": "var", "loc": { "start": { - "line": 73, + "line": 89, "column": 1 }, "end": { - "line": 73, + "line": 89, "column": 46 } } @@ -5444,8 +5470,8 @@ "column": 1 }, "end": { - "line": 73, - "column": 46 + "line": 90, + "column": 1 } } } diff --git a/es2panda/test/compiler/ts/functionCall.ts b/es2panda/test/compiler/ts/functionCall.ts index 83f3016abc2252bb58bf89ace2e427e47d37f643..281a2587f6463474059c0abd43f28fcdf45eb3e1 100644 --- a/es2panda/test/compiler/ts/functionCall.ts +++ b/es2panda/test/compiler/ts/functionCall.ts @@ -49,7 +49,7 @@ function func5(a: number, b: string, ...c) { func5(1, "foo"); func5(1, "foo", 2, true, {}); -function func6(a, b?: string[], ...c: number[]) { +function func6(a: any, b?: string[], ...c: number[]) { return true; } @@ -62,7 +62,7 @@ var b: string = func7(); var c: string = func7(1); var d: number = func7(1, "foo"); -var func8: { (a?: number, ...c): boolean, (a, b: string[], ...c: number[]): string, (a: number, b: boolean): number }; +var func8: { (a?: number, ...c): boolean, (a: any, b: string[], ...c: number[]): string, (a: number, b: boolean): number }; var e: boolean = func8(); var f: boolean = func8(1); var g: boolean = func8(2, true); @@ -86,4 +86,4 @@ function func10(a: { x: number | string }) { } var m: number[] = func10({ x: 1, y: "foo" }); -var m: number[] = func10({ x: "bar", y: 2 }); \ No newline at end of file +var m: number[] = func10({ x: "bar", y: 2 }); diff --git a/es2panda/test/compiler/ts/functionCall_1-expected.txt b/es2panda/test/compiler/ts/functionCall_1-expected.txt index 7eca9379c62544b8efb471980d0f9ea2e5af1a8d..2d88a80507405a6468bdb14576b4c14b7186efb3 100644 --- a/es2panda/test/compiler/ts/functionCall_1-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_1-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -57,11 +57,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -71,33 +71,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 5 } } @@ -124,14 +124,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -140,22 +140,22 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 13 } } @@ -167,9 +167,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 13 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [functionCall_1.ts:4:6] +TypeError: Type 'string' is not assignable to type 'number'. [functionCall_1.ts:20:6] diff --git a/es2panda/test/compiler/ts/functionCall_10-expected.txt b/es2panda/test/compiler/ts/functionCall_10-expected.txt index 7c756536d067434a6e7ecb093c9d98938dcbaf2f..4784b689fe8e6900d672282b9df1e14a90dd5cb6 100644 --- a/es2panda/test/compiler/ts/functionCall_10-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_10-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -76,22 +76,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -106,11 +106,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -118,11 +118,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -134,11 +134,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -147,11 +147,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 57 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -161,22 +161,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 76 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -184,11 +184,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -196,11 +196,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -208,11 +208,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -221,11 +221,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -240,11 +240,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -253,22 +253,22 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -280,9 +280,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Expected 1-2 arguments, but got 0 [functionCall_10.ts:2:1] +TypeError: Expected 1-2 arguments, but got 0 [functionCall_10.ts:18:1] diff --git a/es2panda/test/compiler/ts/functionCall_11-expected.txt b/es2panda/test/compiler/ts/functionCall_11-expected.txt index 6365facda02eedd8b69269b20589e0b10883235e..c18ee83ce107e77e63a76fe1f1cda989bec16970 100644 --- a/es2panda/test/compiler/ts/functionCall_11-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_11-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -76,22 +76,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -106,11 +106,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -118,11 +118,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -134,11 +134,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -147,11 +147,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 57 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -161,22 +161,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 76 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -184,11 +184,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -196,11 +196,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -208,11 +208,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -221,11 +221,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -240,11 +240,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -255,11 +255,11 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -268,22 +268,22 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -295,9 +295,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [functionCall_11.ts:2:6] +TypeError: Type 'number' is not assignable to type 'string'. [functionCall_11.ts:18:6] diff --git a/es2panda/test/compiler/ts/functionCall_12-expected.txt b/es2panda/test/compiler/ts/functionCall_12-expected.txt index afa9e1121a123a108fd347487e05210ac7a0673b..05075dfaff471232f0b75341264a73029365ec57 100644 --- a/es2panda/test/compiler/ts/functionCall_12-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_12-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -76,22 +76,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -106,11 +106,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -118,11 +118,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -134,11 +134,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -147,11 +147,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 57 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -161,22 +161,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 76 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -184,11 +184,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -196,11 +196,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -208,11 +208,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -221,11 +221,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -242,11 +242,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -254,11 +254,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -271,11 +271,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -286,25 +286,25 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -313,22 +313,22 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 31 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -337,11 +337,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -353,9 +353,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 32 } } } -TypeError: Type 'number' is not assignable to type 'string' [functionCall_12.ts:2:5] +TypeError: Type 'number' is not assignable to type 'string'. [functionCall_12.ts:18:5] diff --git a/es2panda/test/compiler/ts/functionCall_13-expected.txt b/es2panda/test/compiler/ts/functionCall_13-expected.txt index c7a8c3faa52d374833d57c310c1bafa9f5685eec..b1192fbb1d0fa520265ac3891118e1684695c4d3 100644 --- a/es2panda/test/compiler/ts/functionCall_13-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_13-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -52,22 +52,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -77,22 +77,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -103,14 +103,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 17, + "column": 46 + }, + "end": { + "line": 17, + "column": 49 + } + } + }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -124,35 +137,35 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, - "column": 49 + "line": 17, + "column": 54 }, "end": { - "line": 1, - "column": 55 + "line": 17, + "column": 60 } } }, "loc": { "start": { - "line": 1, - "column": 49 + "line": 17, + "column": 54 }, "end": { - "line": 1, - "column": 57 + "line": 17, + "column": 62 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 46 + "line": 17, + "column": 51 }, "end": { - "line": 1, - "column": 47 + "line": 17, + "column": 52 } } }, @@ -161,52 +174,52 @@ "argument": { "type": "Identifier", "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 62 + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 17, + "column": 70 + }, + "end": { + "line": 17, + "column": 76 + } + } }, - "end": { - "line": 1, - "column": 63 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 65 + "line": 17, + "column": 70 }, "end": { - "line": 1, - "column": 71 + "line": 17, + "column": 78 } } }, + "decorators": [], "loc": { "start": { - "line": 1, - "column": 65 + "line": 17, + "column": 67 }, "end": { - "line": 1, - "column": 73 + "line": 17, + "column": 68 } } }, "loc": { "start": { - "line": 1, - "column": 59 + "line": 17, + "column": 64 }, "end": { - "line": 1, - "column": 73 + "line": 17, + "column": 68 } } } @@ -215,23 +228,23 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, - "column": 76 + "line": 17, + "column": 81 }, "end": { - "line": 1, - "column": 82 + "line": 17, + "column": 87 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, - "column": 83 + "line": 17, + "column": 88 } } }, @@ -245,24 +258,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 88 + "line": 17, + "column": 93 }, "end": { - "line": 1, - "column": 94 + "line": 17, + "column": 99 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 85 + "line": 17, + "column": 90 }, "end": { - "line": 1, - "column": 86 + "line": 17, + "column": 91 } } }, @@ -273,24 +286,24 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, - "column": 99 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 106 + "line": 17, + "column": 111 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 96 + "line": 17, + "column": 101 }, "end": { - "line": 1, - "column": 97 + "line": 17, + "column": 102 } } } @@ -299,46 +312,46 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 109 + "line": 17, + "column": 114 }, "end": { - "line": 1, - "column": 115 + "line": 17, + "column": 120 } } }, "loc": { "start": { - "line": 1, - "column": 84 + "line": 17, + "column": 89 }, "end": { - "line": 1, - "column": 117 + "line": 17, + "column": 122 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, - "column": 117 + "line": 17, + "column": 122 } } }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -346,11 +359,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -359,12 +372,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 118 + "line": 17, + "column": 123 } } }, @@ -380,11 +393,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -392,11 +405,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -409,11 +422,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -422,22 +435,22 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -446,11 +459,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -462,9 +475,9 @@ "column": 1 }, "end": { - "line": 2, - "column": 24 + "line": 19, + "column": 1 } } } -TypeError: Type 'boolean' is not assignable to type 'string' [functionCall_13.ts:2:5] +TypeError: Type 'boolean' is not assignable to type 'string'. [functionCall_13.ts:18:5] diff --git a/es2panda/test/compiler/ts/functionCall_13.ts b/es2panda/test/compiler/ts/functionCall_13.ts index 5b90709bcc92042e95767c76efee6a30847d9671..3a53af944217eb7ea0df7197fc2e5d1915f0f7e6 100644 --- a/es2panda/test/compiler/ts/functionCall_13.ts +++ b/es2panda/test/compiler/ts/functionCall_13.ts @@ -14,5 +14,5 @@ */ -var func: { (a?: number, ...c): boolean, (a, b: string[], ...c: number[]): string, (a: number, b: boolean): number }; -var a: string = func(); \ No newline at end of file +var func: { (a?: number, ...c): boolean, (a: any, b: string[], ...c: number[]): string, (a: number, b: boolean): number }; +var a: string = func(); diff --git a/es2panda/test/compiler/ts/functionCall_14-expected.txt b/es2panda/test/compiler/ts/functionCall_14-expected.txt index b4a9adc670850a39eaad597e4905ffbd11e53767..d08676300bd5c501ab2a8294f6841074ea9b331c 100644 --- a/es2panda/test/compiler/ts/functionCall_14-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_14-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -52,22 +52,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -77,22 +77,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -103,14 +103,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 17, + "column": 46 + }, + "end": { + "line": 17, + "column": 49 + } + } + }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -124,35 +137,35 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, - "column": 49 + "line": 17, + "column": 54 }, "end": { - "line": 1, - "column": 55 + "line": 17, + "column": 60 } } }, "loc": { "start": { - "line": 1, - "column": 49 + "line": 17, + "column": 54 }, "end": { - "line": 1, - "column": 57 + "line": 17, + "column": 62 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 46 + "line": 17, + "column": 51 }, "end": { - "line": 1, - "column": 47 + "line": 17, + "column": 52 } } }, @@ -161,52 +174,52 @@ "argument": { "type": "Identifier", "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 62 + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 17, + "column": 70 + }, + "end": { + "line": 17, + "column": 76 + } + } }, - "end": { - "line": 1, - "column": 63 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 65 + "line": 17, + "column": 70 }, "end": { - "line": 1, - "column": 71 + "line": 17, + "column": 78 } } }, + "decorators": [], "loc": { "start": { - "line": 1, - "column": 65 + "line": 17, + "column": 67 }, "end": { - "line": 1, - "column": 73 + "line": 17, + "column": 68 } } }, "loc": { "start": { - "line": 1, - "column": 59 + "line": 17, + "column": 64 }, "end": { - "line": 1, - "column": 73 + "line": 17, + "column": 68 } } } @@ -215,23 +228,23 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, - "column": 76 + "line": 17, + "column": 81 }, "end": { - "line": 1, - "column": 82 + "line": 17, + "column": 87 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, - "column": 83 + "line": 17, + "column": 88 } } }, @@ -245,24 +258,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 88 + "line": 17, + "column": 93 }, "end": { - "line": 1, - "column": 94 + "line": 17, + "column": 99 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 85 + "line": 17, + "column": 90 }, "end": { - "line": 1, - "column": 86 + "line": 17, + "column": 91 } } }, @@ -273,24 +286,24 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, - "column": 99 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 106 + "line": 17, + "column": 111 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 96 + "line": 17, + "column": 101 }, "end": { - "line": 1, - "column": 97 + "line": 17, + "column": 102 } } } @@ -299,46 +312,46 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 109 + "line": 17, + "column": 114 }, "end": { - "line": 1, - "column": 115 + "line": 17, + "column": 120 } } }, "loc": { "start": { - "line": 1, - "column": 84 + "line": 17, + "column": 89 }, "end": { - "line": 1, - "column": 117 + "line": 17, + "column": 122 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, - "column": 117 + "line": 17, + "column": 122 } } }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -346,11 +359,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -359,12 +372,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 118 + "line": 17, + "column": 123 } } }, @@ -380,11 +393,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -392,11 +405,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -409,11 +422,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -424,11 +437,11 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -437,22 +450,22 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 24 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -461,11 +474,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -477,9 +490,9 @@ "column": 1 }, "end": { - "line": 2, - "column": 25 + "line": 19, + "column": 1 } } } -TypeError: Type 'boolean' is not assignable to type 'string' [functionCall_14.ts:2:5] +TypeError: Type 'boolean' is not assignable to type 'string'. [functionCall_14.ts:18:5] diff --git a/es2panda/test/compiler/ts/functionCall_14.ts b/es2panda/test/compiler/ts/functionCall_14.ts index 19b8013d252814dc6ec404b88c0205bf29e4c95f..511b2692a6a5f4b3a01b9ce1ffdbed4f5bd0b292 100644 --- a/es2panda/test/compiler/ts/functionCall_14.ts +++ b/es2panda/test/compiler/ts/functionCall_14.ts @@ -14,5 +14,5 @@ */ -var func: { (a?: number, ...c): boolean, (a, b: string[], ...c: number[]): string, (a: number, b: boolean): number }; -var a: string = func(1); \ No newline at end of file +var func: { (a?: number, ...c): boolean, (a: any, b: string[], ...c: number[]): string, (a: number, b: boolean): number }; +var a: string = func(1); diff --git a/es2panda/test/compiler/ts/functionCall_15-expected.txt b/es2panda/test/compiler/ts/functionCall_15-expected.txt index 49759abc329b33f736140db13f8666f01865e716..264c4abbfa4cc200d26047ea7a119fbb592e138b 100644 --- a/es2panda/test/compiler/ts/functionCall_15-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_15-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -51,22 +51,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 39 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -102,14 +102,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 17, + "column": 45 + }, + "end": { + "line": 17, + "column": 48 + } + } + }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -123,35 +136,35 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, - "column": 48 + "line": 17, + "column": 53 }, "end": { - "line": 1, - "column": 54 + "line": 17, + "column": 59 } } }, "loc": { "start": { - "line": 1, - "column": 48 + "line": 17, + "column": 53 }, "end": { - "line": 1, - "column": 56 + "line": 17, + "column": 61 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 45 + "line": 17, + "column": 50 }, "end": { - "line": 1, - "column": 46 + "line": 17, + "column": 51 } } }, @@ -160,52 +173,52 @@ "argument": { "type": "Identifier", "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 61 + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 17, + "column": 69 + }, + "end": { + "line": 17, + "column": 75 + } + } }, - "end": { - "line": 1, - "column": 62 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 64 + "line": 17, + "column": 69 }, "end": { - "line": 1, - "column": 70 + "line": 17, + "column": 77 } } }, + "decorators": [], "loc": { "start": { - "line": 1, - "column": 64 + "line": 17, + "column": 66 }, "end": { - "line": 1, - "column": 72 + "line": 17, + "column": 67 } } }, "loc": { "start": { - "line": 1, - "column": 58 + "line": 17, + "column": 63 }, "end": { - "line": 1, - "column": 72 + "line": 17, + "column": 67 } } } @@ -214,23 +227,23 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, - "column": 75 + "line": 17, + "column": 80 }, "end": { - "line": 1, - "column": 81 + "line": 17, + "column": 86 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, - "column": 82 + "line": 17, + "column": 87 } } }, @@ -244,24 +257,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 87 + "line": 17, + "column": 92 }, "end": { - "line": 1, - "column": 93 + "line": 17, + "column": 98 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 84 + "line": 17, + "column": 89 }, "end": { - "line": 1, - "column": 85 + "line": 17, + "column": 90 } } }, @@ -272,24 +285,24 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, - "column": 98 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 105 + "line": 17, + "column": 110 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 95 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 96 + "line": 17, + "column": 101 } } } @@ -298,46 +311,46 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 108 + "line": 17, + "column": 113 }, "end": { - "line": 1, - "column": 114 + "line": 17, + "column": 119 } } }, "loc": { "start": { - "line": 1, - "column": 83 + "line": 17, + "column": 88 }, "end": { - "line": 1, - "column": 116 + "line": 17, + "column": 121 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, - "column": 116 + "line": 17, + "column": 121 } } }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -345,11 +358,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -358,12 +371,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 117 + "line": 17, + "column": 122 } } }, @@ -377,11 +390,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -390,22 +403,22 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -417,9 +430,9 @@ "column": 1 }, "end": { - "line": 2, - "column": 8 + "line": 19, + "column": 1 } } } -TypeError: Expected at least 1 arguments, but got 0. [functionCall_15.ts:2:1] +TypeError: Expected at least 1 arguments, but got 0. [functionCall_15.ts:18:1] diff --git a/es2panda/test/compiler/ts/functionCall_15.ts b/es2panda/test/compiler/ts/functionCall_15.ts index 4c790a90725873a7c7dd85e148e4be498e4dca19..ac331dae120a9084f4153b43a7da9260904de5c9 100644 --- a/es2panda/test/compiler/ts/functionCall_15.ts +++ b/es2panda/test/compiler/ts/functionCall_15.ts @@ -14,5 +14,5 @@ */ -var func: { (a: number, ...c): boolean, (a, b: string[], ...c: number[]): string, (a: number, b: boolean): number }; -func(); \ No newline at end of file +var func: { (a: number, ...c): boolean, (a: any, b: string[], ...c: number[]): string, (a: number, b: boolean): number }; +func(); diff --git a/es2panda/test/compiler/ts/functionCall_2-expected.txt b/es2panda/test/compiler/ts/functionCall_2-expected.txt index 118db10fb74fc583fea1cc358f0e47336e517cf8..ce8c3511674e7e57859f5bc92bd43083792e479d 100644 --- a/es2panda/test/compiler/ts/functionCall_2-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_2-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -57,11 +57,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -71,33 +71,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -132,11 +132,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 20 }, "end": { - "line": 5, + "line": 21, "column": 26 } } @@ -144,11 +144,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -158,11 +158,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 30 }, "end": { - "line": 5, + "line": 21, "column": 36 } } @@ -174,25 +174,25 @@ "type": "ReturnStatement", "argument": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 6, + "line": 22, "column": 12 }, "end": { - "line": 6, + "line": 22, "column": 17 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 18 } } @@ -200,33 +200,33 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 36 }, "end": { - "line": 7, + "line": 23, "column": 2 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -241,11 +241,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -259,11 +259,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 7 }, "end": { - "line": 8, + "line": 24, "column": 12 } } @@ -274,11 +274,11 @@ "value": 5, "loc": { "start": { - "line": 8, + "line": 24, "column": 13 }, "end": { - "line": 8, + "line": 24, "column": 14 } } @@ -287,11 +287,11 @@ "optional": false, "loc": { "start": { - "line": 8, + "line": 24, "column": 7 }, "end": { - "line": 8, + "line": 24, "column": 15 } } @@ -300,22 +300,22 @@ "optional": false, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 16 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 17 } } @@ -327,9 +327,9 @@ "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 17 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [functionCall_2.ts:8:7] +TypeError: Type 'string' is not assignable to type 'number'. [functionCall_2.ts:24:7] diff --git a/es2panda/test/compiler/ts/functionCall_3-expected.txt b/es2panda/test/compiler/ts/functionCall_3-expected.txt index ee33b73357d9072ae1f9f77d08e64c9908bad012..666177dd8a111745f96b17c63cadd2a5b94294e0 100644 --- a/es2panda/test/compiler/ts/functionCall_3-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_3-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -57,11 +57,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -71,33 +71,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -127,11 +127,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -141,11 +141,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -154,22 +154,22 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } } -TypeError: Expected 1 arguments, but got 2. [functionCall_3.ts:2:9] +TypeError: Expected 1 arguments, but got 2. [functionCall_3.ts:18:9] diff --git a/es2panda/test/compiler/ts/functionCall_4-expected.txt b/es2panda/test/compiler/ts/functionCall_4-expected.txt index 31c7f4301f6c9c33a350da1a46d0cc0c6f7e4216..2ac57f8e9ba8d2a0a2f5e41238dc58f5381e9888 100644 --- a/es2panda/test/compiler/ts/functionCall_4-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_4-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -57,11 +57,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -81,33 +81,33 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 8 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -125,11 +125,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -139,22 +139,22 @@ "value": 0, "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 17 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -167,11 +167,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 20 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -183,11 +183,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 25 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -196,11 +196,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 20 }, "end": { - "line": 3, + "line": 19, "column": 27 } } @@ -211,33 +211,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 30 }, "end": { - "line": 3, + "line": 19, "column": 31 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 31 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -245,33 +245,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 4, + "line": 20, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -286,11 +286,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 5 } } @@ -298,14 +298,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -314,22 +314,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 12 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 13 } } @@ -341,9 +341,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 13 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [functionCall_4.ts:5:6] +TypeError: Type 'string' is not assignable to type 'number'. [functionCall_4.ts:21:6] diff --git a/es2panda/test/compiler/ts/functionCall_5-expected.txt b/es2panda/test/compiler/ts/functionCall_5-expected.txt index 5f5317661fa12c24a73b2cebc2d137788d3e82e9..789dce141662dcf2a0cd0aa5ceafe082f46bcc20 100644 --- a/es2panda/test/compiler/ts/functionCall_5-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_5-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -88,22 +88,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -119,22 +119,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -142,33 +142,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -183,11 +183,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 5 } } @@ -196,22 +196,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 7 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -223,9 +223,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 7 } } } -TypeError: Expected at least 2 arguments, but got 0. [functionCall_5.ts:5:1] +TypeError: Expected at least 2 arguments, but got 0. [functionCall_5.ts:21:1] diff --git a/es2panda/test/compiler/ts/functionCall_6-expected.txt b/es2panda/test/compiler/ts/functionCall_6-expected.txt index 0d2798ba803df9e5daa0c1239bf815045ec412b9..7caeb7188f20df4398fc67e123e32f70ad390afa 100644 --- a/es2panda/test/compiler/ts/functionCall_6-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_6-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -29,39 +29,39 @@ "argument": { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 27 - } - } - }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, - "column": 27 + "line": 17, + "column": 19 } } } @@ -76,22 +76,22 @@ "value": 6, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -99,33 +99,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -137,9 +137,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } } -TypeError: A rest parameter must be of an array type [functionCall_6.ts:1:15] +TypeError: A rest parameter must be of an array type [functionCall_6.ts:17:15] diff --git a/es2panda/test/compiler/ts/functionCall_7-expected.txt b/es2panda/test/compiler/ts/functionCall_7-expected.txt index 2657b2e7181e74bc28f051def462c846fb407a7a..d46b76e6a5de0a9c8a6f624fb6db3d5d4b1cd5f4 100644 --- a/es2panda/test/compiler/ts/functionCall_7-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_7-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -29,52 +29,52 @@ "argument": { "type": "Identifier", "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 18 + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } }, - "end": { - "line": 1, - "column": 19 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, - "column": 27 + "line": 17, + "column": 29 } } }, + "decorators": [], "loc": { "start": { - "line": 1, - "column": 21 + "line": 17, + "column": 18 }, "end": { - "line": 1, - "column": 29 + "line": 17, + "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, - "column": 29 + "line": 17, + "column": 19 } } } @@ -89,22 +89,22 @@ "value": 6, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -112,33 +112,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -153,11 +153,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 5 } } @@ -168,11 +168,11 @@ "value": 2, "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -181,22 +181,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -208,9 +208,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [functionCall_7.ts:5:6] +TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [functionCall_7.ts:21:6] diff --git a/es2panda/test/compiler/ts/functionCall_8-expected.txt b/es2panda/test/compiler/ts/functionCall_8-expected.txt index 69513e1736f3d41876969d93da3fbf69fd1221a2..57ca651e1b9277b91398cfd417284f6867626315 100644 --- a/es2panda/test/compiler/ts/functionCall_8-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_8-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -44,11 +44,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -58,52 +58,52 @@ "argument": { "type": "Identifier", "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 30 + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 17, + "column": 33 + }, + "end": { + "line": 17, + "column": 39 + } + } }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, - "column": 39 + "line": 17, + "column": 41 } } }, + "decorators": [], "loc": { "start": { - "line": 1, - "column": 33 + "line": 17, + "column": 30 }, "end": { - "line": 1, - "column": 41 + "line": 17, + "column": 31 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, - "column": 41 + "line": 17, + "column": 31 } } } @@ -113,33 +113,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 5 } } @@ -166,14 +166,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -182,22 +182,22 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [functionCall_8.ts:4:6] +TypeError: Type 'string' is not assignable to type 'number'. [functionCall_8.ts:20:6] diff --git a/es2panda/test/compiler/ts/functionCall_9-expected.txt b/es2panda/test/compiler/ts/functionCall_9-expected.txt index 3085dfee84863cf350c4193a689a940b6636771b..83c679d515edaa4ebd23c416cc3c538330723f84 100644 --- a/es2panda/test/compiler/ts/functionCall_9-expected.txt +++ b/es2panda/test/compiler/ts/functionCall_9-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -89,22 +89,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 47 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -113,11 +113,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -128,33 +128,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -169,11 +169,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 5 } } @@ -184,11 +184,11 @@ "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -197,22 +197,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -224,9 +224,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } } -TypeError: Expected 2-3 arguments, but got 1 [functionCall_9.ts:5:1] +TypeError: Expected 2-3 arguments, but got 1 [functionCall_9.ts:21:1] diff --git a/es2panda/test/compiler/ts/functionOverload1-expected.txt b/es2panda/test/compiler/ts/functionOverload1-expected.txt index 4b24d4cbd619359883eafbed9139ae31dc492f9e..337039d89d1c920ef0c13f12299907cff2a214c8 100644 --- a/es2panda/test/compiler/ts/functionOverload1-expected.txt +++ b/es2panda/test/compiler/ts/functionOverload1-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -41,11 +41,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -54,22 +54,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -85,11 +85,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -98,22 +98,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 39 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -121,11 +121,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -133,11 +133,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -147,33 +147,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 51 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -188,11 +188,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -218,11 +218,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -231,22 +231,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 28 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -262,11 +262,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 30 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -275,22 +275,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 33 }, "end": { - "line": 2, + "line": 18, "column": 39 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 30 }, "end": { - "line": 2, + "line": 18, "column": 41 } } @@ -298,11 +298,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 41 } } @@ -310,11 +310,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -324,33 +324,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 44 }, "end": { - "line": 2, + "line": 18, "column": 50 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 51 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 51 } } @@ -365,11 +365,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -395,11 +395,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -411,11 +411,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 22 }, "end": { - "line": 3, + "line": 19, "column": 28 } } @@ -424,11 +424,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 31 }, "end": { - "line": 3, + "line": 19, "column": 37 } } @@ -436,22 +436,22 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 22 }, "end": { - "line": 3, + "line": 19, "column": 37 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 39 } } @@ -459,11 +459,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 39 } } @@ -471,11 +471,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -491,22 +491,22 @@ "value": 2, "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -514,33 +514,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 41 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -555,11 +555,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 4 } } @@ -579,11 +579,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 7 }, "end": { - "line": 7, + "line": 23, "column": 8 } } @@ -593,11 +593,11 @@ "value": true, "loc": { "start": { - "line": 7, + "line": 23, "column": 10 }, "end": { - "line": 7, + "line": 23, "column": 14 } } @@ -605,11 +605,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 7 }, "end": { - "line": 7, + "line": 23, "column": 14 } } @@ -617,11 +617,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 16 } } @@ -630,22 +630,22 @@ "optional": false, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 17 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -657,9 +657,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 18 } } } -TypeError: No overload matches this call. [functionOverload1.ts:7:1] +TypeError: No overload matches this call. [functionOverload1.ts:23:1] diff --git a/es2panda/test/compiler/ts/functionOverload2-expected.txt b/es2panda/test/compiler/ts/functionOverload2-expected.txt index b35ef4e6d717e5675819c837e2d03d0bbe2fae27..e0e28b97757929e2c68253e9f326a31a51a758cf 100644 --- a/es2panda/test/compiler/ts/functionOverload2-expected.txt +++ b/es2panda/test/compiler/ts/functionOverload2-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -88,11 +88,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -101,11 +101,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -113,33 +113,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 53 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 54 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -174,11 +174,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -186,11 +186,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -202,11 +202,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -214,11 +214,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -231,11 +231,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 39 }, "end": { - "line": 2, + "line": 18, "column": 46 } } @@ -244,11 +244,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 47 }, "end": { - "line": 2, + "line": 18, "column": 54 } } @@ -256,33 +256,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 38 }, "end": { - "line": 2, + "line": 18, "column": 54 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 55 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 55 } } @@ -297,11 +297,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -317,11 +317,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -329,11 +329,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -345,11 +345,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 28 }, "end": { - "line": 3, + "line": 19, "column": 35 } } @@ -357,11 +357,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 25 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -374,11 +374,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 39 }, "end": { - "line": 3, + "line": 19, "column": 46 } } @@ -387,11 +387,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 47 }, "end": { - "line": 3, + "line": 19, "column": 54 } } @@ -399,33 +399,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 38 }, "end": { - "line": 3, + "line": 19, "column": 54 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 55 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 55 } } @@ -440,11 +440,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 13 } } @@ -463,11 +463,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 17 }, "end": { - "line": 4, + "line": 20, "column": 23 } } @@ -476,11 +476,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 26 }, "end": { - "line": 4, + "line": 20, "column": 32 } } @@ -489,11 +489,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 35 }, "end": { - "line": 4, + "line": 20, "column": 41 } } @@ -501,11 +501,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 17 }, "end": { - "line": 4, + "line": 20, "column": 41 } } @@ -513,11 +513,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 14 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -532,11 +532,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 53 } } @@ -545,11 +545,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 56 }, "end": { - "line": 4, + "line": 20, "column": 62 } } @@ -557,11 +557,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 62 } } @@ -569,11 +569,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 43 }, "end": { - "line": 4, + "line": 20, "column": 44 } } @@ -586,11 +586,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 66 }, "end": { - "line": 4, + "line": 20, "column": 73 } } @@ -599,11 +599,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 74 }, "end": { - "line": 4, + "line": 20, "column": 81 } } @@ -611,11 +611,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 65 }, "end": { - "line": 4, + "line": 20, "column": 81 } } @@ -633,25 +633,25 @@ "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 21 } } @@ -659,22 +659,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 22 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 23 } } @@ -682,33 +682,33 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 82 }, "end": { - "line": 6, + "line": 22, "column": 2 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -724,11 +724,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 4 } } @@ -738,33 +738,33 @@ "value": 5, "loc": { "start": { - "line": 8, + "line": 24, "column": 7 }, "end": { - "line": 8, + "line": 24, "column": 8 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 8 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 9 } } @@ -776,9 +776,9 @@ "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 9 } } } -TypeError: operator + cannot be applied to types { (a: number, b: string): [number, string], (a: string, b: boolean): [number, string], (a: bigint, b: boolean): [number, string] } and 5 [functionOverload2.ts:8:1] +TypeError: operator + cannot be applied to types { (a: number, b: string): [number, string], (a: string, b: boolean): [number, string], (a: bigint, b: boolean): [number, string] } and number [functionOverload2.ts:24:1] diff --git a/es2panda/test/compiler/ts/functionOverload3-expected.txt b/es2panda/test/compiler/ts/functionOverload3-expected.txt index 1d4e144d9467c4aceff01b00e0b4628fd013a34c..7026371e885b3e528d6f506cd460b329e37d7ce9 100644 --- a/es2panda/test/compiler/ts/functionOverload3-expected.txt +++ b/es2panda/test/compiler/ts/functionOverload3-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -72,11 +72,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -86,33 +86,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -127,11 +127,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -150,11 +150,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -163,11 +163,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 26 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -175,11 +175,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -187,11 +187,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -203,11 +203,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 37 }, "end": { - "line": 2, + "line": 18, "column": 43 } } @@ -215,11 +215,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 34 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -231,11 +231,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 48 }, "end": { - "line": 2, + "line": 18, "column": 54 } } @@ -243,11 +243,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 45 }, "end": { - "line": 2, + "line": 18, "column": 46 } } @@ -257,33 +257,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 57 }, "end": { - "line": 2, + "line": 18, "column": 63 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 64 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 64 } } @@ -298,11 +298,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -321,11 +321,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -334,11 +334,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -346,11 +346,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -358,11 +358,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -374,11 +374,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 38 }, "end": { - "line": 3, + "line": 19, "column": 44 } } @@ -387,11 +387,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 34 }, "end": { - "line": 3, + "line": 19, "column": 35 } } @@ -403,11 +403,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 50 }, "end": { - "line": 3, + "line": 19, "column": 56 } } @@ -416,11 +416,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 46 }, "end": { - "line": 3, + "line": 19, "column": 47 } } @@ -433,25 +433,25 @@ "type": "ReturnStatement", "argument": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 17 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 18 } } @@ -459,33 +459,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 58 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -497,9 +497,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } } -TypeError: This overload signature is not compatible with its implementation signature [functionOverload3.ts:3:1] +TypeError: This overload signature is not compatible with its implementation signature [functionOverload3.ts:17:10] diff --git a/es2panda/test/compiler/ts/functionOverload4-expected.txt b/es2panda/test/compiler/ts/functionOverload4-expected.txt index 663cac93455c0879c2bc539a755dc9682541cdf4..0fb3fe6b49f0963cda59093c8881321dbc06135f 100644 --- a/es2panda/test/compiler/ts/functionOverload4-expected.txt +++ b/es2panda/test/compiler/ts/functionOverload4-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -72,11 +72,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -86,33 +86,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -127,11 +127,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -150,11 +150,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -163,11 +163,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 26 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -175,11 +175,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -187,11 +187,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -203,11 +203,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 37 }, "end": { - "line": 2, + "line": 18, "column": 43 } } @@ -215,11 +215,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 34 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -231,11 +231,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 48 }, "end": { - "line": 2, + "line": 18, "column": 54 } } @@ -243,11 +243,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 45 }, "end": { - "line": 2, + "line": 18, "column": 46 } } @@ -257,33 +257,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 57 }, "end": { - "line": 2, + "line": 18, "column": 63 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 64 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 64 } } @@ -298,11 +298,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -321,11 +321,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -334,11 +334,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -346,11 +346,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -358,11 +358,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -374,11 +374,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 38 }, "end": { - "line": 3, + "line": 19, "column": 44 } } @@ -387,11 +387,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 34 }, "end": { - "line": 3, + "line": 19, "column": 35 } } @@ -403,11 +403,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 50 }, "end": { - "line": 3, + "line": 19, "column": 56 } } @@ -416,11 +416,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 46 }, "end": { - "line": 3, + "line": 19, "column": 47 } } @@ -436,22 +436,22 @@ "value": 12, "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -459,33 +459,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 58 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -502,11 +502,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } @@ -514,11 +514,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -531,11 +531,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 20 } } @@ -546,11 +546,11 @@ "value": 2, "loc": { "start": { - "line": 7, + "line": 23, "column": 21 }, "end": { - "line": 7, + "line": 23, "column": 22 } } @@ -559,22 +559,22 @@ "optional": false, "loc": { "start": { - "line": 7, + "line": 23, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 23 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 23 } } @@ -583,11 +583,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 24 } } @@ -599,9 +599,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 24 } } } -TypeError: Type 'number' is not assignable to type 'string' [functionOverload4.ts:7:5] +TypeError: Type 'number' is not assignable to type 'string'. [functionOverload4.ts:23:5] diff --git a/es2panda/test/compiler/ts/functionWithPattern1-expected.txt b/es2panda/test/compiler/ts/functionWithPattern1-expected.txt index 49a2b4b15b66d801aa76663756a97aec4ce65243..449bd70a3cdef865dee9d1ff60295f9b923bac18 100644 --- a/es2panda/test/compiler/ts/functionWithPattern1-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern1-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -60,11 +60,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -74,22 +74,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -97,11 +97,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -109,11 +109,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -126,36 +126,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -166,11 +166,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -178,11 +178,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -204,25 +204,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -230,11 +230,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -242,11 +242,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -256,11 +256,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 57 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -270,11 +270,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -282,22 +282,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -308,33 +308,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -350,11 +350,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -364,33 +364,33 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -402,9 +402,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } } -TypeError: operator + cannot be applied to types ([{ x }, y, z]?: [{ x?: string; }, number, number]) => void and 5 [functionWithPattern1.ts:5:1] +TypeError: operator + cannot be applied to types ([{ x }, y, z]?: [{ x: string; }, number, number]) => void and number [functionWithPattern1.ts:21:1] diff --git a/es2panda/test/compiler/ts/functionWithPattern10-expected.txt b/es2panda/test/compiler/ts/functionWithPattern10-expected.txt index d9ecf091d6023ebccbd4cc9c9a5c53aa05be8927..166eb0bf1da40cc51a5b300778209bff0265cd45 100644 --- a/es2panda/test/compiler/ts/functionWithPattern10-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern10-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,596 +25,523 @@ "expression": false, "params": [ { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, + "column": 16 + } + } + }, + "right": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, "column": 20 } } }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 25 } - }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 6, - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, + } + }, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "c", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, - "column": 33 + "line": 17, + "column": 29 } } }, - { - "type": "Identifier", - "name": "d", - "decorators": [], + "right": { + "type": "NumberLiteral", + "value": 6, "loc": { "start": { - "line": 1, - "column": 35 + "line": 17, + "column": 32 }, "end": { - "line": 1, - "column": 36 + "line": 17, + "column": 33 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 27 }, - "end": { - "line": 1, - "column": 37 + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + { + "type": "Identifier", + "name": "d", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 35 + }, + "end": { + "line": 17, + "column": 36 + } } } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 1, - "column": 41 - }, - "end": { - "line": 1, - "column": 45 - } + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "BooleanLiteral", + "value": true, + "loc": { + "start": { + "line": 17, + "column": 41 + }, + "end": { + "line": 17, + "column": 45 } - }, - { - "type": "ArrayExpression", - "elements": [ - { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 48 - }, - "end": { - "line": 1, - "column": 50 - } - } - }, - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 57 - } + } + }, + { + "type": "ArrayExpression", + "elements": [ + { + "type": "BigIntLiteral", + "value": "5n", + "loc": { + "start": { + "line": 17, + "column": 48 + }, + "end": { + "line": 17, + "column": 50 } } - ], - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 58 + }, + { + "type": "StringLiteral", + "value": "foo", + "loc": { + "start": { + "line": 17, + "column": 52 + }, + "end": { + "line": 17, + "column": 57 + } } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 59 + ], + "loc": { + "start": { + "line": 17, + "column": 47 + }, + "end": { + "line": 17, + "column": 58 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 27 + "line": 17, + "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, - "kind": "init", "loc": { "start": { - "line": 1, - "column": 24 + "line": 17, + "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, - { - "type": "Property", - "method": false, - "shorthand": true, - "computed": false, - "key": { + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 59 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "name": "t", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 61 + }, + "end": { + "line": 17, + "column": 62 + } + } + }, + "value": { + "type": "AssignmentPattern", + "left": { "type": "Identifier", "name": "t", "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "t", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 61 - }, - "end": { - "line": 1, - "column": 62 - } - } - }, - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 67 - }, - "end": { - "line": 1, - "column": 68 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 1, - "column": 70 - }, - "end": { - "line": 1, - "column": 71 - } - } - }, - "kind": "init", + "right": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, - "column": 71 + "line": 17, + "column": 68 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 73 - }, - "end": { - "line": 1, - "column": 74 - } + "value": { + "type": "NumberLiteral", + "value": 3, + "loc": { + "start": { + "line": 17, + "column": 70 + }, + "end": { + "line": 17, + "column": 71 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 67 }, - "value": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 78 - }, - "end": { - "line": 1, - "column": 79 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 1, - "column": 81 - }, - "end": { - "line": 1, - "column": 82 - } - } - }, - "kind": "init", + "end": { + "line": 17, + "column": 71 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 74 + } + } + }, + "value": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 78 }, "end": { - "line": 1, - "column": 82 + "line": 17, + "column": 79 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 84 - }, - "end": { - "line": 1, - "column": 85 - } - } - }, - "value": { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 87 - }, - "end": { - "line": 1, - "column": 89 - } + "value": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 17, + "column": 81 + }, + "end": { + "line": 17, + "column": 82 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 78 }, - "kind": "init", + "end": { + "line": 17, + "column": 82 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 84 }, "end": { - "line": 1, + "line": 17, + "column": 85 + } + } + }, + "value": { + "type": "BigIntLiteral", + "value": "5n", + "loc": { + "start": { + "line": 17, + "column": 87 + }, + "end": { + "line": 17, "column": 89 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 76 }, - "end": { - "line": 1, - "column": 91 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 84 + }, + "end": { + "line": 17, + "column": 89 + } } } - }, - "kind": "init", + ], "loc": { "start": { - "line": 1, - "column": 73 + "line": 17, + "column": 76 }, "end": { - "line": 1, + "line": 17, "column": 91 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 65 }, - "end": { - "line": 1, - "column": 93 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 91 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 61 + "line": 17, + "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 93 } } }, - "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 93 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 95 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 96 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 100 - }, - "end": { - "line": 1, - "column": 105 - } - } - }, - { - "type": "ObjectExpression", - "properties": [], - "loc": { - "start": { - "line": 1, - "column": 107 }, - "end": { - "line": 1, - "column": 109 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 61 + }, + "end": { + "line": 17, + "column": 93 + } } } - }, - { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 111 - }, - "end": { - "line": 1, - "column": 113 - } + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 95 } } - ], - "loc": { - "start": { - "line": 1, - "column": 99 - }, - "end": { - "line": 1, - "column": 114 - } } - }, + ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, - "column": 114 + "line": 17, + "column": 96 } } }, @@ -632,12 +559,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 118 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 119 + "line": 17, + "column": 101 } } }, @@ -657,12 +584,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 123 + "line": 17, + "column": 105 }, "end": { - "line": 1, - "column": 124 + "line": 17, + "column": 106 } } }, @@ -674,12 +601,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 126 + "line": 17, + "column": 108 }, "end": { - "line": 1, - "column": 127 + "line": 17, + "column": 109 } } }, @@ -688,35 +615,35 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 130 + "line": 17, + "column": 112 }, "end": { - "line": 1, - "column": 131 + "line": 17, + "column": 113 } } }, "loc": { "start": { - "line": 1, - "column": 126 + "line": 17, + "column": 108 }, "end": { - "line": 1, - "column": 131 + "line": 17, + "column": 113 } } } ], "loc": { "start": { - "line": 1, - "column": 122 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 132 + "line": 17, + "column": 114 } } }, @@ -728,47 +655,47 @@ "value": true, "loc": { "start": { - "line": 1, - "column": 136 + "line": 17, + "column": 118 }, "end": { - "line": 1, - "column": 140 + "line": 17, + "column": 122 } } } ], "loc": { "start": { - "line": 1, - "column": 135 + "line": 17, + "column": 117 }, "end": { - "line": 1, - "column": 141 + "line": 17, + "column": 123 } } }, "loc": { "start": { - "line": 1, - "column": 122 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 141 + "line": 17, + "column": 123 } } } ], "loc": { "start": { - "line": 1, - "column": 121 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 142 + "line": 17, + "column": 124 } } }, @@ -783,85 +710,85 @@ "value": 2, "loc": { "start": { - "line": 1, - "column": 147 + "line": 17, + "column": 129 }, "end": { - "line": 1, - "column": 148 + "line": 17, + "column": 130 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, - "column": 150 + "line": 17, + "column": 132 }, "end": { - "line": 1, - "column": 155 + "line": 17, + "column": 137 } } } ], "loc": { "start": { - "line": 1, - "column": 146 + "line": 17, + "column": 128 }, "end": { - "line": 1, - "column": 156 + "line": 17, + "column": 138 } } } ], "loc": { "start": { - "line": 1, - "column": 145 + "line": 17, + "column": 127 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } }, "loc": { "start": { - "line": 1, - "column": 121 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } }, "kind": "init", "loc": { "start": { - "line": 1, - "column": 118 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } } ], "loc": { "start": { - "line": 1, - "column": 116 + "line": 17, + "column": 98 }, "end": { - "line": 1, - "column": 159 + "line": 17, + "column": 141 } } } @@ -871,33 +798,33 @@ "statements": [], "loc": { "start": { - "line": 1, - "column": 161 + "line": 17, + "column": 143 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -912,11 +839,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -926,16 +853,16 @@ "type": "ArrayExpression", "elements": [ { - "type": "StringLiteral", - "value": "", + "type": "NumberLiteral", + "value": 3, "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, - "column": 11 + "line": 21, + "column": 7 } } }, @@ -953,12 +880,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 15 + "line": 21, + "column": 11 }, "end": { - "line": 5, - "column": 16 + "line": 21, + "column": 12 } } }, @@ -970,12 +897,12 @@ "value": true, "loc": { "start": { - "line": 5, - "column": 19 + "line": 21, + "column": 15 }, "end": { - "line": 5, - "column": 23 + "line": 21, + "column": 19 } } }, @@ -984,36 +911,36 @@ "elements": [], "loc": { "start": { - "line": 5, - "column": 25 + "line": 21, + "column": 21 }, "end": { - "line": 5, - "column": 27 + "line": 21, + "column": 23 } } } ], "loc": { "start": { - "line": 5, - "column": 18 + "line": 21, + "column": 14 }, "end": { - "line": 5, - "column": 28 + "line": 21, + "column": 24 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 15 + "line": 21, + "column": 11 }, "end": { - "line": 5, - "column": 28 + "line": 21, + "column": 24 } } }, @@ -1028,12 +955,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 30 + "line": 21, + "column": 26 }, "end": { - "line": 5, - "column": 31 + "line": 21, + "column": 27 } } }, @@ -1042,63 +969,62 @@ "value": 5, "loc": { "start": { - "line": 5, - "column": 33 + "line": 21, + "column": 29 }, "end": { - "line": 5, - "column": 34 + "line": 21, + "column": 30 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 30 + "line": 21, + "column": 26 }, "end": { - "line": 5, - "column": 34 + "line": 21, + "column": 30 } } } ], "loc": { "start": { - "line": 5, - "column": 13 + "line": 21, + "column": 9 }, "end": { - "line": 5, - "column": 36 + "line": 21, + "column": 32 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 5, - "column": 38 + "line": 21, + "column": 34 }, "end": { - "line": 5, - "column": 40 + "line": 21, + "column": 36 } } } ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, - "column": 41 + "line": 21, + "column": 37 } } }, @@ -1107,12 +1033,12 @@ "properties": [], "loc": { "start": { - "line": 5, - "column": 43 + "line": 21, + "column": 39 }, "end": { - "line": 5, - "column": 45 + "line": 21, + "column": 41 } } } @@ -1120,23 +1046,23 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, - "column": 46 + "line": 21, + "column": 42 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, - "column": 47 + "line": 21, + "column": 43 } } } @@ -1147,9 +1073,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 1 } } } -TypeError: Type 'number' is not assignable to type '{ a: number; b: { a: number; b: bigint; }; }'. [functionWithPattern10.ts:5:30] +TypeError: Type 'number' is not assignable to type '{ a: number; b: { a: number; b: bigint; }; }'. [functionWithPattern10.ts:21:26] diff --git a/es2panda/test/compiler/ts/functionWithPattern10.ts b/es2panda/test/compiler/ts/functionWithPattern10.ts index 6df8cc54ce367f2fcb5e7910df6003c0c2b23a25..13ff6dc812eeaa76e08476e3f9db809d6d2a808c 100644 --- a/es2panda/test/compiler/ts/functionWithPattern10.ts +++ b/es2panda/test/compiler/ts/functionWithPattern10.ts @@ -14,8 +14,8 @@ */ -function foo([a = 2, { b: [c = 6, d] = [true, [5n, "foo"]], t = { a: 3, b: { a: 2, b: 5n } } }] = ["foo", {}, 4n], { r: [[r, z = 5] = [true]] = [[2, "foo"]] }) { +function foo([a = 2, { b: [c = 6, d] = [true, [5n, "foo"]], t = { a: 3, b: { a: 2, b: 5n } } }], { r: [[r, z = 5] = [true]] = [[2, "foo"]] }) { } -foo(["foo", { b: [true, []], t: 5 }, 5n], {}); +foo([3, { b: [true, []], t: 5 }, 5n], {}); diff --git a/es2panda/test/compiler/ts/functionWithPattern11-expected.txt b/es2panda/test/compiler/ts/functionWithPattern11-expected.txt index 023440038f80712ddbe28d6a5b4913686efc4e7b..2ee61d5023570939b216c1294aed73655d799805 100644 --- a/es2panda/test/compiler/ts/functionWithPattern11-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern11-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,596 +25,523 @@ "expression": false, "params": [ { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, + "column": 16 + } + } + }, + "right": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, "column": 20 } } }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 25 } - }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 6, - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, + } + }, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "c", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, - "column": 33 + "line": 17, + "column": 29 } } }, - { - "type": "Identifier", - "name": "d", - "decorators": [], + "right": { + "type": "NumberLiteral", + "value": 6, "loc": { "start": { - "line": 1, - "column": 35 + "line": 17, + "column": 32 }, "end": { - "line": 1, - "column": 36 + "line": 17, + "column": 33 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 27 }, - "end": { - "line": 1, - "column": 37 + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + { + "type": "Identifier", + "name": "d", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 35 + }, + "end": { + "line": 17, + "column": 36 + } } } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 1, - "column": 41 - }, - "end": { - "line": 1, - "column": 45 - } + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "BooleanLiteral", + "value": true, + "loc": { + "start": { + "line": 17, + "column": 41 + }, + "end": { + "line": 17, + "column": 45 } - }, - { - "type": "ArrayExpression", - "elements": [ - { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 48 - }, - "end": { - "line": 1, - "column": 50 - } - } - }, - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 57 - } + } + }, + { + "type": "ArrayExpression", + "elements": [ + { + "type": "BigIntLiteral", + "value": "5n", + "loc": { + "start": { + "line": 17, + "column": 48 + }, + "end": { + "line": 17, + "column": 50 } } - ], - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 58 + }, + { + "type": "StringLiteral", + "value": "foo", + "loc": { + "start": { + "line": 17, + "column": 52 + }, + "end": { + "line": 17, + "column": 57 + } } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 59 + ], + "loc": { + "start": { + "line": 17, + "column": 47 + }, + "end": { + "line": 17, + "column": 58 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 27 + "line": 17, + "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, - "kind": "init", "loc": { "start": { - "line": 1, - "column": 24 + "line": 17, + "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, - { - "type": "Property", - "method": false, - "shorthand": true, - "computed": false, - "key": { + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 59 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "name": "t", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 61 + }, + "end": { + "line": 17, + "column": 62 + } + } + }, + "value": { + "type": "AssignmentPattern", + "left": { "type": "Identifier", "name": "t", "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "t", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 61 - }, - "end": { - "line": 1, - "column": 62 - } - } - }, - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 67 - }, - "end": { - "line": 1, - "column": 68 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 1, - "column": 70 - }, - "end": { - "line": 1, - "column": 71 - } - } - }, - "kind": "init", + "right": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, - "column": 71 + "line": 17, + "column": 68 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 73 - }, - "end": { - "line": 1, - "column": 74 - } + "value": { + "type": "NumberLiteral", + "value": 3, + "loc": { + "start": { + "line": 17, + "column": 70 + }, + "end": { + "line": 17, + "column": 71 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 67 }, - "value": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 78 - }, - "end": { - "line": 1, - "column": 79 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 1, - "column": 81 - }, - "end": { - "line": 1, - "column": 82 - } - } - }, - "kind": "init", + "end": { + "line": 17, + "column": 71 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 74 + } + } + }, + "value": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 78 }, "end": { - "line": 1, - "column": 82 + "line": 17, + "column": 79 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 84 - }, - "end": { - "line": 1, - "column": 85 - } - } - }, - "value": { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 87 - }, - "end": { - "line": 1, - "column": 89 - } + "value": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 17, + "column": 81 + }, + "end": { + "line": 17, + "column": 82 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 78 }, - "kind": "init", + "end": { + "line": 17, + "column": 82 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 84 }, "end": { - "line": 1, + "line": 17, + "column": 85 + } + } + }, + "value": { + "type": "BigIntLiteral", + "value": "5n", + "loc": { + "start": { + "line": 17, + "column": 87 + }, + "end": { + "line": 17, "column": 89 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 76 }, - "end": { - "line": 1, - "column": 91 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 84 + }, + "end": { + "line": 17, + "column": 89 + } } } - }, - "kind": "init", + ], "loc": { "start": { - "line": 1, - "column": 73 + "line": 17, + "column": 76 }, "end": { - "line": 1, + "line": 17, "column": 91 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 65 }, - "end": { - "line": 1, - "column": 93 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 91 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 61 + "line": 17, + "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 93 } } }, - "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 93 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 95 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 96 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 100 }, - "end": { - "line": 1, - "column": 105 - } - } - }, - { - "type": "ObjectExpression", - "properties": [], - "loc": { - "start": { - "line": 1, - "column": 107 - }, - "end": { - "line": 1, - "column": 109 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 61 + }, + "end": { + "line": 17, + "column": 93 + } } } - }, - { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 111 - }, - "end": { - "line": 1, - "column": 113 - } + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 95 } } - ], - "loc": { - "start": { - "line": 1, - "column": 99 - }, - "end": { - "line": 1, - "column": 114 - } } - }, + ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, - "column": 114 + "line": 17, + "column": 96 } } }, @@ -632,12 +559,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 118 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 119 + "line": 17, + "column": 101 } } }, @@ -657,12 +584,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 123 + "line": 17, + "column": 105 }, "end": { - "line": 1, - "column": 124 + "line": 17, + "column": 106 } } }, @@ -674,12 +601,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 126 + "line": 17, + "column": 108 }, "end": { - "line": 1, - "column": 127 + "line": 17, + "column": 109 } } }, @@ -688,35 +615,35 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 130 + "line": 17, + "column": 112 }, "end": { - "line": 1, - "column": 131 + "line": 17, + "column": 113 } } }, "loc": { "start": { - "line": 1, - "column": 126 + "line": 17, + "column": 108 }, "end": { - "line": 1, - "column": 131 + "line": 17, + "column": 113 } } } ], "loc": { "start": { - "line": 1, - "column": 122 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 132 + "line": 17, + "column": 114 } } }, @@ -728,47 +655,47 @@ "value": true, "loc": { "start": { - "line": 1, - "column": 136 + "line": 17, + "column": 118 }, "end": { - "line": 1, - "column": 140 + "line": 17, + "column": 122 } } } ], "loc": { "start": { - "line": 1, - "column": 135 + "line": 17, + "column": 117 }, "end": { - "line": 1, - "column": 141 + "line": 17, + "column": 123 } } }, "loc": { "start": { - "line": 1, - "column": 122 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 141 + "line": 17, + "column": 123 } } } ], "loc": { "start": { - "line": 1, - "column": 121 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 142 + "line": 17, + "column": 124 } } }, @@ -783,85 +710,85 @@ "value": 2, "loc": { "start": { - "line": 1, - "column": 147 + "line": 17, + "column": 129 }, "end": { - "line": 1, - "column": 148 + "line": 17, + "column": 130 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, - "column": 150 + "line": 17, + "column": 132 }, "end": { - "line": 1, - "column": 155 + "line": 17, + "column": 137 } } } ], "loc": { "start": { - "line": 1, - "column": 146 + "line": 17, + "column": 128 }, "end": { - "line": 1, - "column": 156 + "line": 17, + "column": 138 } } } ], "loc": { "start": { - "line": 1, - "column": 145 + "line": 17, + "column": 127 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } }, "loc": { "start": { - "line": 1, - "column": 121 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } }, "kind": "init", "loc": { "start": { - "line": 1, - "column": 118 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } } ], "loc": { "start": { - "line": 1, - "column": 116 + "line": 17, + "column": 98 }, "end": { - "line": 1, - "column": 159 + "line": 17, + "column": 141 } } } @@ -871,33 +798,33 @@ "statements": [], "loc": { "start": { - "line": 1, - "column": 161 + "line": 17, + "column": 143 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -912,11 +839,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -926,16 +853,16 @@ "type": "ArrayExpression", "elements": [ { - "type": "StringLiteral", - "value": "", + "type": "NumberLiteral", + "value": 2, "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, - "column": 11 + "line": 21, + "column": 7 } } }, @@ -953,12 +880,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 15 + "line": 21, + "column": 11 }, "end": { - "line": 5, - "column": 16 + "line": 21, + "column": 12 } } }, @@ -970,12 +897,12 @@ "value": true, "loc": { "start": { - "line": 5, - "column": 19 + "line": 21, + "column": 15 }, "end": { - "line": 5, - "column": 23 + "line": 21, + "column": 19 } } }, @@ -984,36 +911,36 @@ "elements": [], "loc": { "start": { - "line": 5, - "column": 25 + "line": 21, + "column": 21 }, "end": { - "line": 5, - "column": 27 + "line": 21, + "column": 23 } } } ], "loc": { "start": { - "line": 5, - "column": 18 + "line": 21, + "column": 14 }, "end": { - "line": 5, - "column": 28 + "line": 21, + "column": 24 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 15 + "line": 21, + "column": 11 }, "end": { - "line": 5, - "column": 28 + "line": 21, + "column": 24 } } }, @@ -1028,12 +955,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 30 + "line": 21, + "column": 26 }, "end": { - "line": 5, - "column": 31 + "line": 21, + "column": 27 } } }, @@ -1051,12 +978,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 35 + "line": 21, + "column": 31 }, "end": { - "line": 5, - "column": 36 + "line": 21, + "column": 32 } } }, @@ -1065,24 +992,24 @@ "value": 1, "loc": { "start": { - "line": 5, - "column": 38 + "line": 21, + "column": 34 }, "end": { - "line": 5, - "column": 39 + "line": 21, + "column": 35 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 35 + "line": 21, + "column": 31 }, "end": { - "line": 5, - "column": 39 + "line": 21, + "column": 35 } } }, @@ -1097,101 +1024,100 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 41 + "line": 21, + "column": 37 }, "end": { - "line": 5, - "column": 42 + "line": 21, + "column": 38 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, - "column": 44 + "line": 21, + "column": 40 }, "end": { - "line": 5, - "column": 49 + "line": 21, + "column": 45 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 41 + "line": 21, + "column": 37 }, "end": { - "line": 5, - "column": 49 + "line": 21, + "column": 45 } } } ], "loc": { "start": { - "line": 5, - "column": 33 + "line": 21, + "column": 29 }, "end": { - "line": 5, - "column": 51 + "line": 21, + "column": 47 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 30 + "line": 21, + "column": 26 }, "end": { - "line": 5, - "column": 51 + "line": 21, + "column": 47 } } } ], "loc": { "start": { - "line": 5, - "column": 13 + "line": 21, + "column": 9 }, "end": { - "line": 5, - "column": 53 + "line": 21, + "column": 49 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 5, - "column": 55 + "line": 21, + "column": 51 }, "end": { - "line": 5, - "column": 57 + "line": 21, + "column": 53 } } } ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, - "column": 58 + "line": 21, + "column": 54 } } }, @@ -1200,12 +1126,12 @@ "properties": [], "loc": { "start": { - "line": 5, - "column": 60 + "line": 21, + "column": 56 }, "end": { - "line": 5, - "column": 62 + "line": 21, + "column": 58 } } } @@ -1213,23 +1139,23 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, - "column": 63 + "line": 21, + "column": 59 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, - "column": 64 + "line": 21, + "column": 60 } } } @@ -1240,9 +1166,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 1 } } } -TypeError: Object literal may only specify known properties, and 'z' does not exist in type '{ a: number; b: { a: number; b: bigint; }; }' [functionWithPattern11.ts:5:41] +TypeError: Object literal may only specify known properties, and "z" does not exist in type '{ a: number; b: { a: number; b: bigint; }; }'. [functionWithPattern11.ts:21:37] diff --git a/es2panda/test/compiler/ts/functionWithPattern11.ts b/es2panda/test/compiler/ts/functionWithPattern11.ts index d750ca762054e95e91e23a740b7a253d9035c280..2091be4d440a8eb742fa767d52fd19af5837e9f5 100644 --- a/es2panda/test/compiler/ts/functionWithPattern11.ts +++ b/es2panda/test/compiler/ts/functionWithPattern11.ts @@ -14,8 +14,8 @@ */ -function foo([a = 2, { b: [c = 6, d] = [true, [5n, "foo"]], t = { a: 3, b: { a: 2, b: 5n } } }] = ["foo", {}, 4n], { r: [[r, z = 5] = [true]] = [[2, "foo"]] }) { +function foo([a = 2, { b: [c = 6, d] = [true, [5n, "foo"]], t = { a: 3, b: { a: 2, b: 5n } } }], { r: [[r, z = 5] = [true]] = [[2, "foo"]] }) { } -foo(["foo", { b: [true, []], t: { a: 1, z: "foo" } }, 5n], {}); +foo([2, { b: [true, []], t: { a: 1, z: "foo" } }, 5n], {}); diff --git a/es2panda/test/compiler/ts/functionWithPattern12-expected.txt b/es2panda/test/compiler/ts/functionWithPattern12-expected.txt index 6936371ba43772e23ae5dbd951f35f98bd1db3fe..0b19d10968aebbc02d522c62862607cfbfaf0dfd 100644 --- a/es2panda/test/compiler/ts/functionWithPattern12-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern12-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -37,11 +37,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -51,22 +51,22 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -107,11 +107,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -121,22 +121,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -147,11 +147,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -159,11 +159,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -176,11 +176,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -190,29 +190,28 @@ "elements": [ { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -220,11 +219,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -232,22 +231,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -255,11 +254,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -275,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -292,11 +291,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -315,11 +314,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -329,11 +328,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -341,11 +340,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -361,11 +360,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 73 }, "end": { - "line": 1, + "line": 17, "column": 74 } } @@ -384,11 +383,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 78 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -398,11 +397,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 81 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -410,11 +409,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 78 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -430,26 +429,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 84 }, "end": { - "line": 1, + "line": 17, "column": 85 } } }, "value": { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 1, + "line": 17, "column": 87 }, "end": { - "line": 1, + "line": 17, "column": 89 } } @@ -457,11 +455,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 84 }, "end": { - "line": 1, + "line": 17, "column": 89 } } @@ -469,11 +467,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 76 }, "end": { - "line": 1, + "line": 17, "column": 91 } } @@ -481,11 +479,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 73 }, "end": { - "line": 1, + "line": 17, "column": 91 } } @@ -493,22 +491,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 93 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 93 } } @@ -516,11 +514,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 93 } } @@ -528,11 +526,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 95 } } @@ -540,11 +538,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 96 } } @@ -554,14 +552,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 100 }, "end": { - "line": 1, + "line": 17, "column": 105 } } @@ -571,26 +569,25 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 107 }, "end": { - "line": 1, + "line": 17, "column": 109 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "4n", "loc": { "start": { - "line": 1, + "line": 17, "column": 111 }, "end": { - "line": 1, + "line": 17, "column": 113 } } @@ -598,22 +595,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 99 }, "end": { - "line": 1, + "line": 17, "column": 114 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 114 } } @@ -632,11 +629,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 118 }, "end": { - "line": 1, + "line": 17, "column": 119 } } @@ -657,11 +654,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 123 }, "end": { - "line": 1, + "line": 17, "column": 124 } } @@ -674,11 +671,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 126 }, "end": { - "line": 1, + "line": 17, "column": 127 } } @@ -688,22 +685,22 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 130 }, "end": { - "line": 1, + "line": 17, "column": 131 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 126 }, "end": { - "line": 1, + "line": 17, "column": 131 } } @@ -711,11 +708,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 122 }, "end": { - "line": 1, + "line": 17, "column": 132 } } @@ -728,11 +725,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 136 }, "end": { - "line": 1, + "line": 17, "column": 140 } } @@ -740,22 +737,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 135 }, "end": { - "line": 1, + "line": 17, "column": 141 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 122 }, "end": { - "line": 1, + "line": 17, "column": 141 } } @@ -763,11 +760,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 121 }, "end": { - "line": 1, + "line": 17, "column": 142 } } @@ -783,25 +780,25 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 147 }, "end": { - "line": 1, + "line": 17, "column": 148 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 150 }, "end": { - "line": 1, + "line": 17, "column": 155 } } @@ -809,11 +806,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 146 }, "end": { - "line": 1, + "line": 17, "column": 156 } } @@ -821,22 +818,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 145 }, "end": { - "line": 1, + "line": 17, "column": 157 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 121 }, "end": { - "line": 1, + "line": 17, "column": 157 } } @@ -844,11 +841,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 118 }, "end": { - "line": 1, + "line": 17, "column": 157 } } @@ -856,11 +853,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 116 }, "end": { - "line": 1, + "line": 17, "column": 159 } } @@ -871,33 +868,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 161 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -912,11 +909,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -927,14 +924,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -944,26 +941,25 @@ "properties": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 15 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 19 } } @@ -971,11 +967,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 20 } } @@ -994,11 +990,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 24 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -1011,14 +1007,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 29 }, "end": { - "line": 5, + "line": 21, "column": 34 } } @@ -1026,11 +1022,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 28 }, "end": { - "line": 5, + "line": 21, "column": 35 } } @@ -1038,11 +1034,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 27 }, "end": { - "line": 5, + "line": 21, "column": 36 } } @@ -1050,11 +1046,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 24 }, "end": { - "line": 5, + "line": 21, "column": 36 } } @@ -1062,11 +1058,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 22 }, "end": { - "line": 5, + "line": 21, "column": 38 } } @@ -1075,22 +1071,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 39 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 40 } } @@ -1102,9 +1098,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [functionWithPattern12.ts:5:29] +TypeError: Type 'string' is not assignable to type 'number'. [functionWithPattern12.ts:21:29] diff --git a/es2panda/test/compiler/ts/functionWithPattern2-expected.txt b/es2panda/test/compiler/ts/functionWithPattern2-expected.txt index 0b42d6518672e97e930cd0aa7c3c8342fd57e41a..33c04fee44f36dc470dbb8fce3d2fb499919e02c 100644 --- a/es2panda/test/compiler/ts/functionWithPattern2-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern2-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -40,11 +40,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -57,11 +57,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,22 +71,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -94,11 +94,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -114,11 +114,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -131,36 +131,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 32 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -168,11 +168,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -180,11 +180,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -203,25 +203,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -229,11 +229,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -241,22 +241,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 49 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -267,33 +267,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -309,11 +309,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -323,33 +323,33 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -361,9 +361,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } } -TypeError: operator + cannot be applied to types ({ x, y }?: { x?: string; y?: string; }) => void and 5 [functionWithPattern2.ts:5:1] +TypeError: operator + cannot be applied to types ({ x, y }?: { x?: string; y?: string; }) => void and number [functionWithPattern2.ts:21:1] diff --git a/es2panda/test/compiler/ts/functionWithPattern3-expected.txt b/es2panda/test/compiler/ts/functionWithPattern3-expected.txt index aaaf2c5919dce4296da2cac0ab05502aaa964803..d675320700cd63d1b577650b141be484fbe64562 100644 --- a/es2panda/test/compiler/ts/functionWithPattern3-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern3-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -76,11 +76,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -88,11 +88,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -100,11 +100,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -112,11 +112,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -132,11 +132,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -157,11 +157,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -174,11 +174,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -188,22 +188,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -211,11 +211,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -231,11 +231,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -248,36 +248,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 49 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -285,11 +285,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -297,11 +297,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -320,25 +320,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 57 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 64 } } @@ -346,11 +346,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 64 } } @@ -358,22 +358,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 66 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -381,11 +381,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -393,11 +393,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -408,33 +408,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -450,11 +450,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -464,33 +464,33 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -502,9 +502,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } } -TypeError: operator + cannot be applied to types ({ x: { asd }, y: { t, r } }: { x: { asd: any; }; y?: { t?: string; r?: string; }; }) => void and 5 [functionWithPattern3.ts:5:1] +TypeError: operator + cannot be applied to types ({ x: { asd }, y: { t, r } }: { x?: { asd: any; }; y?: { t: string; }; }) => void and number [functionWithPattern3.ts:21:1] diff --git a/es2panda/test/compiler/ts/functionWithPattern4-expected.txt b/es2panda/test/compiler/ts/functionWithPattern4-expected.txt index 5ac11c8f00a1cf35ce199d1dd4386499f73fd32a..d41b0c50692f68e1f1f1b1f5019c49d6346b01d5 100644 --- a/es2panda/test/compiler/ts/functionWithPattern4-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern4-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -40,11 +40,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -55,11 +55,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -67,11 +67,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -87,11 +87,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -129,36 +129,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -166,11 +166,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -178,11 +178,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -201,11 +201,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -215,11 +215,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -227,11 +227,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -239,22 +239,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -262,11 +262,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -282,11 +282,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -304,11 +304,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -318,22 +318,22 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 58 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -346,11 +346,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -360,22 +360,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -383,11 +383,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -400,11 +400,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -414,28 +414,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 74 }, "end": { - "line": 1, + "line": 17, "column": 79 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 81 }, "end": { - "line": 1, + "line": 17, "column": 86 } } @@ -443,11 +443,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 73 }, "end": { - "line": 1, + "line": 17, "column": 87 } } @@ -455,22 +455,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 69 }, "end": { - "line": 1, + "line": 17, "column": 88 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -478,11 +478,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -490,11 +490,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 90 } } @@ -513,11 +513,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 95 }, "end": { - "line": 1, + "line": 17, "column": 96 } } @@ -527,11 +527,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 98 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -539,11 +539,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 95 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -551,22 +551,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 93 }, "end": { - "line": 1, + "line": 17, "column": 104 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 104 } } @@ -577,33 +577,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 106 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -619,11 +619,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -633,33 +633,33 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -671,9 +671,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } } -TypeError: operator + cannot be applied to types ({ a, b: { t }, d: [e, f] }?: { a: boolean; b?: { t?: number; }; d?: [number, string[]]; }) => void and 5 [functionWithPattern4.ts:5:1] +TypeError: operator + cannot be applied to types ({ a, b: { t }, d: [e, f] }?: { a: boolean; b?: { t: number; }; d?: [number, [string, string]]; }) => void and number [functionWithPattern4.ts:21:1] diff --git a/es2panda/test/compiler/ts/functionWithPattern5-expected.txt b/es2panda/test/compiler/ts/functionWithPattern5-expected.txt index 84c17a330f9e6c55e0dc6de0abb37b373f2b558e..33b154894dee89fb8caa93cd863313c0a5756352 100644 --- a/es2panda/test/compiler/ts/functionWithPattern5-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern5-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -40,11 +40,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -55,11 +55,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -67,11 +67,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -87,11 +87,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -129,36 +129,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -166,11 +166,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -178,11 +178,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -201,11 +201,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -215,11 +215,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -227,11 +227,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -239,22 +239,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -262,11 +262,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -282,11 +282,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -304,11 +304,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -318,22 +318,22 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 58 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -346,11 +346,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -360,22 +360,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -383,11 +383,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -400,11 +400,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -414,28 +414,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 74 }, "end": { - "line": 1, + "line": 17, "column": 79 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 81 }, "end": { - "line": 1, + "line": 17, "column": 86 } } @@ -443,11 +443,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 73 }, "end": { - "line": 1, + "line": 17, "column": 87 } } @@ -455,22 +455,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 69 }, "end": { - "line": 1, + "line": 17, "column": 88 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -478,11 +478,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -490,11 +490,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 90 } } @@ -513,11 +513,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 95 }, "end": { - "line": 1, + "line": 17, "column": 96 } } @@ -527,11 +527,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 98 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -539,11 +539,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 95 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -551,22 +551,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 93 }, "end": { - "line": 1, + "line": 17, "column": 104 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 104 } } @@ -577,33 +577,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 106 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -618,11 +618,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -642,11 +642,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -656,11 +656,11 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -668,11 +668,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -680,11 +680,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 13 } } @@ -693,22 +693,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -720,9 +720,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 15 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [functionWithPattern5.ts:5:7] +TypeError: Type 'number' is not assignable to type 'boolean'. [functionWithPattern5.ts:21:7] diff --git a/es2panda/test/compiler/ts/functionWithPattern6-expected.txt b/es2panda/test/compiler/ts/functionWithPattern6-expected.txt index 00edda28840ca884ef089c79ec555e500bb9574a..44be38f23cd36856fa685843c6b8b61242e91c3e 100644 --- a/es2panda/test/compiler/ts/functionWithPattern6-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern6-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -40,11 +40,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -55,11 +55,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -67,11 +67,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -87,11 +87,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -129,36 +129,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -166,11 +166,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -178,11 +178,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -201,11 +201,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -215,11 +215,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -227,11 +227,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -239,22 +239,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -262,11 +262,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -282,11 +282,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -304,11 +304,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -318,22 +318,22 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 58 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -346,11 +346,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -360,22 +360,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -383,11 +383,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -400,11 +400,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -414,28 +414,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 74 }, "end": { - "line": 1, + "line": 17, "column": 79 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 81 }, "end": { - "line": 1, + "line": 17, "column": 86 } } @@ -443,11 +443,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 73 }, "end": { - "line": 1, + "line": 17, "column": 87 } } @@ -455,22 +455,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 69 }, "end": { - "line": 1, + "line": 17, "column": 88 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -478,11 +478,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -490,11 +490,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 90 } } @@ -513,11 +513,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 95 }, "end": { - "line": 1, + "line": 17, "column": 96 } } @@ -527,11 +527,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 98 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -539,11 +539,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 95 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -551,22 +551,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 93 }, "end": { - "line": 1, + "line": 17, "column": 104 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 104 } } @@ -577,33 +577,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 106 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -618,11 +618,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -642,11 +642,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -656,11 +656,11 @@ "value": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -668,11 +668,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -688,11 +688,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -711,25 +711,25 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 22 }, "end": { - "line": 5, + "line": 21, "column": 23 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo ", "loc": { "start": { - "line": 5, + "line": 21, "column": 25 }, "end": { - "line": 5, + "line": 21, "column": 31 } } @@ -737,11 +737,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 22 }, "end": { - "line": 5, + "line": 21, "column": 31 } } @@ -749,11 +749,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 20 }, "end": { - "line": 5, + "line": 21, "column": 33 } } @@ -761,11 +761,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 33 } } @@ -773,11 +773,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 35 } } @@ -786,22 +786,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 36 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 37 } } @@ -813,9 +813,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 37 } } } -TypeError: Object literal may only specify known properties, and 'r' does not exist in type '{ t?: number; }' [functionWithPattern6.ts:5:22] +TypeError: Object literal may only specify known properties, and "r" does not exist in type '{ t: number; }'. [functionWithPattern6.ts:21:22] diff --git a/es2panda/test/compiler/ts/functionWithPattern7-expected.txt b/es2panda/test/compiler/ts/functionWithPattern7-expected.txt index 749c8a0b986e6e3b5f732dfbd9f40b059a91218d..74fadd77d054f4403d10fc74b7412cbad51142ac 100644 --- a/es2panda/test/compiler/ts/functionWithPattern7-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern7-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,549 +25,475 @@ "expression": false, "params": [ { - "type": "AssignmentPattern", - "left": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": true, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "value": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "kind": "init", + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 20 - } + "value": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 16 }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": true, - "computed": false, - "key": { + "end": { + "line": 17, + "column": 17 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "name": "t", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "value": { + "type": "AssignmentPattern", + "left": { "type": "Identifier", "name": "t", "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "t", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - "right": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, + "right": { + "type": "StringLiteral", + "value": "foo", "loc": { "start": { - "line": 1, - "column": 24 + "line": 17, + "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, - "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 33 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 22 }, - "end": { - "line": 1, - "column": 35 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 33 + } } } - }, - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "t", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 41 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 1, - "column": 43 - }, - "end": { - "line": 1, - "column": 44 - } - } - }, - "kind": "init", + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + "right": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "t", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, + "column": 41 + } + } + }, + "value": { + "type": "NumberLiteral", + "value": 3, + "loc": { + "start": { + "line": 17, + "column": 43 + }, + "end": { + "line": 17, "column": 44 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 38 }, - "end": { - "line": 1, - "column": 46 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 40 + }, + "end": { + "line": 17, + "column": 44 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 22 + "line": 17, + "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, - "kind": "init", "loc": { "start": { - "line": 1, - "column": 19 + "line": 17, + "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "d", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 48 - }, - "end": { - "line": 1, - "column": 49 - } - } + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 19 }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "e", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 53 - } - } - }, - "right": { - "type": "ObjectExpression", - "properties": [], - "loc": { - "start": { - "line": 1, - "column": 56 - }, - "end": { - "line": 1, - "column": 58 - } - } - }, + "end": { + "line": 17, + "column": 46 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "d", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 48 + }, + "end": { + "line": 17, + "column": 49 + } + } + }, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "e", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, - "column": 58 + "line": 17, + "column": 53 } } }, - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "f", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 60 - }, - "end": { - "line": 1, - "column": 61 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 6, - "loc": { - "start": { - "line": 1, - "column": 64 - }, - "end": { - "line": 1, - "column": 65 - } - } - }, + "right": { + "type": "ObjectExpression", + "properties": [], "loc": { "start": { - "line": 1, - "column": 60 + "line": 17, + "column": 56 }, "end": { - "line": 1, - "column": 65 + "line": 17, + "column": 58 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 51 }, - "end": { - "line": 1, - "column": 66 + "loc": { + "start": { + "line": 17, + "column": 52 + }, + "end": { + "line": 17, + "column": 58 + } } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 3, + }, + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "f", + "decorators": [], "loc": { "start": { - "line": 1, - "column": 70 + "line": 17, + "column": 60 }, "end": { - "line": 1, - "column": 71 + "line": 17, + "column": 61 } } }, - { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 74 - }, - "end": { - "line": 1, - "column": 79 - } - } - }, - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 81 - }, - "end": { - "line": 1, - "column": 86 - } - } - } - ], + "right": { + "type": "NumberLiteral", + "value": 6, "loc": { "start": { - "line": 1, - "column": 73 + "line": 17, + "column": 64 }, "end": { - "line": 1, - "column": 87 + "line": 17, + "column": 65 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 69 }, - "end": { - "line": 1, - "column": 88 + "loc": { + "start": { + "line": 17, + "column": 60 + }, + "end": { + "line": 17, + "column": 65 + } } } - }, + ], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, - "column": 88 + "line": 17, + "column": 66 } } }, - "kind": "init", - "loc": { - "start": { - "line": 1, - "column": 48 - }, - "end": { - "line": 1, - "column": 88 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 90 - } - } - }, - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 95 + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "NumberLiteral", + "value": 3, + "loc": { + "start": { + "line": 17, + "column": 70 + }, + "end": { + "line": 17, + "column": 71 + } + } }, - "end": { - "line": 1, - "column": 96 + { + "type": "ArrayExpression", + "elements": [ + { + "type": "StringLiteral", + "value": "foo", + "loc": { + "start": { + "line": 17, + "column": 74 + }, + "end": { + "line": 17, + "column": 79 + } + } + }, + { + "type": "StringLiteral", + "value": "bar", + "loc": { + "start": { + "line": 17, + "column": 81 + }, + "end": { + "line": 17, + "column": 86 + } + } + } + ], + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 87 + } + } } - } - }, - "value": { - "type": "BooleanLiteral", - "value": true, + ], "loc": { "start": { - "line": 1, - "column": 98 + "line": 17, + "column": 69 }, "end": { - "line": 1, - "column": 102 + "line": 17, + "column": 88 } } }, - "kind": "init", "loc": { "start": { - "line": 1, - "column": 95 + "line": 17, + "column": 51 }, "end": { - "line": 1, - "column": 102 + "line": 17, + "column": 88 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 93 }, - "end": { - "line": 1, - "column": 104 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 48 + }, + "end": { + "line": 17, + "column": 88 + } } } - }, + ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, - "column": 104 + "line": 17, + "column": 90 } } } @@ -577,33 +503,33 @@ "statements": [], "loc": { "start": { - "line": 1, - "column": 106 + "line": 17, + "column": 92 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -618,11 +544,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -642,11 +568,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -656,11 +582,11 @@ "value": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -668,11 +594,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -688,38 +614,85 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 18 } } }, "value": { "type": "ObjectExpression", - "properties": [], + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "t", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 22 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + "value": { + "type": "NumberLiteral", + "value": 7, + "loc": { + "start": { + "line": 21, + "column": 25 + }, + "end": { + "line": 21, + "column": 26 + } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 21, + "column": 22 + }, + "end": { + "line": 21, + "column": 26 + } + } + } + ], "loc": { "start": { - "line": 5, + "line": 21, "column": 20 }, "end": { - "line": 5, - "column": 22 + "line": 21, + "column": 28 } } }, "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, - "column": 22 + "line": 21, + "column": 28 } } }, @@ -734,12 +707,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 24 + "line": 21, + "column": 30 }, "end": { - "line": 5, - "column": 25 + "line": 21, + "column": 31 } } }, @@ -751,63 +724,62 @@ "value": 2, "loc": { "start": { - "line": 5, - "column": 28 + "line": 21, + "column": 34 }, "end": { - "line": 5, - "column": 29 + "line": 21, + "column": 35 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 5, - "column": 31 + "line": 21, + "column": 37 }, "end": { - "line": 5, - "column": 33 + "line": 21, + "column": 39 } } } ], "loc": { "start": { - "line": 5, - "column": 27 + "line": 21, + "column": 33 }, "end": { - "line": 5, - "column": 34 + "line": 21, + "column": 40 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 24 + "line": 21, + "column": 30 }, "end": { - "line": 5, - "column": 34 + "line": 21, + "column": 40 } } } ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, - "column": 36 + "line": 21, + "column": 42 } } } @@ -815,23 +787,23 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, - "column": 37 + "line": 21, + "column": 43 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, - "column": 38 + "line": 21, + "column": 44 } } } @@ -842,9 +814,9 @@ "column": 1 }, "end": { - "line": 5, - "column": 38 + "line": 22, + "column": 1 } } } -TypeError: Type 'bigint' is not assignable to type 'string[]'. [functionWithPattern7.ts:5:31] +TypeError: Type 'bigint' is not assignable to type 'string[]'. [functionWithPattern7.ts:21:37] diff --git a/es2panda/test/compiler/ts/functionWithPattern7.ts b/es2panda/test/compiler/ts/functionWithPattern7.ts index 3c685d35349eeb1793232a16805e29e1827d7625..4e648587ec1e3a8e58f5fb6cba04c7acd480ece0 100644 --- a/es2panda/test/compiler/ts/functionWithPattern7.ts +++ b/es2panda/test/compiler/ts/functionWithPattern7.ts @@ -14,8 +14,8 @@ */ -function foo({ a, b: { t = "foo" } = { t: 3 }, d: [e = {}, f = 6] = [3, ["foo", "bar"]] } = { a: true }) { +function foo({ a, b: { t = "foo" } = { t: 3 }, d: [e = {}, f = 6] = [3, ["foo", "bar"]] }) { } -foo({ a: false, b: {}, d: [2, 5n] }); \ No newline at end of file +foo({ a: false, b: { t: 7 }, d: [2, 5n] }); diff --git a/es2panda/test/compiler/ts/functionWithPattern8-expected.txt b/es2panda/test/compiler/ts/functionWithPattern8-expected.txt index a49564e30312f6c17e2eed8d0dd74f0aa7c1dd2f..f9bda4c6b51131e374892dbdd5e555e5adfa3dab 100644 --- a/es2panda/test/compiler/ts/functionWithPattern8-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern8-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,596 +25,523 @@ "expression": false, "params": [ { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, + "column": 16 + } + } + }, + "right": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, "column": 20 } } }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 25 } - }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 6, - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, + } + }, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "c", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, - "column": 33 + "line": 17, + "column": 29 } } }, - { - "type": "Identifier", - "name": "d", - "decorators": [], + "right": { + "type": "NumberLiteral", + "value": 6, "loc": { "start": { - "line": 1, - "column": 35 + "line": 17, + "column": 32 }, "end": { - "line": 1, - "column": 36 + "line": 17, + "column": 33 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 27 }, - "end": { - "line": 1, - "column": 37 + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + { + "type": "Identifier", + "name": "d", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 35 + }, + "end": { + "line": 17, + "column": 36 + } } } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 1, - "column": 41 - }, - "end": { - "line": 1, - "column": 45 - } + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "BooleanLiteral", + "value": true, + "loc": { + "start": { + "line": 17, + "column": 41 + }, + "end": { + "line": 17, + "column": 45 } - }, - { - "type": "ArrayExpression", - "elements": [ - { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 48 - }, - "end": { - "line": 1, - "column": 50 - } - } - }, - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 57 - } + } + }, + { + "type": "ArrayExpression", + "elements": [ + { + "type": "BigIntLiteral", + "value": "5n", + "loc": { + "start": { + "line": 17, + "column": 48 + }, + "end": { + "line": 17, + "column": 50 } } - ], - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 58 + }, + { + "type": "StringLiteral", + "value": "foo", + "loc": { + "start": { + "line": 17, + "column": 52 + }, + "end": { + "line": 17, + "column": 57 + } } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 59 + ], + "loc": { + "start": { + "line": 17, + "column": 47 + }, + "end": { + "line": 17, + "column": 58 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 27 + "line": 17, + "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, - "kind": "init", "loc": { "start": { - "line": 1, - "column": 24 + "line": 17, + "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, - { - "type": "Property", - "method": false, - "shorthand": true, - "computed": false, - "key": { + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 59 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "name": "t", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 61 + }, + "end": { + "line": 17, + "column": 62 + } + } + }, + "value": { + "type": "AssignmentPattern", + "left": { "type": "Identifier", "name": "t", "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "t", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 61 - }, - "end": { - "line": 1, - "column": 62 - } - } - }, - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 67 - }, - "end": { - "line": 1, - "column": 68 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 1, - "column": 70 - }, - "end": { - "line": 1, - "column": 71 - } - } - }, - "kind": "init", + "right": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, - "column": 71 + "line": 17, + "column": 68 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 73 - }, - "end": { - "line": 1, - "column": 74 - } + "value": { + "type": "NumberLiteral", + "value": 3, + "loc": { + "start": { + "line": 17, + "column": 70 + }, + "end": { + "line": 17, + "column": 71 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 67 }, - "value": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 78 - }, - "end": { - "line": 1, - "column": 79 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 1, - "column": 81 - }, - "end": { - "line": 1, - "column": 82 - } - } - }, - "kind": "init", + "end": { + "line": 17, + "column": 71 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 74 + } + } + }, + "value": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 78 }, "end": { - "line": 1, - "column": 82 + "line": 17, + "column": 79 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 84 - }, - "end": { - "line": 1, - "column": 85 - } - } - }, - "value": { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 87 - }, - "end": { - "line": 1, - "column": 89 - } + "value": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 17, + "column": 81 + }, + "end": { + "line": 17, + "column": 82 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 78 }, - "kind": "init", + "end": { + "line": 17, + "column": 82 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 84 }, "end": { - "line": 1, + "line": 17, + "column": 85 + } + } + }, + "value": { + "type": "BigIntLiteral", + "value": "5n", + "loc": { + "start": { + "line": 17, + "column": 87 + }, + "end": { + "line": 17, "column": 89 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 76 }, - "end": { - "line": 1, - "column": 91 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 84 + }, + "end": { + "line": 17, + "column": 89 + } } } - }, - "kind": "init", + ], "loc": { "start": { - "line": 1, - "column": 73 + "line": 17, + "column": 76 }, "end": { - "line": 1, + "line": 17, "column": 91 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 65 }, - "end": { - "line": 1, - "column": 93 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 91 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 61 + "line": 17, + "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 93 } } }, - "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 93 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 95 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 96 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 100 - }, - "end": { - "line": 1, - "column": 105 - } - } - }, - { - "type": "ObjectExpression", - "properties": [], - "loc": { - "start": { - "line": 1, - "column": 107 }, - "end": { - "line": 1, - "column": 109 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 61 + }, + "end": { + "line": 17, + "column": 93 + } } } - }, - { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 111 - }, - "end": { - "line": 1, - "column": 113 - } + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 95 } } - ], - "loc": { - "start": { - "line": 1, - "column": 99 - }, - "end": { - "line": 1, - "column": 114 - } } - }, + ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, - "column": 114 + "line": 17, + "column": 96 } } }, @@ -632,12 +559,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 118 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 119 + "line": 17, + "column": 101 } } }, @@ -657,12 +584,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 123 + "line": 17, + "column": 105 }, "end": { - "line": 1, - "column": 124 + "line": 17, + "column": 106 } } }, @@ -674,12 +601,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 126 + "line": 17, + "column": 108 }, "end": { - "line": 1, - "column": 127 + "line": 17, + "column": 109 } } }, @@ -688,35 +615,35 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 130 + "line": 17, + "column": 112 }, "end": { - "line": 1, - "column": 131 + "line": 17, + "column": 113 } } }, "loc": { "start": { - "line": 1, - "column": 126 + "line": 17, + "column": 108 }, "end": { - "line": 1, - "column": 131 + "line": 17, + "column": 113 } } } ], "loc": { "start": { - "line": 1, - "column": 122 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 132 + "line": 17, + "column": 114 } } }, @@ -728,47 +655,47 @@ "value": true, "loc": { "start": { - "line": 1, - "column": 136 + "line": 17, + "column": 118 }, "end": { - "line": 1, - "column": 140 + "line": 17, + "column": 122 } } } ], "loc": { "start": { - "line": 1, - "column": 135 + "line": 17, + "column": 117 }, "end": { - "line": 1, - "column": 141 + "line": 17, + "column": 123 } } }, "loc": { "start": { - "line": 1, - "column": 122 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 141 + "line": 17, + "column": 123 } } } ], "loc": { "start": { - "line": 1, - "column": 121 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 142 + "line": 17, + "column": 124 } } }, @@ -783,85 +710,85 @@ "value": 2, "loc": { "start": { - "line": 1, - "column": 147 + "line": 17, + "column": 129 }, "end": { - "line": 1, - "column": 148 + "line": 17, + "column": 130 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, - "column": 150 + "line": 17, + "column": 132 }, "end": { - "line": 1, - "column": 155 + "line": 17, + "column": 137 } } } ], "loc": { "start": { - "line": 1, - "column": 146 + "line": 17, + "column": 128 }, "end": { - "line": 1, - "column": 156 + "line": 17, + "column": 138 } } } ], "loc": { "start": { - "line": 1, - "column": 145 + "line": 17, + "column": 127 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } }, "loc": { "start": { - "line": 1, - "column": 121 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } }, "kind": "init", "loc": { "start": { - "line": 1, - "column": 118 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } } ], "loc": { "start": { - "line": 1, - "column": 116 + "line": 17, + "column": 98 }, "end": { - "line": 1, - "column": 159 + "line": 17, + "column": 141 } } } @@ -871,33 +798,33 @@ "statements": [], "loc": { "start": { - "line": 1, - "column": 161 + "line": 17, + "column": 143 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -913,11 +840,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -927,33 +854,33 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -965,9 +892,9 @@ "column": 1 }, "end": { - "line": 5, - "column": 9 + "line": 22, + "column": 1 } } } -TypeError: operator + cannot be applied to types ([a, { b: [c, d], t }]?: [string, { b?: [boolean, (bigint | string)[]]; t?: { a: number; b: { a: number; b: bigint; }; }; }, bigint], { r: [[r, z]] }: { r?: [[number, string]]; }) => void and 5 [functionWithPattern8.ts:5:1] +TypeError: operator + cannot be applied to types ([a, { b: [c, d], t }]: [number, { b?: [boolean, (bigint | string)[]]; t?: { a: number; b: { a: number; b: bigint; }; }; }], { r: [[r, z]] }: { r?: [[number, string]]; }) => void and number [functionWithPattern8.ts:21:1] diff --git a/es2panda/test/compiler/ts/functionWithPattern8.ts b/es2panda/test/compiler/ts/functionWithPattern8.ts index ddf96eb4d653682003e4edfcb857843e2b13e65d..2663216264a2ddfe41afc0338ef20e93ec4381e2 100644 --- a/es2panda/test/compiler/ts/functionWithPattern8.ts +++ b/es2panda/test/compiler/ts/functionWithPattern8.ts @@ -14,8 +14,8 @@ */ -function foo([a = 2, { b: [c = 6, d] = [true, [5n, "foo"]], t = { a: 3, b: { a: 2, b: 5n } } }] = ["foo", {}, 4n], { r: [[r, z = 5] = [true]] = [[2, "foo"]] }) { +function foo([a = 2, { b: [c = 6, d] = [true, [5n, "foo"]], t = { a: 3, b: { a: 2, b: 5n } } }], { r: [[r, z = 5] = [true]] = [[2, "foo"]] }) { } -foo + 5; \ No newline at end of file +foo + 5; diff --git a/es2panda/test/compiler/ts/functionWithPattern9-expected.txt b/es2panda/test/compiler/ts/functionWithPattern9-expected.txt index 47affdb43cc36899b29601f8fb2da976d57b942d..1634ebf0b4bdbfc8855b06be67c1e526a37fcdc4 100644 --- a/es2panda/test/compiler/ts/functionWithPattern9-expected.txt +++ b/es2panda/test/compiler/ts/functionWithPattern9-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -25,596 +25,523 @@ "expression": false, "params": [ { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, + "column": 16 + } + } + }, + "right": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, "column": 20 } } }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 25 } - }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 6, - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, + } + }, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "c", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, - "column": 33 + "line": 17, + "column": 29 } } }, - { - "type": "Identifier", - "name": "d", - "decorators": [], + "right": { + "type": "NumberLiteral", + "value": 6, "loc": { "start": { - "line": 1, - "column": 35 + "line": 17, + "column": 32 }, "end": { - "line": 1, - "column": 36 + "line": 17, + "column": 33 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 27 }, - "end": { - "line": 1, - "column": 37 + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + { + "type": "Identifier", + "name": "d", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 35 + }, + "end": { + "line": 17, + "column": 36 + } } } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 1, - "column": 41 - }, - "end": { - "line": 1, - "column": 45 - } + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "BooleanLiteral", + "value": true, + "loc": { + "start": { + "line": 17, + "column": 41 + }, + "end": { + "line": 17, + "column": 45 } - }, - { - "type": "ArrayExpression", - "elements": [ - { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 48 - }, - "end": { - "line": 1, - "column": 50 - } - } - }, - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 57 - } + } + }, + { + "type": "ArrayExpression", + "elements": [ + { + "type": "BigIntLiteral", + "value": "5n", + "loc": { + "start": { + "line": 17, + "column": 48 + }, + "end": { + "line": 17, + "column": 50 } } - ], - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 58 + }, + { + "type": "StringLiteral", + "value": "foo", + "loc": { + "start": { + "line": 17, + "column": 52 + }, + "end": { + "line": 17, + "column": 57 + } } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 40 - }, - "end": { - "line": 1, - "column": 59 + ], + "loc": { + "start": { + "line": 17, + "column": 47 + }, + "end": { + "line": 17, + "column": 58 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 27 + "line": 17, + "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, - "kind": "init", "loc": { "start": { - "line": 1, - "column": 24 + "line": 17, + "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, - { - "type": "Property", - "method": false, - "shorthand": true, - "computed": false, - "key": { + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 59 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "name": "t", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 61 + }, + "end": { + "line": 17, + "column": 62 + } + } + }, + "value": { + "type": "AssignmentPattern", + "left": { "type": "Identifier", "name": "t", "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "t", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 61 - }, - "end": { - "line": 1, - "column": 62 - } - } - }, - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 67 - }, - "end": { - "line": 1, - "column": 68 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 1, - "column": 70 - }, - "end": { - "line": 1, - "column": 71 - } - } - }, - "kind": "init", + "right": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, - "column": 71 + "line": 17, + "column": 68 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 73 - }, - "end": { - "line": 1, - "column": 74 - } + "value": { + "type": "NumberLiteral", + "value": 3, + "loc": { + "start": { + "line": 17, + "column": 70 + }, + "end": { + "line": 17, + "column": 71 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 67 }, - "value": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 78 - }, - "end": { - "line": 1, - "column": 79 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 1, - "column": 81 - }, - "end": { - "line": 1, - "column": 82 - } - } - }, - "kind": "init", + "end": { + "line": 17, + "column": 71 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 74 + } + } + }, + "value": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 78 }, "end": { - "line": 1, - "column": 82 + "line": 17, + "column": 79 } } }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 84 - }, - "end": { - "line": 1, - "column": 85 - } - } - }, - "value": { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 87 - }, - "end": { - "line": 1, - "column": 89 - } + "value": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 17, + "column": 81 + }, + "end": { + "line": 17, + "column": 82 } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 78 }, - "kind": "init", + "end": { + "line": 17, + "column": 82 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 84 }, "end": { - "line": 1, + "line": 17, + "column": 85 + } + } + }, + "value": { + "type": "BigIntLiteral", + "value": "5n", + "loc": { + "start": { + "line": 17, + "column": 87 + }, + "end": { + "line": 17, "column": 89 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 76 }, - "end": { - "line": 1, - "column": 91 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 84 + }, + "end": { + "line": 17, + "column": 89 + } } } - }, - "kind": "init", + ], "loc": { "start": { - "line": 1, - "column": 73 + "line": 17, + "column": 76 }, "end": { - "line": 1, + "line": 17, "column": 91 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 65 }, - "end": { - "line": 1, - "column": 93 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 73 + }, + "end": { + "line": 17, + "column": 91 + } } } - }, + ], "loc": { "start": { - "line": 1, - "column": 61 + "line": 17, + "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 93 } } }, - "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 93 } } - } - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 95 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 96 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 100 - }, - "end": { - "line": 1, - "column": 105 - } - } - }, - { - "type": "ObjectExpression", - "properties": [], - "loc": { - "start": { - "line": 1, - "column": 107 }, - "end": { - "line": 1, - "column": 109 + "kind": "init", + "loc": { + "start": { + "line": 17, + "column": 61 + }, + "end": { + "line": 17, + "column": 93 + } } } - }, - { - "type": "BigIntLiteral", - "value": "", - "bigint": "", - "loc": { - "start": { - "line": 1, - "column": 111 - }, - "end": { - "line": 1, - "column": 113 - } + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 95 } } - ], - "loc": { - "start": { - "line": 1, - "column": 99 - }, - "end": { - "line": 1, - "column": 114 - } } - }, + ], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, - "column": 114 + "line": 17, + "column": 96 } } }, @@ -632,12 +559,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 118 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 119 + "line": 17, + "column": 101 } } }, @@ -657,12 +584,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 123 + "line": 17, + "column": 105 }, "end": { - "line": 1, - "column": 124 + "line": 17, + "column": 106 } } }, @@ -674,12 +601,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 126 + "line": 17, + "column": 108 }, "end": { - "line": 1, - "column": 127 + "line": 17, + "column": 109 } } }, @@ -688,35 +615,35 @@ "value": 5, "loc": { "start": { - "line": 1, - "column": 130 + "line": 17, + "column": 112 }, "end": { - "line": 1, - "column": 131 + "line": 17, + "column": 113 } } }, "loc": { "start": { - "line": 1, - "column": 126 + "line": 17, + "column": 108 }, "end": { - "line": 1, - "column": 131 + "line": 17, + "column": 113 } } } ], "loc": { "start": { - "line": 1, - "column": 122 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 132 + "line": 17, + "column": 114 } } }, @@ -728,47 +655,47 @@ "value": true, "loc": { "start": { - "line": 1, - "column": 136 + "line": 17, + "column": 118 }, "end": { - "line": 1, - "column": 140 + "line": 17, + "column": 122 } } } ], "loc": { "start": { - "line": 1, - "column": 135 + "line": 17, + "column": 117 }, "end": { - "line": 1, - "column": 141 + "line": 17, + "column": 123 } } }, "loc": { "start": { - "line": 1, - "column": 122 + "line": 17, + "column": 104 }, "end": { - "line": 1, - "column": 141 + "line": 17, + "column": 123 } } } ], "loc": { "start": { - "line": 1, - "column": 121 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 142 + "line": 17, + "column": 124 } } }, @@ -783,85 +710,85 @@ "value": 2, "loc": { "start": { - "line": 1, - "column": 147 + "line": 17, + "column": 129 }, "end": { - "line": 1, - "column": 148 + "line": 17, + "column": 130 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, - "column": 150 + "line": 17, + "column": 132 }, "end": { - "line": 1, - "column": 155 + "line": 17, + "column": 137 } } } ], "loc": { "start": { - "line": 1, - "column": 146 + "line": 17, + "column": 128 }, "end": { - "line": 1, - "column": 156 + "line": 17, + "column": 138 } } } ], "loc": { "start": { - "line": 1, - "column": 145 + "line": 17, + "column": 127 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } }, "loc": { "start": { - "line": 1, - "column": 121 + "line": 17, + "column": 103 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } }, "kind": "init", "loc": { "start": { - "line": 1, - "column": 118 + "line": 17, + "column": 100 }, "end": { - "line": 1, - "column": 157 + "line": 17, + "column": 139 } } } ], "loc": { "start": { - "line": 1, - "column": 116 + "line": 17, + "column": 98 }, "end": { - "line": 1, - "column": 159 + "line": 17, + "column": 141 } } } @@ -871,33 +798,33 @@ "statements": [], "loc": { "start": { - "line": 1, - "column": 161 + "line": 17, + "column": 143 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -912,11 +839,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -926,16 +853,16 @@ "type": "ArrayExpression", "elements": [ { - "type": "StringLiteral", - "value": "", + "type": "NumberLiteral", + "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, - "column": 11 + "line": 21, + "column": 7 } } }, @@ -953,12 +880,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 15 + "line": 21, + "column": 11 }, "end": { - "line": 5, - "column": 16 + "line": 21, + "column": 12 } } }, @@ -967,63 +894,62 @@ "elements": [], "loc": { "start": { - "line": 5, - "column": 18 + "line": 21, + "column": 14 }, "end": { - "line": 5, - "column": 20 + "line": 21, + "column": 16 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 15 + "line": 21, + "column": 11 }, "end": { - "line": 5, - "column": 20 + "line": 21, + "column": 16 } } } ], "loc": { "start": { - "line": 5, - "column": 13 + "line": 21, + "column": 9 }, "end": { - "line": 5, - "column": 22 + "line": 21, + "column": 18 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 5, - "column": 24 + "line": 21, + "column": 20 }, "end": { - "line": 5, - "column": 26 + "line": 21, + "column": 22 } } } ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, - "column": 27 + "line": 21, + "column": 23 } } }, @@ -1032,12 +958,12 @@ "properties": [], "loc": { "start": { - "line": 5, - "column": 29 + "line": 21, + "column": 25 }, "end": { - "line": 5, - "column": 31 + "line": 21, + "column": 27 } } } @@ -1045,23 +971,23 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, - "column": 32 + "line": 21, + "column": 28 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, - "column": 33 + "line": 21, + "column": 29 } } } @@ -1072,9 +998,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 1 } } } -TypeError: Type '[]' is not assignable to type '[boolean, (bigint | string)[]]'. [functionWithPattern9.ts:5:15] +TypeError: Type '[]' is not assignable to type '[boolean, (bigint | string)[]]'. [functionWithPattern9.ts:21:11] diff --git a/es2panda/test/compiler/ts/functionWithPattern9.ts b/es2panda/test/compiler/ts/functionWithPattern9.ts index 0334dba413c8543073c72316d93e20f4772d8c0d..270705ec0d77afd9c0be844f5f7ee52467feddda 100644 --- a/es2panda/test/compiler/ts/functionWithPattern9.ts +++ b/es2panda/test/compiler/ts/functionWithPattern9.ts @@ -14,8 +14,8 @@ */ -function foo([a = 2, { b: [c = 6, d] = [true, [5n, "foo"]], t = { a: 3, b: { a: 2, b: 5n } } }] = ["foo", {}, 4n], { r: [[r, z = 5] = [true]] = [[2, "foo"]] }) { +function foo([a = 2, { b: [c = 6, d] = [true, [5n, "foo"]], t = { a: 3, b: { a: 2, b: 5n } } }], { r: [[r, z = 5] = [true]] = [[2, "foo"]] }) { } -foo(["foo", { b: [] }, 5n], {}); +foo([1, { b: [] }, 5n], {}); diff --git a/es2panda/test/compiler/ts/function_declaration_1-expected.txt b/es2panda/test/compiler/ts/function_declaration_1-expected.txt index c36842be5f8f683c5e988b26ea391986a00caf7e..93fc4b996e11a093f65641bfd938aadeecdfc344 100644 --- a/es2panda/test/compiler/ts/function_declaration_1-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_1-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -42,33 +42,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -80,9 +80,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: A function whose declared type is neither 'void' nor 'any' must return a value. [function_declaration_1.ts:1:17] +TypeError: A function whose declared type is neither 'void' nor 'any' must return a value. [function_declaration_1.ts:17:17] diff --git a/es2panda/test/compiler/ts/function_declaration_10-expected.txt b/es2panda/test/compiler/ts/function_declaration_10-expected.txt index 72d7060f9eca4072e3a405b45811397613261cd3..1f7aeb199286b7aa8111714fdba6e47272d3f938 100644 --- a/es2panda/test/compiler/ts/function_declaration_10-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_10-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -47,22 +47,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -70,33 +70,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -108,9 +108,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'boolean'. [function_declaration_10.ts:2:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [function_declaration_10.ts:18:1] diff --git a/es2panda/test/compiler/ts/function_declaration_11-expected.txt b/es2panda/test/compiler/ts/function_declaration_11-expected.txt index e9034d7fda057fb58d1c14140a5786666f2b9915..010884630d12cc34fc2a206e386eadbb5d0bc20a 100644 --- a/es2panda/test/compiler/ts/function_declaration_11-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_11-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSNeverKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -42,33 +42,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -80,9 +80,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: A function returning 'never' cannot have a reachable end point. [function_declaration_11.ts:1:17] +TypeError: A function returning 'never' cannot have a reachable end point. [function_declaration_11.ts:17:17] diff --git a/es2panda/test/compiler/ts/function_declaration_2-expected.txt b/es2panda/test/compiler/ts/function_declaration_2-expected.txt index 65674f08ba9f4ebab1d0b114b6217dda48530354..a7d7bab5fab735dae137d509ea96575a8e4446a9 100644 --- a/es2panda/test/compiler/ts/function_declaration_2-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_2-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -47,22 +47,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -70,33 +70,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -108,9 +108,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'string'. [function_declaration_2.ts:2:1] +TypeError: Type 'number' is not assignable to type 'string'. [function_declaration_2.ts:18:1] diff --git a/es2panda/test/compiler/ts/function_declaration_3-expected.txt b/es2panda/test/compiler/ts/function_declaration_3-expected.txt index cd2f3a3ad686370ed3a25b3016688e9fa1107b63..ad762d6afd0184396406ed14f83a1b420eaf97b4 100644 --- a/es2panda/test/compiler/ts/function_declaration_3-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_3-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -47,22 +47,22 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -70,33 +70,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -108,9 +108,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'false' is not assignable to type 'string'. [function_declaration_3.ts:2:1] +TypeError: Type 'boolean' is not assignable to type 'string'. [function_declaration_3.ts:18:1] diff --git a/es2panda/test/compiler/ts/function_declaration_4-expected.txt b/es2panda/test/compiler/ts/function_declaration_4-expected.txt index 642fc3a063f19eafd867832d9feac7220df60801..d65fd0cb713cf2270bd94f9a37ab2797fbd998a1 100644 --- a/es2panda/test/compiler/ts/function_declaration_4-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_4-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -42,33 +42,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -80,9 +80,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: A function whose declared type is neither 'void' nor 'any' must return a value. [function_declaration_4.ts:1:17] +TypeError: A function whose declared type is neither 'void' nor 'any' must return a value. [function_declaration_4.ts:17:17] diff --git a/es2panda/test/compiler/ts/function_declaration_5-expected.txt b/es2panda/test/compiler/ts/function_declaration_5-expected.txt index b8b73b01c38b575b299a7a374991ad4c5886a1dd..878ae000adb4b47d883262e2ac15791c50e2716b 100644 --- a/es2panda/test/compiler/ts/function_declaration_5-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_5-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -47,22 +47,22 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -70,33 +70,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -108,9 +108,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'false' is not assignable to type 'number'. [function_declaration_5.ts:2:1] +TypeError: Type 'boolean' is not assignable to type 'number'. [function_declaration_5.ts:18:1] diff --git a/es2panda/test/compiler/ts/function_declaration_6-expected.txt b/es2panda/test/compiler/ts/function_declaration_6-expected.txt index c3021b79480b87363af38ffd743f03d7adef924c..3aaf4b9d8388875a512d3a1bac569295ba825cfa 100644 --- a/es2panda/test/compiler/ts/function_declaration_6-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_6-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -42,33 +42,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -80,9 +80,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: A function whose declared type is neither 'void' nor 'any' must return a value. [function_declaration_6.ts:1:17] +TypeError: A function whose declared type is neither 'void' nor 'any' must return a value. [function_declaration_6.ts:17:17] diff --git a/es2panda/test/compiler/ts/function_declaration_7-expected.txt b/es2panda/test/compiler/ts/function_declaration_7-expected.txt index e470c9e02873ab13304ad711cd7a08845e7caf2f..f8d6a046106864a6b140646112b1c6f97ce174ef 100644 --- a/es2panda/test/compiler/ts/function_declaration_7-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_7-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -47,22 +47,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -70,33 +70,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -108,9 +108,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [function_declaration_7.ts:2:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [function_declaration_7.ts:18:1] diff --git a/es2panda/test/compiler/ts/function_declaration_8-expected.txt b/es2panda/test/compiler/ts/function_declaration_8-expected.txt index 88e30610083583a0922c7e52b2bfe9d677aa7fe4..3f11266154e98b5e0967f886be480c6df69b164e 100644 --- a/es2panda/test/compiler/ts/function_declaration_8-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_8-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -47,22 +47,22 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -70,33 +70,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -108,9 +108,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'false' is not assignable to type 'bigint'. [function_declaration_8.ts:2:1] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [function_declaration_8.ts:18:1] diff --git a/es2panda/test/compiler/ts/function_declaration_9-expected.txt b/es2panda/test/compiler/ts/function_declaration_9-expected.txt index 1d502b427df2f8825f910731e63592918fc919bc..59bb34c8257185fcf54789ffabdc0bba952323ff 100644 --- a/es2panda/test/compiler/ts/function_declaration_9-expected.txt +++ b/es2panda/test/compiler/ts/function_declaration_9-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -28,11 +28,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -42,33 +42,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -80,9 +80,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: A function whose declared type is neither 'void' nor 'any' must return a value. [function_declaration_9.ts:1:17] +TypeError: A function whose declared type is neither 'void' nor 'any' must return a value. [function_declaration_9.ts:17:17] diff --git a/es2panda/test/compiler/ts/generic_interface-expected.txt b/es2panda/test/compiler/ts/generic_interface-expected.txt deleted file mode 100644 index 98b63cb10ac58d4cbb808dac3d2dafd3b3e04ed2..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_interface-expected.txt +++ /dev/null @@ -1,3304 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 3, - "column": 2 - } - } - }, - "id": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "extends": [], - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "default": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 24 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 3, - "column": 2 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var1", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var1", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 5, - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var2", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 21 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var2", - "decorators": [], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "right": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 6 - } - } - }, - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "Z", - "decorators": [], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "W", - "decorators": [], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 14 - } - } - } - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - "id": { - "type": "Identifier", - "name": "U", - "decorators": [], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "extends": [ - { - "type": "TSInterfaceHeritage", - "expression": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 11, - "column": 27 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 28 - } - } - } - ], - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "Z", - "decorators": [], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "W", - "decorators": [], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 18 - } - } - } - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var3", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "U", - "decorators": [], - "loc": { - "start": { - "line": 15, - "column": 11 - }, - "end": { - "line": 15, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 15, - "column": 13 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 15, - "column": 22 - }, - "end": { - "line": 15, - "column": 28 - } - } - } - ], - "loc": { - "start": { - "line": 15, - "column": 11 - }, - "end": { - "line": 15, - "column": 29 - } - } - }, - "loc": { - "start": { - "line": 15, - "column": 11 - }, - "end": { - "line": 15, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var3", - "decorators": [], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 7 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 12, - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var3", - "decorators": [], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 7 - } - } - }, - "right": { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var3", - "decorators": [], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 7 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 32, - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 13 - } - } - }, - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 21, - "column": 5 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 21, - "column": 8 - }, - "end": { - "line": 21, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 21, - "column": 8 - }, - "end": { - "line": 21, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 21, - "column": 8 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "loc": { - "start": { - "line": 21, - "column": 5 - }, - "end": { - "line": 21, - "column": 12 - } - } - } - ], - "loc": { - "start": { - "line": 20, - "column": 25 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "id": { - "type": "Identifier", - "name": "V", - "decorators": [], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 12 - } - } - }, - "extends": [], - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "default": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 24 - } - } - } - ], - "loc": { - "start": { - "line": 20, - "column": 12 - }, - "end": { - "line": 20, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 20, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 16 - } - } - }, - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 26, - "column": 2 - } - } - } - ], - "loc": { - "start": { - "line": 24, - "column": 13 - }, - "end": { - "line": 26, - "column": 2 - } - } - }, - "id": { - "type": "Identifier", - "name": "V", - "decorators": [], - "loc": { - "start": { - "line": 24, - "column": 11 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "extends": [], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 26, - "column": 2 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var4", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "V", - "decorators": [], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 28, - "column": 5 - }, - "end": { - "line": 28, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 28, - "column": 5 - }, - "end": { - "line": 28, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 28, - "column": 1 - }, - "end": { - "line": 28, - "column": 13 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var4", - "decorators": [], - "loc": { - "start": { - "line": 29, - "column": 1 - }, - "end": { - "line": 29, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 29, - "column": 6 - }, - "end": { - "line": 29, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 29, - "column": 1 - }, - "end": { - "line": 29, - "column": 7 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 29, - "column": 11 - }, - "end": { - "line": 29, - "column": 12 - } - } - }, - { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 29, - "column": 14 - }, - "end": { - "line": 29, - "column": 15 - } - } - }, - { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 29, - "column": 17 - }, - "end": { - "line": 29, - "column": 18 - } - } - } - ], - "loc": { - "start": { - "line": 29, - "column": 10 - }, - "end": { - "line": 29, - "column": 19 - } - } - }, - "loc": { - "start": { - "line": 29, - "column": 1 - }, - "end": { - "line": 29, - "column": 19 - } - } - }, - "loc": { - "start": { - "line": 29, - "column": 1 - }, - "end": { - "line": 29, - "column": 20 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var4", - "decorators": [], - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 30, - "column": 6 - }, - "end": { - "line": 30, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 7 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 30, - "column": 11 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 30, - "column": 18 - }, - "end": { - "line": 30, - "column": 23 - } - } - } - ], - "loc": { - "start": { - "line": 30, - "column": 10 - }, - "end": { - "line": 30, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 33, - "column": 5 - }, - "end": { - "line": 33, - "column": 6 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "E", - "decorators": [], - "loc": { - "start": { - "line": 33, - "column": 8 - }, - "end": { - "line": 33, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 33, - "column": 8 - }, - "end": { - "line": 33, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 33, - "column": 5 - }, - "end": { - "line": 33, - "column": 10 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 34, - "column": 5 - }, - "end": { - "line": 34, - "column": 6 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "F", - "decorators": [], - "loc": { - "start": { - "line": 34, - "column": 8 - }, - "end": { - "line": 34, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 34, - "column": 8 - }, - "end": { - "line": 34, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 34, - "column": 5 - }, - "end": { - "line": 34, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 32, - "column": 46 - }, - "end": { - "line": 35, - "column": 2 - } - } - }, - "id": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 32, - "column": 11 - }, - "end": { - "line": 32, - "column": 12 - } - } - }, - "extends": [], - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "E", - "decorators": [], - "loc": { - "start": { - "line": 32, - "column": 13 - }, - "end": { - "line": 32, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 32, - "column": 13 - }, - "end": { - "line": 32, - "column": 15 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "F", - "decorators": [], - "loc": { - "start": { - "line": 32, - "column": 16 - }, - "end": { - "line": 32, - "column": 17 - } - } - }, - "default": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 32, - "column": 22 - }, - "end": { - "line": 32, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 32, - "column": 25 - }, - "end": { - "line": 32, - "column": 31 - } - } - }, - "loc": { - "start": { - "line": 32, - "column": 22 - }, - "end": { - "line": 32, - "column": 32 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 32, - "column": 33 - }, - "end": { - "line": 32, - "column": 34 - } - } - }, - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 32, - "column": 36 - }, - "end": { - "line": 32, - "column": 42 - } - } - }, - "loc": { - "start": { - "line": 32, - "column": 33 - }, - "end": { - "line": 32, - "column": 44 - } - } - } - ], - "loc": { - "start": { - "line": 32, - "column": 20 - }, - "end": { - "line": 32, - "column": 44 - } - } - }, - "loc": { - "start": { - "line": 32, - "column": 16 - }, - "end": { - "line": 32, - "column": 45 - } - } - } - ], - "loc": { - "start": { - "line": 32, - "column": 12 - }, - "end": { - "line": 32, - "column": 45 - } - } - }, - "loc": { - "start": { - "line": 32, - "column": 1 - }, - "end": { - "line": 35, - "column": 2 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var5", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 37, - "column": 11 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 37, - "column": 14 - }, - "end": { - "line": 37, - "column": 21 - } - } - } - ], - "loc": { - "start": { - "line": 37, - "column": 13 - }, - "end": { - "line": 37, - "column": 21 - } - } - } - ], - "loc": { - "start": { - "line": 37, - "column": 11 - }, - "end": { - "line": 37, - "column": 22 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 11 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 37, - "column": 5 - }, - "end": { - "line": 37, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 37, - "column": 5 - }, - "end": { - "line": 37, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 37, - "column": 1 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var5", - "decorators": [], - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 38, - "column": 6 - }, - "end": { - "line": 38, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 7 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 38, - "column": 11 - }, - "end": { - "line": 38, - "column": 12 - } - } - } - ], - "loc": { - "start": { - "line": 38, - "column": 10 - }, - "end": { - "line": 38, - "column": 13 - } - } - }, - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 13 - } - } - }, - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "var5", - "decorators": [], - "loc": { - "start": { - "line": 39, - "column": 1 - }, - "end": { - "line": 39, - "column": 5 - } - } - }, - "property": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 39, - "column": 6 - }, - "end": { - "line": 39, - "column": 7 - } - } - }, - "computed": false, - "optional": false, - "loc": { - "start": { - "line": 39, - "column": 1 - }, - "end": { - "line": 39, - "column": 7 - } - } - }, - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 39, - "column": 12 - }, - "end": { - "line": 39, - "column": 13 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 39, - "column": 15 - }, - "end": { - "line": 39, - "column": 16 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 39, - "column": 12 - }, - "end": { - "line": 39, - "column": 16 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 39, - "column": 18 - }, - "end": { - "line": 39, - "column": 19 - } - } - }, - "value": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 39, - "column": 21 - }, - "end": { - "line": 39, - "column": 26 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 39, - "column": 18 - }, - "end": { - "line": 39, - "column": 26 - } - } - } - ], - "loc": { - "start": { - "line": 39, - "column": 10 - }, - "end": { - "line": 39, - "column": 28 - } - } - }, - "loc": { - "start": { - "line": 39, - "column": 1 - }, - "end": { - "line": 39, - "column": 28 - } - } - }, - "loc": { - "start": { - "line": 39, - "column": 1 - }, - "end": { - "line": 39, - "column": 29 - } - } - }, - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "aa", - "decorators": [], - "loc": { - "start": { - "line": 42, - "column": 5 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 42, - "column": 9 - }, - "end": { - "line": 42, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 42, - "column": 9 - }, - "end": { - "line": 42, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 42, - "column": 5 - }, - "end": { - "line": 43, - "column": 2 - } - } - } - ], - "loc": { - "start": { - "line": 41, - "column": 16 - }, - "end": { - "line": 43, - "column": 2 - } - } - }, - "id": { - "type": "Identifier", - "name": "I", - "decorators": [], - "loc": { - "start": { - "line": 41, - "column": 11 - }, - "end": { - "line": 41, - "column": 12 - } - } - }, - "extends": [], - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 41, - "column": 13 - }, - "end": { - "line": 41, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 41, - "column": 13 - }, - "end": { - "line": 41, - "column": 15 - } - } - } - ], - "loc": { - "start": { - "line": 41, - "column": 12 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - "loc": { - "start": { - "line": 41, - "column": 1 - }, - "end": { - "line": 43, - "column": 2 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "aa", - "decorators": [], - "loc": { - "start": { - "line": 46, - "column": 5 - }, - "end": { - "line": 46, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 46, - "column": 9 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "loc": { - "start": { - "line": 46, - "column": 5 - }, - "end": { - "line": 47, - "column": 2 - } - } - } - ], - "loc": { - "start": { - "line": 45, - "column": 8 - }, - "end": { - "line": 47, - "column": 2 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 45, - "column": 5 - }, - "end": { - "line": 45, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 45, - "column": 5 - }, - "end": { - "line": 45, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 45, - "column": 1 - }, - "end": { - "line": 45, - "column": 6 - } - } - }, - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [], - "loc": { - "start": { - "line": 49, - "column": 51 - }, - "end": { - "line": 50, - "column": 2 - } - } - }, - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 49, - "column": 11 - }, - "end": { - "line": 49, - "column": 12 - } - } - }, - "extends": [], - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 49, - "column": 13 - }, - "end": { - "line": 49, - "column": 14 - } - } - }, - "default": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 49, - "column": 17 - }, - "end": { - "line": 49, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 49, - "column": 13 - }, - "end": { - "line": 49, - "column": 24 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 49, - "column": 25 - }, - "end": { - "line": 49, - "column": 26 - } - } - }, - "default": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeQuery", - "exprName": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 49, - "column": 36 - }, - "end": { - "line": 49, - "column": 37 - } - } - }, - "loc": { - "start": { - "line": 49, - "column": 29 - }, - "end": { - "line": 49, - "column": 37 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "I", - "decorators": [], - "loc": { - "start": { - "line": 49, - "column": 40 - }, - "end": { - "line": 49, - "column": 41 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 49, - "column": 42 - }, - "end": { - "line": 49, - "column": 48 - } - } - } - ], - "loc": { - "start": { - "line": 49, - "column": 40 - }, - "end": { - "line": 49, - "column": 50 - } - } - }, - "loc": { - "start": { - "line": 49, - "column": 40 - }, - "end": { - "line": 49, - "column": 41 - } - } - } - ], - "loc": { - "start": { - "line": 49, - "column": 29 - }, - "end": { - "line": 49, - "column": 41 - } - } - }, - "loc": { - "start": { - "line": 49, - "column": 25 - }, - "end": { - "line": 49, - "column": 50 - } - } - } - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 50 - } - } - }, - "loc": { - "start": { - "line": 49, - "column": 1 - }, - "end": { - "line": 50, - "column": 2 - } - } - }, - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [], - "loc": { - "start": { - "line": 52, - "column": 43 - }, - "end": { - "line": 52, - "column": 46 - } - } - }, - "id": { - "type": "Identifier", - "name": "O", - "decorators": [], - "loc": { - "start": { - "line": 52, - "column": 11 - }, - "end": { - "line": 52, - "column": 12 - } - } - }, - "extends": [], - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 52, - "column": 13 - }, - "end": { - "line": 52, - "column": 14 - } - } - }, - "default": { - "type": "TSTypeQuery", - "exprName": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 52, - "column": 24 - }, - "end": { - "line": 52, - "column": 25 - } - } - }, - "loc": { - "start": { - "line": 52, - "column": 17 - }, - "end": { - "line": 52, - "column": 25 - } - } - }, - "loc": { - "start": { - "line": 52, - "column": 13 - }, - "end": { - "line": 52, - "column": 26 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 52, - "column": 27 - }, - "end": { - "line": 52, - "column": 28 - } - } - }, - "default": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "I", - "decorators": [], - "loc": { - "start": { - "line": 52, - "column": 31 - }, - "end": { - "line": 52, - "column": 32 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 52, - "column": 33 - }, - "end": { - "line": 52, - "column": 40 - } - } - } - ], - "loc": { - "start": { - "line": 52, - "column": 31 - }, - "end": { - "line": 52, - "column": 42 - } - } - }, - "loc": { - "start": { - "line": 52, - "column": 31 - }, - "end": { - "line": 52, - "column": 32 - } - } - }, - "loc": { - "start": { - "line": 52, - "column": 27 - }, - "end": { - "line": 52, - "column": 42 - } - } - } - ], - "loc": { - "start": { - "line": 52, - "column": 12 - }, - "end": { - "line": 52, - "column": 42 - } - } - }, - "loc": { - "start": { - "line": 52, - "column": 1 - }, - "end": { - "line": 52, - "column": 46 - } - } - }, - { - "type": "TSInterfaceDeclaration", - "body": { - "type": "TSInterfaceBody", - "body": [], - "loc": { - "start": { - "line": 54, - "column": 26 - }, - "end": { - "line": 54, - "column": 29 - } - } - }, - "id": { - "type": "Identifier", - "name": "L", - "decorators": [], - "loc": { - "start": { - "line": 54, - "column": 11 - }, - "end": { - "line": 54, - "column": 12 - } - } - }, - "extends": [], - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 54, - "column": 13 - }, - "end": { - "line": 54, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 54, - "column": 13 - }, - "end": { - "line": 54, - "column": 15 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 54, - "column": 16 - }, - "end": { - "line": 54, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 54, - "column": 16 - }, - "end": { - "line": 54, - "column": 18 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "O", - "decorators": [], - "loc": { - "start": { - "line": 54, - "column": 19 - }, - "end": { - "line": 54, - "column": 20 - } - } - }, - "default": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 54, - "column": 23 - }, - "end": { - "line": 54, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 54, - "column": 23 - }, - "end": { - "line": 54, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 54, - "column": 19 - }, - "end": { - "line": 54, - "column": 25 - } - } - } - ], - "loc": { - "start": { - "line": 54, - "column": 12 - }, - "end": { - "line": 54, - "column": 25 - } - } - }, - "loc": { - "start": { - "line": 54, - "column": 1 - }, - "end": { - "line": 54, - "column": 29 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 55, - "column": 1 - } - } -} diff --git a/es2panda/test/compiler/ts/generic_type_alias-expected.txt b/es2panda/test/compiler/ts/generic_type_alias-expected.txt deleted file mode 100644 index 73a1d961c83820d7e741fe4744e5d50c709f049d..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias-expected.txt +++ /dev/null @@ -1,4049 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var1", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var1", - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 5 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 4, - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var1", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "right": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var2", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var2", - "decorators": [], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var3", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 10, - "column": 15 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 10, - "column": 14 - } - } - } - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var3", - "decorators": [], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "right": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var3", - "decorators": [], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "right": { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 14, - "column": 26 - }, - "end": { - "line": 14, - "column": 27 - } - } - }, - "loc": { - "start": { - "line": 14, - "column": 26 - }, - "end": { - "line": 14, - "column": 28 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 30 - } - } - }, - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 31 - } - } - } - ], - "loc": { - "start": { - "line": 14, - "column": 25 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 10 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "default": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 22 - } - } - } - ], - "loc": { - "start": { - "line": 14, - "column": 7 - }, - "end": { - "line": 14, - "column": 22 - } - } - }, - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 14, - "column": 31 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var4", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 16, - "column": 13 - }, - "end": { - "line": 16, - "column": 19 - } - } - } - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 16, - "column": 5 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 16, - "column": 5 - }, - "end": { - "line": 16, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var4", - "decorators": [], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 17, - "column": 14 - } - } - }, - { - "type": "NumberLiteral", - "value": 12, - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 18 - } - } - } - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 20 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var5", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 19, - "column": 11 - }, - "end": { - "line": 19, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 19, - "column": 13 - }, - "end": { - "line": 19, - "column": 19 - } - } - }, - { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 19, - "column": 21 - }, - "end": { - "line": 19, - "column": 28 - } - } - } - ], - "loc": { - "start": { - "line": 19, - "column": 11 - }, - "end": { - "line": 19, - "column": 29 - } - } - }, - "loc": { - "start": { - "line": 19, - "column": 11 - }, - "end": { - "line": 19, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var5", - "decorators": [], - "loc": { - "start": { - "line": 20, - "column": 1 - }, - "end": { - "line": 20, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 4, - "loc": { - "start": { - "line": 20, - "column": 9 - }, - "end": { - "line": 20, - "column": 10 - } - } - }, - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 20, - "column": 12 - }, - "end": { - "line": 20, - "column": 16 - } - } - } - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 20, - "column": 1 - }, - "end": { - "line": 20, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 20, - "column": 1 - }, - "end": { - "line": 20, - "column": 18 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var6", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 22, - "column": 11 - }, - "end": { - "line": 22, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 22, - "column": 13 - }, - "end": { - "line": 22, - "column": 14 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 22, - "column": 17 - }, - "end": { - "line": 22, - "column": 18 - } - } - }, - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 22, - "column": 20 - }, - "end": { - "line": 22, - "column": 26 - } - } - }, - "loc": { - "start": { - "line": 22, - "column": 17 - }, - "end": { - "line": 22, - "column": 27 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 22, - "column": 28 - }, - "end": { - "line": 22, - "column": 29 - } - } - }, - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 22, - "column": 31 - }, - "end": { - "line": 22, - "column": 37 - } - } - }, - "loc": { - "start": { - "line": 22, - "column": 28 - }, - "end": { - "line": 22, - "column": 39 - } - } - } - ], - "loc": { - "start": { - "line": 22, - "column": 15 - }, - "end": { - "line": 22, - "column": 39 - } - } - } - ], - "loc": { - "start": { - "line": 22, - "column": 13 - }, - "end": { - "line": 22, - "column": 41 - } - } - }, - "loc": { - "start": { - "line": 22, - "column": 13 - }, - "end": { - "line": 22, - "column": 14 - } - } - } - ], - "loc": { - "start": { - "line": 22, - "column": 11 - }, - "end": { - "line": 22, - "column": 41 - } - } - }, - "loc": { - "start": { - "line": 22, - "column": 11 - }, - "end": { - "line": 22, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 22, - "column": 5 - }, - "end": { - "line": 22, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 22, - "column": 5 - }, - "end": { - "line": 22, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 42 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var6", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 1 - }, - "end": { - "line": 23, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 11 - }, - "end": { - "line": 23, - "column": 12 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 23, - "column": 15 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 23, - "column": 11 - }, - "end": { - "line": 23, - "column": 15 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 17 - }, - "end": { - "line": 23, - "column": 18 - } - } - }, - "value": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 23, - "column": 20 - }, - "end": { - "line": 23, - "column": 25 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 23, - "column": 17 - }, - "end": { - "line": 23, - "column": 25 - } - } - } - ], - "loc": { - "start": { - "line": 23, - "column": 9 - }, - "end": { - "line": 23, - "column": 27 - } - } - }, - { - "type": "NumberLiteral", - "value": 12, - "loc": { - "start": { - "line": 23, - "column": 29 - }, - "end": { - "line": 23, - "column": 31 - } - } - } - ], - "loc": { - "start": { - "line": 23, - "column": 8 - }, - "end": { - "line": 23, - "column": 32 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 1 - }, - "end": { - "line": 23, - "column": 32 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 1 - }, - "end": { - "line": 23, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "o", - "decorators": [], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 6 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 12, - "loc": { - "start": { - "line": 26, - "column": 8 - }, - "end": { - "line": 26, - "column": 10 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 27, - "column": 6 - } - } - }, - "value": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 27, - "column": 9 - }, - "end": { - "line": 27, - "column": 14 - } - } - }, - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 21 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 27, - "column": 21 - } - } - } - ], - "loc": { - "start": { - "line": 25, - "column": 9 - }, - "end": { - "line": 28, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 28, - "column": 2 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 25, - "column": 1 - }, - "end": { - "line": 28, - "column": 2 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "z", - "decorators": [], - "loc": { - "start": { - "line": 30, - "column": 5 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "SpreadElement", - "argument": { - "type": "Identifier", - "name": "o", - "decorators": [], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 31, - "column": 5 - }, - "end": { - "line": 31, - "column": 9 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 32, - "column": 5 - }, - "end": { - "line": 32, - "column": 6 - } - } - }, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 32, - "column": 21 - }, - "end": { - "line": 32, - "column": 27 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 32, - "column": 18 - }, - "end": { - "line": 32, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "b", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 32, - "column": 32 - }, - "end": { - "line": 32, - "column": 38 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 32, - "column": 29 - }, - "end": { - "line": 32, - "column": 30 - } - } - } - ], - "returnType": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 32, - "column": 41 - }, - "end": { - "line": 32, - "column": 47 - } - } - }, - "loc": { - "start": { - "line": 32, - "column": 41 - }, - "end": { - "line": 32, - "column": 49 - } - } - }, - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 33, - "column": 17 - }, - "end": { - "line": 33, - "column": 18 - } - } - }, - { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 33, - "column": 20 - }, - "end": { - "line": 33, - "column": 21 - } - } - }, - { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 33, - "column": 23 - }, - "end": { - "line": 33, - "column": 24 - } - } - } - ], - "loc": { - "start": { - "line": 33, - "column": 16 - }, - "end": { - "line": 33, - "column": 25 - } - } - }, - "loc": { - "start": { - "line": 33, - "column": 9 - }, - "end": { - "line": 33, - "column": 26 - } - } - } - ], - "loc": { - "start": { - "line": 32, - "column": 50 - }, - "end": { - "line": 34, - "column": 6 - } - } - }, - "loc": { - "start": { - "line": 32, - "column": 8 - }, - "end": { - "line": 34, - "column": 6 - } - } - }, - "loc": { - "start": { - "line": 32, - "column": 8 - }, - "end": { - "line": 34, - "column": 6 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 32, - "column": 5 - }, - "end": { - "line": 34, - "column": 6 - } - } - } - ], - "loc": { - "start": { - "line": 30, - "column": 9 - }, - "end": { - "line": 35, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 30, - "column": 5 - }, - "end": { - "line": 35, - "column": 2 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 35, - "column": 2 - } - } - }, - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 37, - "column": 6 - }, - "end": { - "line": 37, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSParenthesizedType", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 37, - "column": 45 - }, - "end": { - "line": 37, - "column": 46 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 45 - }, - "end": { - "line": 37, - "column": 46 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "E", - "decorators": [], - "loc": { - "start": { - "line": 37, - "column": 49 - }, - "end": { - "line": 37, - "column": 50 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 49 - }, - "end": { - "line": 37, - "column": 50 - } - } - } - ], - "loc": { - "start": { - "line": 37, - "column": 45 - }, - "end": { - "line": 37, - "column": 50 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 44 - }, - "end": { - "line": 37, - "column": 51 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 44 - }, - "end": { - "line": 37, - "column": 53 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 9 - } - } - }, - "default": { - "type": "TSTypeQuery", - "exprName": { - "type": "Identifier", - "name": "z", - "decorators": [], - "loc": { - "start": { - "line": 37, - "column": 19 - }, - "end": { - "line": 37, - "column": 20 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 12 - }, - "end": { - "line": 37, - "column": 20 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 21 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "E", - "decorators": [], - "loc": { - "start": { - "line": 37, - "column": 22 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "default": { - "type": "TSFunctionType", - "params": [], - "returnType": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 37, - "column": 32 - }, - "end": { - "line": 37, - "column": 38 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 32 - }, - "end": { - "line": 37, - "column": 40 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 26 - }, - "end": { - "line": 37, - "column": 40 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 22 - }, - "end": { - "line": 37, - "column": 41 - } - } - } - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 41 - } - } - }, - "loc": { - "start": { - "line": 37, - "column": 1 - }, - "end": { - "line": 37, - "column": 54 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 37, - "column": 53 - }, - "end": { - "line": 37, - "column": 54 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var7", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 39, - "column": 11 - }, - "end": { - "line": 39, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 39, - "column": 11 - }, - "end": { - "line": 39, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 39, - "column": 5 - }, - "end": { - "line": 39, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 39, - "column": 5 - }, - "end": { - "line": 39, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 39, - "column": 1 - }, - "end": { - "line": 39, - "column": 13 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var7", - "decorators": [], - "loc": { - "start": { - "line": 40, - "column": 1 - }, - "end": { - "line": 40, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [], - "loc": { - "start": { - "line": 40, - "column": 8 - }, - "end": { - "line": 40, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 40, - "column": 1 - }, - "end": { - "line": 40, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 40, - "column": 1 - }, - "end": { - "line": 40, - "column": 11 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var7", - "decorators": [], - "loc": { - "start": { - "line": 41, - "column": 1 - }, - "end": { - "line": 41, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 41, - "column": 11 - }, - "end": { - "line": 41, - "column": 12 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 41, - "column": 14 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 41, - "column": 11 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 41, - "column": 17 - }, - "end": { - "line": 41, - "column": 18 - } - } - }, - "value": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 41, - "column": 21 - }, - "end": { - "line": 41, - "column": 26 - } - } - }, - { - "type": "BooleanLiteral", - "value": false, - "loc": { - "start": { - "line": 41, - "column": 28 - }, - "end": { - "line": 41, - "column": 33 - } - } - } - ], - "loc": { - "start": { - "line": 41, - "column": 20 - }, - "end": { - "line": 41, - "column": 34 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 41, - "column": 17 - }, - "end": { - "line": 41, - "column": 34 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 41, - "column": 36 - }, - "end": { - "line": 41, - "column": 37 - } - } - }, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 41, - "column": 61 - }, - "end": { - "line": 41, - "column": 62 - } - } - } - ], - "loc": { - "start": { - "line": 41, - "column": 60 - }, - "end": { - "line": 41, - "column": 63 - } - } - }, - "loc": { - "start": { - "line": 41, - "column": 53 - }, - "end": { - "line": 41, - "column": 63 - } - } - } - ], - "loc": { - "start": { - "line": 41, - "column": 51 - }, - "end": { - "line": 41, - "column": 65 - } - } - }, - "loc": { - "start": { - "line": 41, - "column": 39 - }, - "end": { - "line": 41, - "column": 65 - } - } - }, - "loc": { - "start": { - "line": 41, - "column": 39 - }, - "end": { - "line": 41, - "column": 65 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 41, - "column": 36 - }, - "end": { - "line": 41, - "column": 65 - } - } - } - ], - "loc": { - "start": { - "line": 41, - "column": 9 - }, - "end": { - "line": 41, - "column": 67 - } - } - } - ], - "loc": { - "start": { - "line": 41, - "column": 8 - }, - "end": { - "line": 41, - "column": 68 - } - } - }, - "loc": { - "start": { - "line": 41, - "column": 1 - }, - "end": { - "line": 41, - "column": 68 - } - } - }, - "loc": { - "start": { - "line": 41, - "column": 1 - }, - "end": { - "line": 41, - "column": 69 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var7", - "decorators": [], - "loc": { - "start": { - "line": 42, - "column": 1 - }, - "end": { - "line": 42, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 43, - "column": 13 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 43, - "column": 16 - }, - "end": { - "line": 43, - "column": 17 - } - } - }, - { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 43, - "column": 19 - }, - "end": { - "line": 43, - "column": 20 - } - } - } - ], - "loc": { - "start": { - "line": 43, - "column": 12 - }, - "end": { - "line": 43, - "column": 21 - } - } - }, - "loc": { - "start": { - "line": 43, - "column": 5 - }, - "end": { - "line": 43, - "column": 22 - } - } - } - ], - "loc": { - "start": { - "line": 42, - "column": 21 - }, - "end": { - "line": 44, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 42, - "column": 9 - }, - "end": { - "line": 44, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 42, - "column": 9 - }, - "end": { - "line": 44, - "column": 2 - } - } - } - ], - "loc": { - "start": { - "line": 42, - "column": 8 - }, - "end": { - "line": 44, - "column": 3 - } - } - }, - "loc": { - "start": { - "line": 42, - "column": 1 - }, - "end": { - "line": 44, - "column": 3 - } - } - }, - "loc": { - "start": { - "line": 42, - "column": 1 - }, - "end": { - "line": 44, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var7", - "decorators": [], - "loc": { - "start": { - "line": 45, - "column": 1 - }, - "end": { - "line": 45, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 45, - "column": 11 - }, - "end": { - "line": 45, - "column": 12 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 45, - "column": 14 - }, - "end": { - "line": 45, - "column": 15 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 45, - "column": 11 - }, - "end": { - "line": 45, - "column": 15 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 18 - } - } - }, - "value": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 45, - "column": 21 - }, - "end": { - "line": 45, - "column": 26 - } - } - } - ], - "loc": { - "start": { - "line": 45, - "column": 20 - }, - "end": { - "line": 45, - "column": 27 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 27 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 45, - "column": 29 - }, - "end": { - "line": 45, - "column": 30 - } - } - }, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 45, - "column": 45 - }, - "end": { - "line": 45, - "column": 51 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 45, - "column": 42 - }, - "end": { - "line": 45, - "column": 43 - } - } - }, - { - "type": "Identifier", - "name": "b", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 45, - "column": 56 - }, - "end": { - "line": 45, - "column": 62 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 45, - "column": 53 - }, - "end": { - "line": 45, - "column": 54 - } - } - } - ], - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ArrayExpression", - "elements": [], - "loc": { - "start": { - "line": 45, - "column": 73 - }, - "end": { - "line": 45, - "column": 75 - } - } - }, - "loc": { - "start": { - "line": 45, - "column": 66 - }, - "end": { - "line": 45, - "column": 75 - } - } - } - ], - "loc": { - "start": { - "line": 45, - "column": 64 - }, - "end": { - "line": 45, - "column": 77 - } - } - }, - "loc": { - "start": { - "line": 45, - "column": 32 - }, - "end": { - "line": 45, - "column": 77 - } - } - }, - "loc": { - "start": { - "line": 45, - "column": 32 - }, - "end": { - "line": 45, - "column": 77 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 45, - "column": 29 - }, - "end": { - "line": 45, - "column": 77 - } - } - } - ], - "loc": { - "start": { - "line": 45, - "column": 9 - }, - "end": { - "line": 45, - "column": 79 - } - } - }, - { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 45, - "column": 103 - }, - "end": { - "line": 45, - "column": 104 - } - } - } - ], - "loc": { - "start": { - "line": 45, - "column": 102 - }, - "end": { - "line": 45, - "column": 105 - } - } - }, - "loc": { - "start": { - "line": 45, - "column": 95 - }, - "end": { - "line": 45, - "column": 105 - } - } - } - ], - "loc": { - "start": { - "line": 45, - "column": 93 - }, - "end": { - "line": 45, - "column": 107 - } - } - }, - "loc": { - "start": { - "line": 45, - "column": 81 - }, - "end": { - "line": 45, - "column": 107 - } - } - }, - "loc": { - "start": { - "line": 45, - "column": 81 - }, - "end": { - "line": 45, - "column": 107 - } - } - } - ], - "loc": { - "start": { - "line": 45, - "column": 8 - }, - "end": { - "line": 45, - "column": 108 - } - } - }, - "loc": { - "start": { - "line": 45, - "column": 1 - }, - "end": { - "line": 45, - "column": 108 - } - } - }, - "loc": { - "start": { - "line": 45, - "column": 1 - }, - "end": { - "line": 45, - "column": 109 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "var8", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 47, - "column": 11 - }, - "end": { - "line": 47, - "column": 12 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 47, - "column": 13 - }, - "end": { - "line": 47, - "column": 19 - } - } - } - ], - "loc": { - "start": { - "line": 47, - "column": 11 - }, - "end": { - "line": 47, - "column": 20 - } - } - }, - "loc": { - "start": { - "line": 47, - "column": 11 - }, - "end": { - "line": 47, - "column": 12 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 47, - "column": 5 - }, - "end": { - "line": 47, - "column": 9 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 47, - "column": 5 - }, - "end": { - "line": 47, - "column": 9 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 47, - "column": 1 - }, - "end": { - "line": 47, - "column": 21 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var8", - "decorators": [], - "loc": { - "start": { - "line": 48, - "column": 1 - }, - "end": { - "line": 48, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 48, - "column": 9 - }, - "end": { - "line": 48, - "column": 10 - } - } - }, - { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 48, - "column": 12 - }, - "end": { - "line": 48, - "column": 13 - } - } - }, - { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 48, - "column": 15 - }, - "end": { - "line": 48, - "column": 16 - } - } - } - ], - "loc": { - "start": { - "line": 48, - "column": 8 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 48, - "column": 1 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 48, - "column": 1 - }, - "end": { - "line": 48, - "column": 18 - } - } - }, - { - "type": "FunctionDeclaration", - "function": { - "type": "ScriptFunction", - "id": { - "type": "Identifier", - "name": "func", - "decorators": [], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - }, - "generator": false, - "async": false, - "expression": false, - "params": [], - "returnType": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 50, - "column": 18 - }, - "end": { - "line": 50, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 50, - "column": 18 - }, - "end": { - "line": 50, - "column": 26 - } - } - }, - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 51, - "column": 13 - }, - "end": { - "line": 51, - "column": 14 - } - } - }, - { - "type": "NumberLiteral", - "value": 2, - "loc": { - "start": { - "line": 51, - "column": 16 - }, - "end": { - "line": 51, - "column": 17 - } - } - }, - { - "type": "NumberLiteral", - "value": 3, - "loc": { - "start": { - "line": 51, - "column": 19 - }, - "end": { - "line": 51, - "column": 20 - } - } - }, - { - "type": "NumberLiteral", - "value": 4, - "loc": { - "start": { - "line": 51, - "column": 22 - }, - "end": { - "line": 51, - "column": 23 - } - } - } - ], - "loc": { - "start": { - "line": 51, - "column": 12 - }, - "end": { - "line": 51, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 51, - "column": 5 - }, - "end": { - "line": 51, - "column": 25 - } - } - } - ], - "loc": { - "start": { - "line": 50, - "column": 27 - }, - "end": { - "line": 52, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 50, - "column": 1 - }, - "end": { - "line": 52, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 50, - "column": 1 - }, - "end": { - "line": 52, - "column": 2 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "var8", - "decorators": [], - "loc": { - "start": { - "line": 54, - "column": 1 - }, - "end": { - "line": 54, - "column": 5 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 54, - "column": 9 - }, - "end": { - "line": 54, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "func", - "decorators": [], - "loc": { - "start": { - "line": 54, - "column": 12 - }, - "end": { - "line": 54, - "column": 16 - } - } - } - ], - "loc": { - "start": { - "line": 54, - "column": 8 - }, - "end": { - "line": 54, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 54, - "column": 1 - }, - "end": { - "line": 54, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 54, - "column": 1 - }, - "end": { - "line": 54, - "column": 18 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 55, - "column": 1 - } - } -} diff --git a/es2panda/test/compiler/ts/generic_type_alias.ts b/es2panda/test/compiler/ts/generic_type_alias.ts deleted file mode 100644 index 6f62324f5bd18e8314d9f9910a162d7a326ffca2..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -type A = number | T; - -var var1: A; -var1 = 4; -var1 = "foo"; - -var var2: A; -var2 = 1; - -var var3: A>; -var3 = 2; -var3 = true; - -type B = [R, T]; - -var var4: B; -var4 = ["foo", 12]; - -var var5: B; -var5 = [4, true]; - -var var6: B>; -var6 = [{ a: 2, b: "foo" }, 12]; - -var o = { - a: 12, - b: ["foo", true], -} - -var z = { - ...o, - c: function (a: number, b: string): number[] { - return [1, 2, 3]; - } -} - -type C number[]> = (T | E)[]; - -var var7: C; -var7 = []; -var7 = [{ a: 2, b: ["bar", false], c: function () { return [1] } }]; -var7 = [function () { - return [1, 2, 3]; -}]; -var7 = [{ a: 1, b: ["baz"], c: function (a: number, b: string) { return [] } }, function () { return [2] }]; - -var var8: C; -var8 = [1, 2, 3]; - -function func(): number[] { - return [1, 2, 3, 4]; -} - -var8 = [1, func]; diff --git a/es2panda/test/compiler/ts/generic_type_alias_1-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_1-expected.txt deleted file mode 100644 index 11d2aeec93c1dcc61bccb273a417f73d1f1910f7..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_1-expected.txt +++ /dev/null @@ -1,201 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 4, - "column": 1 - } - } -} -TypeError: Generic type 'A' requires '1' type argument(s). [generic_type_alias_1.ts:3:8] diff --git a/es2panda/test/compiler/ts/generic_type_alias_1.ts b/es2panda/test/compiler/ts/generic_type_alias_1.ts deleted file mode 100644 index 3c66b5d8e313141e022b0f63191a94836e6ed349..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_1.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -type A = T; - -var a: A; diff --git a/es2panda/test/compiler/ts/generic_type_alias_10-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_10-expected.txt deleted file mode 100644 index daf41841294ceec69f375555a1ab70744f47922b..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_10-expected.txt +++ /dev/null @@ -1,708 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSParenthesizedType", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 80 - }, - "end": { - "line": 1, - "column": 81 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 80 - }, - "end": { - "line": 1, - "column": 81 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 84 - }, - "end": { - "line": 1, - "column": 85 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 84 - }, - "end": { - "line": 1, - "column": 85 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 80 - }, - "end": { - "line": 1, - "column": 85 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 79 - }, - "end": { - "line": 1, - "column": 86 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 79 - }, - "end": { - "line": 1, - "column": 88 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 9 - } - } - }, - "default": { - "type": "TSFunctionType", - "params": [ - { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - { - "type": "Identifier", - "name": "b", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } - } - } - ], - "returnType": { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 45 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 45 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 46 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 48 - } - } - }, - "default": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 53 - }, - "end": { - "line": 1, - "column": 54 - } - } - }, - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 56 - }, - "end": { - "line": 1, - "column": 62 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 53 - }, - "end": { - "line": 1, - "column": 63 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 64 - }, - "end": { - "line": 1, - "column": 65 - } - } - }, - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 1, - "column": 67 - }, - "end": { - "line": 1, - "column": 73 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 64 - }, - "end": { - "line": 1, - "column": 75 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 51 - }, - "end": { - "line": 1, - "column": 75 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 76 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 76 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 89 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 88 - }, - "end": { - "line": 1, - "column": 89 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "o", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "value": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "value": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Identifier", - "name": "o", - "decorators": [], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 7 - } - } - } - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 11, - "column": 1 - } - } -} -TypeError: Type '{ a: string; b: string; }' is not assignable to type '(a: number, b: string) => boolean | { a: number; b: string; }'. [generic_type_alias_10.ts:10:6] diff --git a/es2panda/test/compiler/ts/generic_type_alias_10.ts b/es2panda/test/compiler/ts/generic_type_alias_10.ts deleted file mode 100644 index 014791a44379ec4f103a5c7a415a0e303053d867..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_10.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -type A boolean, B = { a: number, b: string }> = (T | B)[]; - -var a: A; - -var o = { - a: "foo", - b: "bar", -} - -a = [o]; diff --git a/es2panda/test/compiler/ts/generic_type_alias_2-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_2-expected.txt deleted file mode 100644 index 6c33dd8b6ceb485933a29045a2e9f7e1aa7da809..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_2-expected.txt +++ /dev/null @@ -1,285 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 30 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "default": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 21 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 22 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 30 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 4, - "column": 1 - } - } -} -TypeError: Generic type 'A' requires between '1' and '2' type arguments. [generic_type_alias_2.ts:3:8] diff --git a/es2panda/test/compiler/ts/generic_type_alias_2.ts b/es2panda/test/compiler/ts/generic_type_alias_2.ts deleted file mode 100644 index e54bbcd501b475015596bc0bb15729fb90ddd7a9..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_2.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -type A = R | T; - -var a: A; diff --git a/es2panda/test/compiler/ts/generic_type_alias_3-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_3-expected.txt deleted file mode 100644 index 3d5388a649b70d936a09c46e31916c429a0f0dbb..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_3-expected.txt +++ /dev/null @@ -1,270 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 9 - } - } - }, - "default": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 19 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 2 - } - } - }, - "right": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 5, - "column": 1 - } - } -} -TypeError: Type '"foo"' is not assignable to type 'number'. [generic_type_alias_3.ts:4:1] diff --git a/es2panda/test/compiler/ts/generic_type_alias_3.ts b/es2panda/test/compiler/ts/generic_type_alias_3.ts deleted file mode 100644 index cc8615b25cbe4b4fdc0f699d7e1aa0210ab15be5..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_3.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -type A = T; - -var a: A; -a = "foo"; diff --git a/es2panda/test/compiler/ts/generic_type_alias_4-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_4-expected.txt deleted file mode 100644 index f613a2a801b25f5c4616707ad09c027a09f85f38..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_4-expected.txt +++ /dev/null @@ -1,466 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 2 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 9 - } - } - }, - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 31 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 31 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 35 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 36 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 37 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 37 - }, - "end": { - "line": 3, - "column": 39 - } - } - } - ], - "loc": { - "start": { - "line": 3, - "column": 30 - }, - "end": { - "line": 3, - "column": 39 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "default": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 3, - "column": 39 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 6, - "column": 1 - } - } -} -TypeError: Type 'number' is not assignable to type 'string'. [generic_type_alias_4.ts:1:6] diff --git a/es2panda/test/compiler/ts/generic_type_alias_4.ts b/es2panda/test/compiler/ts/generic_type_alias_4.ts deleted file mode 100644 index 7452496ffd33f5a267e8072d725abfe8a1625e21..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_4.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -a = [1]; - -type A = [T, B, C]; - -var a: A diff --git a/es2panda/test/compiler/ts/generic_type_alias_5-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_5-expected.txt deleted file mode 100644 index a16b0e10cb728447fee05f93ba37bb123976ebd0..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_5-expected.txt +++ /dev/null @@ -1,480 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 2 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - { - "type": "NumberLiteral", - "value": 5, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 14 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 31 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 31 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 35 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 36 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 37 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 37 - }, - "end": { - "line": 3, - "column": 39 - } - } - } - ], - "loc": { - "start": { - "line": 3, - "column": 30 - }, - "end": { - "line": 3, - "column": 39 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "default": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 3, - "column": 39 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 6, - "column": 1 - } - } -} -TypeError: Type 'number' is not assignable to type 'boolean'. [generic_type_alias_5.ts:1:13] diff --git a/es2panda/test/compiler/ts/generic_type_alias_5.ts b/es2panda/test/compiler/ts/generic_type_alias_5.ts deleted file mode 100644 index 2e0a831497d2b44fe4dda0d606bc3d7c16cacbba..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_5.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -a = ["foo", 5]; - -type A = [T, B, C]; - -var a: A diff --git a/es2panda/test/compiler/ts/generic_type_alias_6-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_6-expected.txt deleted file mode 100644 index 5a7d94e72acc4ea92deda1a33246b1baf4b57e91..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_6-expected.txt +++ /dev/null @@ -1,480 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 2 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 17 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 31 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 31 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 35 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 36 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 37 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 37 - }, - "end": { - "line": 3, - "column": 39 - } - } - } - ], - "loc": { - "start": { - "line": 3, - "column": 30 - }, - "end": { - "line": 3, - "column": 39 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "C", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "default": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 3, - "column": 39 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 6, - "column": 1 - } - } -} -TypeError: Type '[string, boolean]' is not assignable to type '[string, boolean, number[]]'. [generic_type_alias_6.ts:1:1] diff --git a/es2panda/test/compiler/ts/generic_type_alias_6.ts b/es2panda/test/compiler/ts/generic_type_alias_6.ts deleted file mode 100644 index de649d98a0179601584b03699aea4297049b28cc..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_6.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -a = ["foo", true]; - -type A = [T, B, C]; - -var a: A diff --git a/es2panda/test/compiler/ts/generic_type_alias_7-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_7-expected.txt deleted file mode 100644 index 05fc0d19e1afa6b65d9e7a6e7f21a35f5a37097b..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_7-expected.txt +++ /dev/null @@ -1,539 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 21 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 22 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 13 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 26 - } - } - } - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 2 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 5, - "column": 6 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 6, - "column": 1 - } - } -} -TypeError: Type 'string' is not assignable to type 'number'. [generic_type_alias_7.ts:5:6] diff --git a/es2panda/test/compiler/ts/generic_type_alias_7.ts b/es2panda/test/compiler/ts/generic_type_alias_7.ts deleted file mode 100644 index 5464ca6c8f2f84f69c39b513b3948c4e690b1d7c..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_7.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -type A = [T, B]; -type B = R; - -var a: B>; -a = ["foo"]; diff --git a/es2panda/test/compiler/ts/generic_type_alias_8-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_8-expected.txt deleted file mode 100644 index 5bf355700648ed8c03b4cb3247e81454ee018068..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_8-expected.txt +++ /dev/null @@ -1,806 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "o", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 6 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 12, - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - { - "type": "Property", - "method": true, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - { - "type": "Identifier", - "name": "b", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - ], - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 3, - "column": 38 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 31 - }, - "end": { - "line": 3, - "column": 44 - } - } - } - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 46 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 46 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 46 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 46 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 4, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 4, - "column": 2 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 4, - "column": 2 - } - } - }, - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 30 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 32 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 32 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 35 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 38 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 38 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 35 - }, - "end": { - "line": 6, - "column": 41 - } - } - } - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 41 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "default": { - "type": "TSTypeQuery", - "exprName": { - "type": "Identifier", - "name": "o", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 15 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 24 - } - } - } - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 24 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 42 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 6, - "column": 41 - }, - "end": { - "line": 6, - "column": 42 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "value": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - { - "type": "Property", - "method": false, - "shorthand": false, - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "value": { - "type": "NumberLiteral", - "value": 5, - "loc": { - "start": { - "line": 9, - "column": 20 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "kind": "init", - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - } - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 24 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 10, - "column": 1 - } - } -} -TypeError: Type 'number' is not assignable to type '{ a: number; b(a: number, b: string) => string; }'. [generic_type_alias_8.ts:9:17] diff --git a/es2panda/test/compiler/ts/generic_type_alias_8.ts b/es2panda/test/compiler/ts/generic_type_alias_8.ts deleted file mode 100644 index 037617b67dabefcd329ebbcde557846769515077..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_8.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -var o = { - a: 12, - b(a: number, b: string) { return "foo"; } -} - -type A = { a: T, b: B }; -var a: A; - -a = { a: "foo", b: 5 }; diff --git a/es2panda/test/compiler/ts/generic_type_alias_9-expected.txt b/es2panda/test/compiler/ts/generic_type_alias_9-expected.txt deleted file mode 100644 index 6b0ad6a91cf39560c3abc68bd3f22b3e444069e4..0000000000000000000000000000000000000000 --- a/es2panda/test/compiler/ts/generic_type_alias_9-expected.txt +++ /dev/null @@ -1,701 +0,0 @@ -{ - "type": "Program", - "statements": [ - { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSParenthesizedType", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 80 - }, - "end": { - "line": 1, - "column": 81 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 80 - }, - "end": { - "line": 1, - "column": 81 - } - } - }, - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 84 - }, - "end": { - "line": 1, - "column": 85 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 84 - }, - "end": { - "line": 1, - "column": 85 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 80 - }, - "end": { - "line": 1, - "column": 85 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 79 - }, - "end": { - "line": 1, - "column": 86 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 79 - }, - "end": { - "line": 1, - "column": 88 - } - } - }, - "typeParameters": { - "type": "TSTypeParameterDeclaration", - "params": [ - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "T", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 9 - } - } - }, - "default": { - "type": "TSFunctionType", - "params": [ - { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - { - "type": "Identifier", - "name": "b", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 25 - } - } - } - ], - "returnType": { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 45 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 45 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 46 - } - } - }, - { - "type": "TSTypeParameter", - "name": { - "type": "Identifier", - "name": "B", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 48 - } - } - }, - "default": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 53 - }, - "end": { - "line": 1, - "column": 54 - } - } - }, - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 56 - }, - "end": { - "line": 1, - "column": 62 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 53 - }, - "end": { - "line": 1, - "column": 63 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "optional": false, - "readonly": false, - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 64 - }, - "end": { - "line": 1, - "column": 65 - } - } - }, - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 1, - "column": 67 - }, - "end": { - "line": 1, - "column": 73 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 64 - }, - "end": { - "line": 1, - "column": 75 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 51 - }, - "end": { - "line": 1, - "column": 75 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 47 - }, - "end": { - "line": 1, - "column": 76 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 76 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 89 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 88 - }, - "end": { - "line": 1, - "column": 89 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "A", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "FunctionDeclaration", - "function": { - "type": "ScriptFunction", - "id": { - "type": "Identifier", - "name": "func", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "b", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 5, - "column": 35 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 26 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 17 - } - } - } - ], - "loc": { - "start": { - "line": 5, - "column": 37 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Identifier", - "name": "func", - "decorators": [], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 12 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 10, - "column": 1 - } - } -} -TypeError: Type '(a: string, b: string) => boolean' is not assignable to type '(a: number, b: string) => boolean | { a: number; b: string; }'. [generic_type_alias_9.ts:9:6] diff --git a/es2panda/test/compiler/ts/identifierWithoutDeclaration-expected.txt b/es2panda/test/compiler/ts/identifierWithoutDeclaration-expected.txt index 445a099fa0d95f9d43fcbfe9a9ec5a2316e48b22..db8d486becd438b7fd142934c8d9b2327c712b38 100644 --- a/es2panda/test/compiler/ts/identifierWithoutDeclaration-expected.txt +++ b/es2panda/test/compiler/ts/identifierWithoutDeclaration-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 2 } } @@ -26,33 +26,33 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 6 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -69,11 +69,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -93,11 +93,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -106,11 +106,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -131,22 +131,22 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -213,33 +213,33 @@ "value": 12, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 7 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 7 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -255,11 +255,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -269,33 +269,33 @@ "value": 4, "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -307,9 +307,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } } -TypeError: Cannot find name foo [identifierWithoutDeclaration.ts:5:1] +TypeError: Cannot find name foo [identifierWithoutDeclaration.ts:21:1] diff --git a/es2panda/test/compiler/ts/in_1-expected.txt b/es2panda/test/compiler/ts/in_1-expected.txt index 7e153fe7fe2a902571ac4a57e083fb31723ad36e..9706cd1e7e12de1db13000d13c713ed2ee9cb77a 100644 --- a/es2panda/test/compiler/ts/in_1-expected.txt +++ b/es2panda/test/compiler/ts/in_1-expected.txt @@ -13,11 +13,11 @@ "type": "TSNullKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -71,11 +71,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Object is possibly 'null'. [in_1.ts:3:1] +TypeError: Object is possibly 'null'. [in_1.ts:19:1] diff --git a/es2panda/test/compiler/ts/in_10-expected.txt b/es2panda/test/compiler/ts/in_10-expected.txt index 973ad9cd9d82ceaec1a599dfbf863816403f3616..c3724d05ea7dece98757dfe733e7bf9d0af95258 100644 --- a/es2panda/test/compiler/ts/in_10-expected.txt +++ b/es2panda/test/compiler/ts/in_10-expected.txt @@ -18,11 +18,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -43,22 +43,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -66,11 +66,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -91,11 +91,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -112,11 +112,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -124,11 +124,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -136,11 +136,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -149,11 +149,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -169,11 +169,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -184,33 +184,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -222,9 +222,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_10.ts:3:6] +TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_10.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_11-expected.txt b/es2panda/test/compiler/ts/in_11-expected.txt index 6630c41ed1a879f6a1e5eae38a57059a34260756..c44be4a62904919f4a709b1c38f21466b23da287 100644 --- a/es2panda/test/compiler/ts/in_11-expected.txt +++ b/es2panda/test/compiler/ts/in_11-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_11.ts:3:6] +TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_11.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_12-expected.txt b/es2panda/test/compiler/ts/in_12-expected.txt index 66a63205f5087df1dfd4884732202fa719734b0e..04dcf00cd21b370979b295921ce973b944b85b25 100644 --- a/es2panda/test/compiler/ts/in_12-expected.txt +++ b/es2panda/test/compiler/ts/in_12-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_12.ts:3:6] +TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_12.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_13-expected.txt b/es2panda/test/compiler/ts/in_13-expected.txt index 1a31836863e917c93af0ea6b58d5a1e248cce44f..096d50b045c70081e3c70b13e884895074448a89 100644 --- a/es2panda/test/compiler/ts/in_13-expected.txt +++ b/es2panda/test/compiler/ts/in_13-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_13.ts:3:6] +TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_13.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_14-expected.txt b/es2panda/test/compiler/ts/in_14-expected.txt index 2e56615c1ed4cc5e15bba9cff7d86c50cf4d1fe0..1b6918f3040b292ee290af9315db656c9622457f 100644 --- a/es2panda/test/compiler/ts/in_14-expected.txt +++ b/es2panda/test/compiler/ts/in_14-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_14.ts:3:6] +TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_14.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_15-expected.txt b/es2panda/test/compiler/ts/in_15-expected.txt index 2590d4a53c93b927486bd978b154991009a06754..6ac123d7c1173250e13369ccb83ff87d1ff79367 100644 --- a/es2panda/test/compiler/ts/in_15-expected.txt +++ b/es2panda/test/compiler/ts/in_15-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -76,11 +76,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -89,11 +89,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -102,11 +102,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -115,11 +115,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 30 }, "end": { - "line": 2, + "line": 18, "column": 37 } } @@ -127,22 +127,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 37 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 38 } } @@ -150,11 +150,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -162,11 +162,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -175,11 +175,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 39 } } @@ -195,11 +195,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -210,33 +210,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -248,9 +248,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_15.ts:3:6] +TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_15.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_2-expected.txt b/es2panda/test/compiler/ts/in_2-expected.txt index 5dfae22c02a0ae5c4748d37f932825376d0642c8..12b2de1ed43030484e5a6b60e6114f0316627584 100644 --- a/es2panda/test/compiler/ts/in_2-expected.txt +++ b/es2panda/test/compiler/ts/in_2-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSNullKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Object is possibly 'null'. [in_2.ts:3:6] +TypeError: Object is possibly 'null'. [in_2.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_3-expected.txt b/es2panda/test/compiler/ts/in_3-expected.txt index 61551e82460abac69f0606dbe763ba73d7ce5a97..41de6848c8e16499772f0413abf6949e35d8df28 100644 --- a/es2panda/test/compiler/ts/in_3-expected.txt +++ b/es2panda/test/compiler/ts/in_3-expected.txt @@ -13,11 +13,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -71,11 +71,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Object is possibly 'undefined'. [in_3.ts:3:1] +TypeError: Object is possibly 'undefined'. [in_3.ts:19:1] diff --git a/es2panda/test/compiler/ts/in_4-expected.txt b/es2panda/test/compiler/ts/in_4-expected.txt index 0e7244be1d1e56bbacaee0de631b950f6f8dedfc..1ceb863e5b85bac740b0e8d024f24a863ee7476c 100644 --- a/es2panda/test/compiler/ts/in_4-expected.txt +++ b/es2panda/test/compiler/ts/in_4-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Object is possibly 'undefined'. [in_4.ts:3:6] +TypeError: Object is possibly 'undefined'. [in_4.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_5-expected.txt b/es2panda/test/compiler/ts/in_5-expected.txt index d1b8de2e80405cecd5b248bb1707b93a4e2c4203..c74f80acc7fe08faa4c991062e53da1e1f574f79 100644 --- a/es2panda/test/compiler/ts/in_5-expected.txt +++ b/es2panda/test/compiler/ts/in_5-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. [in_5.ts:3:1] +TypeError: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. [in_5.ts:19:1] diff --git a/es2panda/test/compiler/ts/in_6-expected.txt b/es2panda/test/compiler/ts/in_6-expected.txt index 079069822d13b4cbe6052f45c4680d25b8b6d150..5c84d8bf44a79ff63cfffde55d3da1db882ad3cc 100644 --- a/es2panda/test/compiler/ts/in_6-expected.txt +++ b/es2panda/test/compiler/ts/in_6-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -71,11 +71,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. [in_6.ts:3:1] +TypeError: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. [in_6.ts:19:1] diff --git a/es2panda/test/compiler/ts/in_7-expected.txt b/es2panda/test/compiler/ts/in_7-expected.txt index b7e85cea882d5cc9659b0b432edeac9f84fe2d54..50c3b0b7ccd31b362aceefd5f33db886a1bf12f9 100644 --- a/es2panda/test/compiler/ts/in_7-expected.txt +++ b/es2panda/test/compiler/ts/in_7-expected.txt @@ -18,11 +18,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -44,11 +44,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -57,11 +57,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -69,22 +69,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -92,11 +92,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -104,11 +104,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -117,11 +117,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -138,11 +138,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -150,11 +150,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -162,11 +162,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -175,11 +175,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -195,11 +195,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -210,33 +210,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -248,9 +248,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. [in_7.ts:3:1] +TypeError: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. [in_7.ts:19:1] diff --git a/es2panda/test/compiler/ts/in_8-expected.txt b/es2panda/test/compiler/ts/in_8-expected.txt index 93fe24d2f9788d4fe5f893070d0daceab9a7de04..69cca9c298555ae7f7ff64bbb25ec7b3f37b2e94 100644 --- a/es2panda/test/compiler/ts/in_8-expected.txt +++ b/es2panda/test/compiler/ts/in_8-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_8.ts:3:6] +TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_8.ts:19:6] diff --git a/es2panda/test/compiler/ts/in_9-expected.txt b/es2panda/test/compiler/ts/in_9-expected.txt index d19d61f52ee78c063973101e36bbf87b4516d7d9..cd033a88d3f02722880100a74d0d75ef5253a423 100644 --- a/es2panda/test/compiler/ts/in_9-expected.txt +++ b/es2panda/test/compiler/ts/in_9-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_9.ts:3:6] +TypeError: The right-hand side of an 'in' expression must not be a primitive. [in_9.ts:19:6] diff --git a/es2panda/test/compiler/ts/instanceof_1-expected.txt b/es2panda/test/compiler/ts/instanceof_1-expected.txt index 421890e92146019f25c6d9b0d3834dac8d53e408..7d1bdbe7017e1e8e1fbf3903ad326183bf2ac039 100644 --- a/es2panda/test/compiler/ts/instanceof_1-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_1-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_1.ts:3:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_1.ts:19:1] diff --git a/es2panda/test/compiler/ts/instanceof_10-expected.txt b/es2panda/test/compiler/ts/instanceof_10-expected.txt index 29f42de023b6b16c4fe43c05b365e81623cafb2e..6355dee3be1d346d06b754a4b406657cd52eb2ab 100644 --- a/es2panda/test/compiler/ts/instanceof_10-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_10-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_10.ts:3:14] +TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_10.ts:19:14] diff --git a/es2panda/test/compiler/ts/instanceof_11-expected.txt b/es2panda/test/compiler/ts/instanceof_11-expected.txt index 5668dfe006c98a1da3dc77be96c115da4073b168..ca5580b62f29185d9cedb23417960e08b18f8f2d 100644 --- a/es2panda/test/compiler/ts/instanceof_11-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_11-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_11.ts:3:14] +TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_11.ts:19:14] diff --git a/es2panda/test/compiler/ts/instanceof_12-expected.txt b/es2panda/test/compiler/ts/instanceof_12-expected.txt index ce1265a0747ccc74219963d76f86a70d1171fbf5..2c7a2f852dfd4f6769b4ac3e853d8d40fe688e52 100644 --- a/es2panda/test/compiler/ts/instanceof_12-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_12-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_12.ts:3:14] +TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_12.ts:19:14] diff --git a/es2panda/test/compiler/ts/instanceof_13-expected.txt b/es2panda/test/compiler/ts/instanceof_13-expected.txt index 4fb777df5b92f16bce75379b4d1593ee2a75c31a..0bb86033d5c4acbcfb314bb089835bad5d1f85c0 100644 --- a/es2panda/test/compiler/ts/instanceof_13-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_13-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_13.ts:3:14] +TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_13.ts:19:14] diff --git a/es2panda/test/compiler/ts/instanceof_14-expected.txt b/es2panda/test/compiler/ts/instanceof_14-expected.txt index ae8d93ce572787044d4fcf82b88bccc4304f12e3..d7cd30ace742eb4c5eec094879ba6c2931e72409 100644 --- a/es2panda/test/compiler/ts/instanceof_14-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_14-expected.txt @@ -13,11 +13,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -76,11 +76,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -89,11 +89,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -102,11 +102,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -115,11 +115,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 30 }, "end": { - "line": 2, + "line": 18, "column": 37 } } @@ -127,22 +127,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 37 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 38 } } @@ -150,11 +150,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -162,11 +162,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -175,11 +175,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 39 } } @@ -195,11 +195,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -210,33 +210,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -248,9 +248,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_14.ts:3:14] +TypeError: The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type. [instanceof_14.ts:19:14] diff --git a/es2panda/test/compiler/ts/instanceof_2-expected.txt b/es2panda/test/compiler/ts/instanceof_2-expected.txt index d23c369c877eb4cceacd27609f764b1c07d7f329..48c1ead83d1c0ffbc218b2b9693e4d0d6005df62 100644 --- a/es2panda/test/compiler/ts/instanceof_2-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_2-expected.txt @@ -13,11 +13,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,47 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -127,11 +127,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -139,11 +139,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -151,11 +151,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -164,11 +164,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -199,33 +199,33 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 14 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -237,9 +237,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_2.ts:4:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_2.ts:20:1] diff --git a/es2panda/test/compiler/ts/instanceof_3-expected.txt b/es2panda/test/compiler/ts/instanceof_3-expected.txt index 4e313f0e7ab513f52e30e78e102f43af1130a2cf..d26a29fa02721d4858a47812c6e5bf5d05a77f92 100644 --- a/es2panda/test/compiler/ts/instanceof_3-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_3-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_3.ts:3:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_3.ts:19:1] diff --git a/es2panda/test/compiler/ts/instanceof_4-expected.txt b/es2panda/test/compiler/ts/instanceof_4-expected.txt index 423a13371be3f568d5606b92f8e2f1f3b1e11079..fc237e874e8c6ddefc3f8a23af85435e1c1968f7 100644 --- a/es2panda/test/compiler/ts/instanceof_4-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_4-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -127,11 +127,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -139,11 +139,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -151,11 +151,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -164,11 +164,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -199,33 +199,33 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 14 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -237,9 +237,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_4.ts:4:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_4.ts:20:1] diff --git a/es2panda/test/compiler/ts/instanceof_5-expected.txt b/es2panda/test/compiler/ts/instanceof_5-expected.txt index a9d462aaf2f08a3d0df1747fa9a2588ab3f389ff..f02d1c03572c879b947c0f33642ee39feea8d29a 100644 --- a/es2panda/test/compiler/ts/instanceof_5-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_5-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_5.ts:3:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_5.ts:19:1] diff --git a/es2panda/test/compiler/ts/instanceof_6-expected.txt b/es2panda/test/compiler/ts/instanceof_6-expected.txt index f785f7d9fc7bedcc5b975fbf2658e4c1d8a2dc1b..12d7903841afbf15a2295107ab8a7a2714b25bce 100644 --- a/es2panda/test/compiler/ts/instanceof_6-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_6-expected.txt @@ -13,11 +13,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -70,48 +70,47 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "right": { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -128,11 +127,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -140,11 +139,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -152,11 +151,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -165,11 +164,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -185,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -200,33 +199,33 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 14 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -238,9 +237,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_6.ts:4:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_6.ts:20:1] diff --git a/es2panda/test/compiler/ts/instanceof_7-expected.txt b/es2panda/test/compiler/ts/instanceof_7-expected.txt index dee9711b6b60d2b66c0c7f7bb009c9891b5072de..6d5e0fd81536a35853daf5b6ebe6936155943b38 100644 --- a/es2panda/test/compiler/ts/instanceof_7-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_7-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -71,11 +71,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -181,9 +181,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_7.ts:3:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_7.ts:19:1] diff --git a/es2panda/test/compiler/ts/instanceof_8-expected.txt b/es2panda/test/compiler/ts/instanceof_8-expected.txt index 884d8c37d86a5538b9b6a97f503921ab25812e2f..6c81e131a6a8df3290dee7167675972d692d7c60 100644 --- a/es2panda/test/compiler/ts/instanceof_8-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_8-expected.txt @@ -13,11 +13,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -84,33 +84,33 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -127,11 +127,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -139,11 +139,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -151,11 +151,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -164,11 +164,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -199,33 +199,33 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 14 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -237,9 +237,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_8.ts:4:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_8.ts:20:1] diff --git a/es2panda/test/compiler/ts/instanceof_9-expected.txt b/es2panda/test/compiler/ts/instanceof_9-expected.txt index f67637355c888a0ab4ca1ccc92e736293d7f858a..f4de34aa1aff764b2258dfd4c5a56b53ee030854 100644 --- a/es2panda/test/compiler/ts/instanceof_9-expected.txt +++ b/es2panda/test/compiler/ts/instanceof_9-expected.txt @@ -18,11 +18,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -44,11 +44,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -57,11 +57,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -69,22 +69,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -92,11 +92,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -104,11 +104,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -117,11 +117,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -138,11 +138,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -150,11 +150,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -162,11 +162,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -175,11 +175,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -195,11 +195,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -210,33 +210,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -248,9 +248,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_9.ts:3:1] +TypeError: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. [instanceof_9.ts:19:1] diff --git a/es2panda/test/compiler/ts/interfaceAssignment-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment-expected.txt index 8b21ccb0887a79bdac3a834760cfcd3ab72d7d82..8aa74554e232735624da7cc6a6e1e48188a9132f 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -74,22 +74,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -118,22 +118,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -141,11 +141,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -168,11 +168,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -193,22 +193,22 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 9 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 9 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -239,11 +239,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 14 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -253,11 +253,11 @@ "value": 1, "loc": { "start": { - "line": 7, + "line": 23, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -265,11 +265,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 14 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -285,25 +285,25 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 20 }, "end": { - "line": 7, + "line": 23, "column": 21 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 7, + "line": 23, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 28 } } @@ -311,11 +311,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 20 }, "end": { - "line": 7, + "line": 23, "column": 28 } } @@ -331,11 +331,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 30 }, "end": { - "line": 7, + "line": 23, "column": 31 } } @@ -345,11 +345,11 @@ "value": true, "loc": { "start": { - "line": 7, + "line": 23, "column": 33 }, "end": { - "line": 7, + "line": 23, "column": 37 } } @@ -357,11 +357,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 30 }, "end": { - "line": 7, + "line": 23, "column": 37 } } @@ -369,22 +369,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 39 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 39 } } @@ -393,11 +393,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 40 } } @@ -417,11 +417,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -434,11 +434,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 16 } } @@ -446,11 +446,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 7 }, "end": { - "line": 10, + "line": 26, "column": 8 } } @@ -462,11 +462,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 21 }, "end": { - "line": 10, + "line": 26, "column": 27 } } @@ -474,11 +474,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 18 }, "end": { - "line": 10, + "line": 26, "column": 19 } } @@ -490,33 +490,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 30 }, "end": { - "line": 10, + "line": 26, "column": 36 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 30 }, "end": { - "line": 10, + "line": 26, "column": 38 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 39 } } @@ -524,11 +524,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -539,11 +539,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 11 }, "end": { - "line": 9, + "line": 25, "column": 12 } } @@ -552,27 +552,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 21 + }, + "end": { + "line": 25, + "column": 22 + } + } + }, "loc": { "start": { - "line": 9, - "column": 21 + "line": 25, + "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 22 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 22 } } @@ -580,11 +593,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -605,22 +618,22 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 9 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 9 } } @@ -628,11 +641,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -651,11 +664,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -665,11 +678,11 @@ "value": 2, "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 9 } } @@ -677,11 +690,11 @@ "kind": "init", "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 9 } } @@ -697,25 +710,25 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 12 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 14, + "line": 30, "column": 14 }, "end": { - "line": 14, + "line": 30, "column": 19 } } @@ -723,11 +736,11 @@ "kind": "init", "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 19 } } @@ -743,11 +756,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 21 }, "end": { - "line": 14, + "line": 30, "column": 22 } } @@ -757,11 +770,11 @@ "value": false, "loc": { "start": { - "line": 14, + "line": 30, "column": 24 }, "end": { - "line": 14, + "line": 30, "column": 29 } } @@ -769,11 +782,11 @@ "kind": "init", "loc": { "start": { - "line": 14, + "line": 30, "column": 21 }, "end": { - "line": 14, + "line": 30, "column": 29 } } @@ -789,11 +802,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 31 }, "end": { - "line": 14, + "line": 30, "column": 32 } } @@ -814,11 +827,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 47 }, "end": { - "line": 14, + "line": 30, "column": 53 } } @@ -826,11 +839,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 44 }, "end": { - "line": 14, + "line": 30, "column": 45 } } @@ -842,11 +855,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 58 }, "end": { - "line": 14, + "line": 30, "column": 64 } } @@ -854,11 +867,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 55 }, "end": { - "line": 14, + "line": 30, "column": 56 } } @@ -877,11 +890,11 @@ "value": 1, "loc": { "start": { - "line": 15, + "line": 31, "column": 17 }, "end": { - "line": 15, + "line": 31, "column": 18 } } @@ -891,11 +904,11 @@ "value": 2, "loc": { "start": { - "line": 15, + "line": 31, "column": 20 }, "end": { - "line": 15, + "line": 31, "column": 21 } } @@ -903,22 +916,22 @@ ], "loc": { "start": { - "line": 15, + "line": 31, "column": 16 }, "end": { - "line": 15, + "line": 31, "column": 22 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 23 } } @@ -926,33 +939,33 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 66 }, "end": { - "line": 16, + "line": 32, "column": 6 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 34 }, "end": { - "line": 16, + "line": 32, "column": 6 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 34 }, "end": { - "line": 16, + "line": 32, "column": 6 } } @@ -960,11 +973,11 @@ "kind": "init", "loc": { "start": { - "line": 14, + "line": 30, "column": 31 }, "end": { - "line": 16, + "line": 32, "column": 6 } } @@ -972,22 +985,22 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 12 }, "end": { - "line": 17, + "line": 33, "column": 2 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 2 } } @@ -996,11 +1009,11 @@ "kind": "var", "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 2 } } @@ -1020,11 +1033,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 9 }, "end": { - "line": 21, + "line": 37, "column": 15 } } @@ -1032,11 +1045,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 6 }, "end": { - "line": 21, + "line": 37, "column": 7 } } @@ -1048,11 +1061,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 20 }, "end": { - "line": 21, + "line": 37, "column": 26 } } @@ -1060,11 +1073,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 17 }, "end": { - "line": 21, + "line": 37, "column": 18 } } @@ -1074,22 +1087,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 29 }, "end": { - "line": 21, + "line": 37, "column": 35 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 36 } } @@ -1097,11 +1110,11 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 14 }, "end": { - "line": 22, + "line": 38, "column": 2 } } @@ -1112,11 +1125,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 11 }, "end": { - "line": 20, + "line": 36, "column": 13 } } @@ -1124,11 +1137,11 @@ "extends": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 2 } } @@ -1148,11 +1161,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 9 }, "end": { - "line": 25, + "line": 41, "column": 15 } } @@ -1160,11 +1173,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 6 }, "end": { - "line": 25, + "line": 41, "column": 7 } } @@ -1176,11 +1189,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 20 }, "end": { - "line": 25, + "line": 41, "column": 26 } } @@ -1188,11 +1201,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 17 }, "end": { - "line": 25, + "line": 41, "column": 18 } } @@ -1202,22 +1215,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 29 }, "end": { - "line": 25, + "line": 41, "column": 35 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 36 } } @@ -1232,11 +1245,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 26, + "line": 42, "column": 9 }, "end": { - "line": 26, + "line": 42, "column": 15 } } @@ -1244,11 +1257,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 6 }, "end": { - "line": 26, + "line": 42, "column": 7 } } @@ -1260,11 +1273,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 26, + "line": 42, "column": 20 }, "end": { - "line": 26, + "line": 42, "column": 26 } } @@ -1272,11 +1285,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 17 }, "end": { - "line": 26, + "line": 42, "column": 18 } } @@ -1286,22 +1299,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 26, + "line": 42, "column": 29 }, "end": { - "line": 26, + "line": 42, "column": 35 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 26, + "line": 42, "column": 36 } } @@ -1316,11 +1329,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 27, + "line": 43, "column": 9 }, "end": { - "line": 27, + "line": 43, "column": 15 } } @@ -1328,11 +1341,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 6 }, "end": { - "line": 27, + "line": 43, "column": 7 } } @@ -1344,11 +1357,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 27, + "line": 43, "column": 20 }, "end": { - "line": 27, + "line": 43, "column": 26 } } @@ -1356,11 +1369,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 17 }, "end": { - "line": 27, + "line": 43, "column": 18 } } @@ -1370,22 +1383,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 27, + "line": 43, "column": 29 }, "end": { - "line": 27, + "line": 43, "column": 35 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 5 }, "end": { - "line": 27, + "line": 43, "column": 36 } } @@ -1393,11 +1406,11 @@ ], "loc": { "start": { - "line": 24, + "line": 40, "column": 14 }, "end": { - "line": 28, + "line": 44, "column": 2 } } @@ -1408,11 +1421,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 11 }, "end": { - "line": 24, + "line": 40, "column": 13 } } @@ -1420,11 +1433,11 @@ "extends": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 28, + "line": 44, "column": 2 } } @@ -1444,11 +1457,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 9 }, "end": { - "line": 31, + "line": 47, "column": 15 } } @@ -1456,11 +1469,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 6 }, "end": { - "line": 31, + "line": 47, "column": 7 } } @@ -1472,11 +1485,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 20 }, "end": { - "line": 31, + "line": 47, "column": 26 } } @@ -1484,11 +1497,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 17 }, "end": { - "line": 31, + "line": 47, "column": 18 } } @@ -1498,22 +1511,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 29 }, "end": { - "line": 31, + "line": 47, "column": 35 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 5 }, "end": { - "line": 31, + "line": 47, "column": 36 } } @@ -1528,11 +1541,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 9 }, "end": { - "line": 32, + "line": 48, "column": 15 } } @@ -1540,11 +1553,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 6 }, "end": { - "line": 32, + "line": 48, "column": 7 } } @@ -1556,11 +1569,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 20 }, "end": { - "line": 32, + "line": 48, "column": 26 } } @@ -1568,11 +1581,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 17 }, "end": { - "line": 32, + "line": 48, "column": 18 } } @@ -1582,22 +1595,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 29 }, "end": { - "line": 32, + "line": 48, "column": 35 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 5 }, "end": { - "line": 32, + "line": 48, "column": 36 } } @@ -1605,11 +1618,11 @@ ], "loc": { "start": { - "line": 30, + "line": 46, "column": 25 }, "end": { - "line": 33, + "line": 49, "column": 2 } } @@ -1620,11 +1633,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 11 }, "end": { - "line": 30, + "line": 46, "column": 13 } } @@ -1633,27 +1646,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "C1", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "C1", + "decorators": [], + "loc": { + "start": { + "line": 46, + "column": 22 + }, + "end": { + "line": 46, + "column": 24 + } + } + }, "loc": { "start": { - "line": 30, - "column": 22 + "line": 46, + "column": 25 }, "end": { - "line": 30, + "line": 46, "column": 24 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 25 }, "end": { - "line": 30, + "line": 46, "column": 24 } } @@ -1661,11 +1687,11 @@ ], "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 33, + "line": 49, "column": 2 } } @@ -1686,22 +1712,22 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 8 }, "end": { - "line": 35, + "line": 51, "column": 10 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 8 }, "end": { - "line": 35, + "line": 51, "column": 10 } } @@ -1709,11 +1735,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 6 } } @@ -1721,11 +1747,11 @@ "init": null, "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 6 } } @@ -1734,11 +1760,11 @@ "kind": "var", "loc": { "start": { - "line": 35, + "line": 51, "column": 1 }, "end": { - "line": 35, + "line": 51, "column": 11 } } @@ -1759,22 +1785,22 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 8 }, "end": { - "line": 36, + "line": 52, "column": 10 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 8 }, "end": { - "line": 36, + "line": 52, "column": 10 } } @@ -1782,11 +1808,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 5 }, "end": { - "line": 36, + "line": 52, "column": 6 } } @@ -1794,11 +1820,11 @@ "init": null, "loc": { "start": { - "line": 36, + "line": 52, "column": 5 }, "end": { - "line": 36, + "line": 52, "column": 6 } } @@ -1807,11 +1833,11 @@ "kind": "var", "loc": { "start": { - "line": 36, + "line": 52, "column": 1 }, "end": { - "line": 36, + "line": 52, "column": 11 } } @@ -1832,11 +1858,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 5 }, "end": { - "line": 39, + "line": 55, "column": 6 } } @@ -1847,33 +1873,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 39, + "line": 55, "column": 8 }, "end": { - "line": 39, + "line": 55, "column": 14 } } }, "loc": { "start": { - "line": 39, + "line": 55, "column": 8 }, "end": { - "line": 39, + "line": 55, "column": 16 } } }, "loc": { "start": { - "line": 39, + "line": 55, "column": 5 }, "end": { - "line": 40, + "line": 56, "column": 2 } } @@ -1881,11 +1907,11 @@ ], "loc": { "start": { - "line": 38, + "line": 54, "column": 29 }, "end": { - "line": 40, + "line": 56, "column": 2 } } @@ -1896,11 +1922,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 11 }, "end": { - "line": 38, + "line": 54, "column": 13 } } @@ -1909,27 +1935,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "D3", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "D3", + "decorators": [], + "loc": { + "start": { + "line": 54, + "column": 22 + }, + "end": { + "line": 54, + "column": 24 + } + } + }, "loc": { "start": { - "line": 38, - "column": 22 + "line": 54, + "column": 24 }, "end": { - "line": 38, + "line": 54, "column": 24 } } }, "loc": { "start": { - "line": 38, + "line": 54, "column": 24 }, "end": { - "line": 38, + "line": 54, "column": 24 } } @@ -1937,27 +1976,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "D2", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "D2", + "decorators": [], + "loc": { + "start": { + "line": 54, + "column": 26 + }, + "end": { + "line": 54, + "column": 28 + } + } + }, "loc": { "start": { - "line": 38, - "column": 26 + "line": 54, + "column": 29 }, "end": { - "line": 38, + "line": 54, "column": 28 } } }, "loc": { "start": { - "line": 38, + "line": 54, "column": 29 }, "end": { - "line": 38, + "line": 54, "column": 28 } } @@ -1965,11 +2017,11 @@ ], "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 2 } } @@ -1990,11 +2042,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 5 }, "end": { - "line": 43, + "line": 59, "column": 6 } } @@ -2003,22 +2055,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 43, + "line": 59, "column": 8 }, "end": { - "line": 43, + "line": 59, "column": 14 } } }, "loc": { "start": { - "line": 43, + "line": 59, "column": 5 }, "end": { - "line": 44, + "line": 60, "column": 2 } } @@ -2026,11 +2078,11 @@ ], "loc": { "start": { - "line": 42, + "line": 58, "column": 14 }, "end": { - "line": 44, + "line": 60, "column": 2 } } @@ -2041,11 +2093,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 11 }, "end": { - "line": 42, + "line": 58, "column": 13 } } @@ -2053,11 +2105,11 @@ "extends": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 44, + "line": 60, "column": 2 } } @@ -2078,11 +2130,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 5 }, "end": { - "line": 47, + "line": 63, "column": 6 } } @@ -2091,22 +2143,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 47, + "line": 63, "column": 8 }, "end": { - "line": 47, + "line": 63, "column": 14 } } }, "loc": { "start": { - "line": 47, + "line": 63, "column": 5 }, "end": { - "line": 47, + "line": 63, "column": 15 } } @@ -2114,11 +2166,11 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 14 }, "end": { - "line": 48, + "line": 64, "column": 2 } } @@ -2129,11 +2181,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 11 }, "end": { - "line": 46, + "line": 62, "column": 13 } } @@ -2141,11 +2193,11 @@ "extends": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 2 } } @@ -2166,11 +2218,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 5 }, "end": { - "line": 51, + "line": 67, "column": 6 } } @@ -2179,22 +2231,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 51, + "line": 67, "column": 8 }, "end": { - "line": 51, + "line": 67, "column": 14 } } }, "loc": { "start": { - "line": 51, + "line": 67, "column": 5 }, "end": { - "line": 51, + "line": 67, "column": 15 } } @@ -2202,11 +2254,11 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 25 }, "end": { - "line": 52, + "line": 68, "column": 2 } } @@ -2217,11 +2269,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 11 }, "end": { - "line": 50, + "line": 66, "column": 13 } } @@ -2230,27 +2282,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "D1", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "D1", + "decorators": [], + "loc": { + "start": { + "line": 66, + "column": 22 + }, + "end": { + "line": 66, + "column": 24 + } + } + }, "loc": { "start": { - "line": 50, - "column": 22 + "line": 66, + "column": 25 }, "end": { - "line": 50, + "line": 66, "column": 24 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 25 }, "end": { - "line": 50, + "line": 66, "column": 24 } } @@ -2258,11 +2323,11 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 1 }, "end": { - "line": 52, + "line": 68, "column": 2 } } @@ -2283,11 +2348,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 6 } } @@ -2299,11 +2364,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 55, + "line": 71, "column": 9 }, "end": { - "line": 55, + "line": 71, "column": 16 } } @@ -2312,11 +2377,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 55, + "line": 71, "column": 17 }, "end": { - "line": 55, + "line": 71, "column": 24 } } @@ -2324,22 +2389,22 @@ ], "loc": { "start": { - "line": 55, + "line": 71, "column": 8 }, "end": { - "line": 55, + "line": 71, "column": 24 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 25 } } @@ -2347,11 +2412,11 @@ ], "loc": { "start": { - "line": 54, + "line": 70, "column": 33 }, "end": { - "line": 56, + "line": 72, "column": 2 } } @@ -2362,11 +2427,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 11 }, "end": { - "line": 54, + "line": 70, "column": 13 } } @@ -2375,27 +2440,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "D4", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "D4", + "decorators": [], + "loc": { + "start": { + "line": 70, + "column": 22 + }, + "end": { + "line": 70, + "column": 24 + } + } + }, "loc": { "start": { - "line": 54, - "column": 22 + "line": 70, + "column": 24 }, "end": { - "line": 54, + "line": 70, "column": 24 } } }, "loc": { "start": { - "line": 54, + "line": 70, "column": 24 }, "end": { - "line": 54, + "line": 70, "column": 24 } } @@ -2403,27 +2481,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "D1", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "D1", + "decorators": [], + "loc": { + "start": { + "line": 70, + "column": 26 + }, + "end": { + "line": 70, + "column": 28 + } + } + }, "loc": { "start": { - "line": 54, - "column": 26 + "line": 70, + "column": 28 }, "end": { - "line": 54, + "line": 70, "column": 28 } } }, "loc": { "start": { - "line": 54, + "line": 70, "column": 28 }, "end": { - "line": 54, + "line": 70, "column": 28 } } @@ -2431,27 +2522,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "D3", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "D3", + "decorators": [], + "loc": { + "start": { + "line": 70, + "column": 30 + }, + "end": { + "line": 70, + "column": 32 + } + } + }, "loc": { "start": { - "line": 54, - "column": 30 + "line": 70, + "column": 33 }, "end": { - "line": 54, + "line": 70, "column": 32 } } }, "loc": { "start": { - "line": 54, + "line": 70, "column": 33 }, "end": { - "line": 54, + "line": 70, "column": 32 } } @@ -2459,11 +2563,11 @@ ], "loc": { "start": { - "line": 54, + "line": 70, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 2 } } @@ -2484,22 +2588,22 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 8 }, "end": { - "line": 58, + "line": 74, "column": 10 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 8 }, "end": { - "line": 58, + "line": 74, "column": 10 } } @@ -2507,11 +2611,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 6 } } @@ -2530,11 +2634,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 15 }, "end": { - "line": 58, + "line": 74, "column": 16 } } @@ -2544,11 +2648,11 @@ "value": 2, "loc": { "start": { - "line": 58, + "line": 74, "column": 18 }, "end": { - "line": 58, + "line": 74, "column": 19 } } @@ -2556,11 +2660,11 @@ "kind": "init", "loc": { "start": { - "line": 58, + "line": 74, "column": 15 }, "end": { - "line": 58, + "line": 74, "column": 19 } } @@ -2576,11 +2680,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 21 }, "end": { - "line": 58, + "line": 74, "column": 22 } } @@ -2590,11 +2694,11 @@ "value": 3, "loc": { "start": { - "line": 58, + "line": 74, "column": 24 }, "end": { - "line": 58, + "line": 74, "column": 25 } } @@ -2602,11 +2706,11 @@ "kind": "init", "loc": { "start": { - "line": 58, + "line": 74, "column": 21 }, "end": { - "line": 58, + "line": 74, "column": 25 } } @@ -2622,25 +2726,25 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 27 }, "end": { - "line": 58, + "line": 74, "column": 28 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 58, + "line": 74, "column": 30 }, "end": { - "line": 58, + "line": 74, "column": 35 } } @@ -2648,11 +2752,11 @@ "kind": "init", "loc": { "start": { - "line": 58, + "line": 74, "column": 27 }, "end": { - "line": 58, + "line": 74, "column": 35 } } @@ -2668,11 +2772,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 37 }, "end": { - "line": 58, + "line": 74, "column": 38 } } @@ -2682,42 +2786,42 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 58, + "line": 74, "column": 41 }, "end": { - "line": 58, + "line": 74, "column": 46 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 58, + "line": 74, "column": 48 }, "end": { - "line": 58, + "line": 74, "column": 53 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 58, + "line": 74, "column": 55 }, "end": { - "line": 58, + "line": 74, "column": 60 } } @@ -2725,11 +2829,11 @@ ], "loc": { "start": { - "line": 58, + "line": 74, "column": 40 }, "end": { - "line": 58, + "line": 74, "column": 61 } } @@ -2737,11 +2841,11 @@ "kind": "init", "loc": { "start": { - "line": 58, + "line": 74, "column": 37 }, "end": { - "line": 58, + "line": 74, "column": 61 } } @@ -2757,11 +2861,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 63 }, "end": { - "line": 58, + "line": 74, "column": 64 } } @@ -2774,25 +2878,25 @@ "value": 1, "loc": { "start": { - "line": 58, + "line": 74, "column": 67 }, "end": { - "line": 58, + "line": 74, "column": 68 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 58, + "line": 74, "column": 70 }, "end": { - "line": 58, + "line": 74, "column": 75 } } @@ -2800,11 +2904,11 @@ ], "loc": { "start": { - "line": 58, + "line": 74, "column": 66 }, "end": { - "line": 58, + "line": 74, "column": 76 } } @@ -2812,11 +2916,11 @@ "kind": "init", "loc": { "start": { - "line": 58, + "line": 74, "column": 63 }, "end": { - "line": 58, + "line": 74, "column": 76 } } @@ -2824,22 +2928,22 @@ ], "loc": { "start": { - "line": 58, + "line": 74, "column": 13 }, "end": { - "line": 58, + "line": 74, "column": 78 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 78 } } @@ -2848,11 +2952,11 @@ "kind": "var", "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 78 } } @@ -2873,11 +2977,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 5 }, "end": { - "line": 61, + "line": 77, "column": 6 } } @@ -2886,22 +2990,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 61, + "line": 77, "column": 8 }, "end": { - "line": 61, + "line": 77, "column": 14 } } }, "loc": { "start": { - "line": 61, + "line": 77, "column": 5 }, "end": { - "line": 61, + "line": 77, "column": 15 } } @@ -2909,11 +3013,11 @@ ], "loc": { "start": { - "line": 60, + "line": 76, "column": 13 }, "end": { - "line": 62, + "line": 78, "column": 2 } } @@ -2924,11 +3028,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 11 }, "end": { - "line": 60, + "line": 76, "column": 12 } } @@ -2936,11 +3040,11 @@ "extends": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 2 } } @@ -2961,11 +3065,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 5 }, "end": { - "line": 65, + "line": 81, "column": 6 } } @@ -2974,22 +3078,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 65, + "line": 81, "column": 8 }, "end": { - "line": 65, + "line": 81, "column": 14 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 5 }, "end": { - "line": 65, + "line": 81, "column": 15 } } @@ -2997,11 +3101,11 @@ ], "loc": { "start": { - "line": 64, + "line": 80, "column": 13 }, "end": { - "line": 66, + "line": 82, "column": 2 } } @@ -3012,11 +3116,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 11 }, "end": { - "line": 64, + "line": 80, "column": 12 } } @@ -3024,11 +3128,11 @@ "extends": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 66, + "line": 82, "column": 2 } } @@ -3049,11 +3153,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 69, + "line": 85, "column": 6 } } @@ -3068,11 +3172,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 69, + "line": 85, "column": 12 }, "end": { - "line": 69, + "line": 85, "column": 18 } } @@ -3080,11 +3184,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 9 }, "end": { - "line": 69, + "line": 85, "column": 10 } } @@ -3096,11 +3200,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 69, + "line": 85, "column": 23 }, "end": { - "line": 69, + "line": 85, "column": 29 } } @@ -3108,11 +3212,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 20 }, "end": { - "line": 69, + "line": 85, "column": 21 } } @@ -3123,33 +3227,33 @@ "members": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 34 }, "end": { - "line": 69, + "line": 85, "column": 36 } } }, "loc": { "start": { - "line": 69, + "line": 85, "column": 8 }, "end": { - "line": 69, + "line": 85, "column": 36 } } }, "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 70, + "line": 86, "column": 2 } } @@ -3157,11 +3261,11 @@ ], "loc": { "start": { - "line": 68, + "line": 84, "column": 13 }, "end": { - "line": 70, + "line": 86, "column": 2 } } @@ -3172,11 +3276,11 @@ "decorators": [], "loc": { "start": { - "line": 68, + "line": 84, "column": 11 }, "end": { - "line": 68, + "line": 84, "column": 12 } } @@ -3184,11 +3288,11 @@ "extends": [], "loc": { "start": { - "line": 68, + "line": 84, "column": 1 }, "end": { - "line": 70, + "line": 86, "column": 2 } } @@ -3209,22 +3313,22 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 8 }, "end": { - "line": 72, + "line": 88, "column": 9 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 8 }, "end": { - "line": 72, + "line": 88, "column": 9 } } @@ -3232,11 +3336,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 5 }, "end": { - "line": 72, + "line": 88, "column": 6 } } @@ -3255,11 +3359,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 14 }, "end": { - "line": 72, + "line": 88, "column": 15 } } @@ -3269,11 +3373,11 @@ "value": 1, "loc": { "start": { - "line": 72, + "line": 88, "column": 17 }, "end": { - "line": 72, + "line": 88, "column": 18 } } @@ -3281,11 +3385,11 @@ "kind": "init", "loc": { "start": { - "line": 72, + "line": 88, "column": 14 }, "end": { - "line": 72, + "line": 88, "column": 18 } } @@ -3301,25 +3405,25 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 20 }, "end": { - "line": 72, + "line": 88, "column": 21 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 72, + "line": 88, "column": 23 }, "end": { - "line": 72, + "line": 88, "column": 28 } } @@ -3327,11 +3431,11 @@ "kind": "init", "loc": { "start": { - "line": 72, + "line": 88, "column": 20 }, "end": { - "line": 72, + "line": 88, "column": 28 } } @@ -3347,11 +3451,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 30 }, "end": { - "line": 72, + "line": 88, "column": 31 } } @@ -3368,14 +3472,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 88, + "column": 46 + }, + "end": { + "line": 88, + "column": 52 + } + } + }, "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 43 }, "end": { - "line": 72, + "line": 88, "column": 44 } } @@ -3383,15 +3500,28 @@ { "type": "Identifier", "name": "b", + "typeAnnotation": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 88, + "column": 57 + }, + "end": { + "line": 88, + "column": 63 + } + } + }, "decorators": [], "loc": { "start": { - "line": 72, - "column": 46 + "line": 88, + "column": 54 }, "end": { - "line": 72, - "column": 47 + "line": 88, + "column": 55 } } } @@ -3406,92 +3536,92 @@ "properties": [], "loc": { "start": { - "line": 72, - "column": 58 + "line": 88, + "column": 74 }, "end": { - "line": 72, - "column": 60 + "line": 88, + "column": 76 } } }, "loc": { "start": { - "line": 72, - "column": 51 + "line": 88, + "column": 67 }, "end": { - "line": 72, - "column": 60 + "line": 88, + "column": 76 } } } ], "loc": { "start": { - "line": 72, - "column": 49 + "line": 88, + "column": 65 }, "end": { - "line": 72, - "column": 62 + "line": 88, + "column": 78 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 33 }, "end": { - "line": 72, - "column": 62 + "line": 88, + "column": 78 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 33 }, "end": { - "line": 72, - "column": 62 + "line": 88, + "column": 78 } } }, "kind": "init", "loc": { "start": { - "line": 72, + "line": 88, "column": 30 }, "end": { - "line": 72, - "column": 62 + "line": 88, + "column": 78 } } } ], "loc": { "start": { - "line": 72, + "line": 88, "column": 12 }, "end": { - "line": 72, - "column": 64 + "line": 88, + "column": 80 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 5 }, "end": { - "line": 72, - "column": 64 + "line": 88, + "column": 80 } } } @@ -3499,12 +3629,12 @@ "kind": "var", "loc": { "start": { - "line": 72, + "line": 88, "column": 1 }, "end": { - "line": 72, - "column": 64 + "line": 88, + "column": 80 } } }, @@ -3522,11 +3652,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 75, + "line": 91, "column": 9 }, "end": { - "line": 75, + "line": 91, "column": 15 } } @@ -3534,11 +3664,11 @@ "decorators": [], "loc": { "start": { - "line": 75, + "line": 91, "column": 6 }, "end": { - "line": 75, + "line": 91, "column": 7 } } @@ -3547,11 +3677,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 75, + "line": 91, "column": 18 }, "end": { - "line": 75, + "line": 91, "column": 24 } } @@ -3559,11 +3689,11 @@ "readonly": false, "loc": { "start": { - "line": 75, + "line": 91, "column": 5 }, "end": { - "line": 75, + "line": 91, "column": 25 } } @@ -3577,11 +3707,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 76, + "line": 92, "column": 9 }, "end": { - "line": 76, + "line": 92, "column": 15 } } @@ -3589,11 +3719,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 6 }, "end": { - "line": 76, + "line": 92, "column": 7 } } @@ -3605,11 +3735,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 76, + "line": 92, "column": 18 }, "end": { - "line": 76, + "line": 92, "column": 24 } } @@ -3618,11 +3748,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 76, + "line": 92, "column": 27 }, "end": { - "line": 76, + "line": 92, "column": 33 } } @@ -3630,11 +3760,11 @@ ], "loc": { "start": { - "line": 76, + "line": 92, "column": 18 }, "end": { - "line": 76, + "line": 92, "column": 33 } } @@ -3642,11 +3772,11 @@ "readonly": false, "loc": { "start": { - "line": 76, + "line": 92, "column": 5 }, "end": { - "line": 77, + "line": 93, "column": 2 } } @@ -3654,11 +3784,11 @@ ], "loc": { "start": { - "line": 74, + "line": 90, "column": 13 }, "end": { - "line": 77, + "line": 93, "column": 2 } } @@ -3669,11 +3799,11 @@ "decorators": [], "loc": { "start": { - "line": 74, + "line": 90, "column": 11 }, "end": { - "line": 74, + "line": 90, "column": 12 } } @@ -3681,11 +3811,11 @@ "extends": [], "loc": { "start": { - "line": 74, + "line": 90, "column": 1 }, "end": { - "line": 77, + "line": 93, "column": 2 } } @@ -3706,22 +3836,22 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 95, "column": 8 }, "end": { - "line": 79, + "line": 95, "column": 9 } } }, "loc": { "start": { - "line": 79, + "line": 95, "column": 8 }, "end": { - "line": 79, + "line": 95, "column": 9 } } @@ -3729,11 +3859,11 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 95, "column": 5 }, "end": { - "line": 79, + "line": 95, "column": 6 } } @@ -3751,25 +3881,25 @@ "value": 5, "loc": { "start": { - "line": 79, + "line": 95, "column": 14 }, "end": { - "line": 79, + "line": 95, "column": 15 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 79, + "line": 95, "column": 17 }, "end": { - "line": 79, + "line": 95, "column": 22 } } @@ -3777,11 +3907,11 @@ "kind": "init", "loc": { "start": { - "line": 79, + "line": 95, "column": 14 }, "end": { - "line": 79, + "line": 95, "column": 22 } } @@ -3796,25 +3926,25 @@ "value": 6, "loc": { "start": { - "line": 79, + "line": 95, "column": 24 }, "end": { - "line": 79, + "line": 95, "column": 25 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 79, + "line": 95, "column": 27 }, "end": { - "line": 79, + "line": 95, "column": 32 } } @@ -3822,11 +3952,11 @@ "kind": "init", "loc": { "start": { - "line": 79, + "line": 95, "column": 24 }, "end": { - "line": 79, + "line": 95, "column": 32 } } @@ -3842,11 +3972,11 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 95, "column": 34 }, "end": { - "line": 79, + "line": 95, "column": 35 } } @@ -3856,11 +3986,11 @@ "value": 1, "loc": { "start": { - "line": 79, + "line": 95, "column": 37 }, "end": { - "line": 79, + "line": 95, "column": 38 } } @@ -3868,11 +3998,11 @@ "kind": "init", "loc": { "start": { - "line": 79, + "line": 95, "column": 34 }, "end": { - "line": 79, + "line": 95, "column": 38 } } @@ -3888,25 +4018,25 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 95, "column": 40 }, "end": { - "line": 79, + "line": 95, "column": 41 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 79, + "line": 95, "column": 43 }, "end": { - "line": 79, + "line": 95, "column": 48 } } @@ -3914,11 +4044,11 @@ "kind": "init", "loc": { "start": { - "line": 79, + "line": 95, "column": 40 }, "end": { - "line": 79, + "line": 95, "column": 48 } } @@ -3926,22 +4056,22 @@ ], "loc": { "start": { - "line": 79, + "line": 95, "column": 12 }, "end": { - "line": 79, + "line": 95, "column": 50 } } }, "loc": { "start": { - "line": 79, + "line": 95, "column": 5 }, "end": { - "line": 79, + "line": 95, "column": 50 } } @@ -3950,11 +4080,11 @@ "kind": "var", "loc": { "start": { - "line": 79, + "line": 95, "column": 1 }, "end": { - "line": 79, + "line": 95, "column": 51 } } @@ -3966,7 +4096,7 @@ "column": 1 }, "end": { - "line": 81, + "line": 97, "column": 1 } } diff --git a/es2panda/test/compiler/ts/interfaceAssignment.ts b/es2panda/test/compiler/ts/interfaceAssignment.ts index d36ad749d69ad596120c23126c674cd067ee1717..0111820944e782d28a1ed591d855bb0e54e0908d 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment.ts +++ b/es2panda/test/compiler/ts/interfaceAssignment.ts @@ -85,7 +85,7 @@ interface E { d: (a: number, b: string) => {} } -var e: E = { a: 1, b: "foo", d: function (a, b) { return {} } } +var e: E = { a: 1, b: "foo", d: function (a: number, b: string) { return {} } } interface F { [x: number]: string, diff --git a/es2panda/test/compiler/ts/interfaceAssignment1-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment1-expected.txt index c4680f0f7864c9d85c350af02d8da5aac52a50c5..95da2f4d0cda51b2a7bd2ba2b7abaf6a8ea8d96b 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment1-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment1-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -105,22 +105,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 9 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -151,11 +151,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 14 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -165,11 +165,11 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -177,11 +177,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 14 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -189,22 +189,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 20 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 20 } } @@ -213,11 +213,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 21 } } @@ -238,11 +238,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -251,22 +251,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 14 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 15 } } @@ -274,11 +274,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -289,11 +289,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 11 }, "end": { - "line": 7, + "line": 23, "column": 12 } } @@ -301,11 +301,11 @@ "extends": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -317,9 +317,9 @@ "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 1 } } } -TypeError: Type '{ a: number; }' is not assignable to type 'A'. [interfaceAssignment1.ts:5:5] +TypeError: Type '{ a: 5; }' is not assignable to type 'A'. [interfaceAssignment1.ts:21:5] diff --git a/es2panda/test/compiler/ts/interfaceAssignment2-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment2-expected.txt index 497077c31190f627d6d3160a10644fb141c9f6f7..5b5bc961dfa15e224b53a70ebfe4cac9b72fe443 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment2-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment2-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -74,22 +74,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -97,11 +97,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -124,11 +124,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -149,11 +149,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -162,22 +162,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -193,11 +193,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -206,22 +206,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 14 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 15 } } @@ -229,11 +229,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -244,11 +244,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -256,11 +256,11 @@ "extends": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -281,22 +281,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 9 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 9 } } @@ -304,11 +304,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -316,11 +316,11 @@ "init": null, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -329,11 +329,11 @@ "kind": "var", "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 10 } } @@ -354,22 +354,22 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 8 }, "end": { - "line": 12, + "line": 28, "column": 9 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 8 }, "end": { - "line": 12, + "line": 28, "column": 9 } } @@ -377,11 +377,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -389,11 +389,11 @@ "init": null, "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -402,11 +402,11 @@ "kind": "var", "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 10 } } @@ -422,11 +422,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 2 } } @@ -437,33 +437,33 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 6 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 7 } } @@ -475,9 +475,9 @@ "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 7 } } } -TypeError: Type 'B' is not assignable to type 'A'. [interfaceAssignment2.ts:14:1] +TypeError: Type 'B' is not assignable to type 'A'. [interfaceAssignment2.ts:30:1] diff --git a/es2panda/test/compiler/ts/interfaceAssignment3-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment3-expected.txt index 59a2b706e0ac9956e4d6154a4175520127af415f..5df9b64a64d6c90b91ffcd2ecdafbc5d943f3b84 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment3-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment3-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -118,22 +118,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -141,11 +141,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -169,27 +169,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, "loc": { "start": { - "line": 5, - "column": 21 + "line": 21, + "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -197,11 +210,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -222,11 +235,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -235,22 +248,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 14 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -258,11 +271,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -273,11 +286,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 11 }, "end": { - "line": 9, + "line": 25, "column": 12 } } @@ -286,27 +299,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 21 + }, + "end": { + "line": 25, + "column": 22 + } + } + }, "loc": { "start": { - "line": 9, - "column": 21 + "line": 25, + "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 22 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 22 } } @@ -314,11 +340,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -339,11 +365,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -355,11 +381,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 9 }, "end": { - "line": 14, + "line": 30, "column": 16 } } @@ -368,11 +394,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 17 }, "end": { - "line": 14, + "line": 30, "column": 24 } } @@ -380,22 +406,22 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 24 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 25 } } @@ -403,11 +429,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 26 }, "end": { - "line": 15, + "line": 31, "column": 2 } } @@ -418,11 +444,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 11 }, "end": { - "line": 13, + "line": 29, "column": 12 } } @@ -431,27 +457,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "B", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "B", + "decorators": [], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 22 + } + } + }, "loc": { "start": { - "line": 13, - "column": 21 + "line": 29, + "column": 22 }, "end": { - "line": 13, + "line": 29, "column": 22 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 22 }, "end": { - "line": 13, + "line": 29, "column": 22 } } @@ -459,27 +498,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "C", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "C", + "decorators": [], + "loc": { + "start": { + "line": 29, + "column": 24 + }, + "end": { + "line": 29, + "column": 25 + } + } + }, "loc": { "start": { - "line": 13, - "column": 24 + "line": 29, + "column": 26 }, "end": { - "line": 13, + "line": 29, "column": 25 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 26 }, "end": { - "line": 13, + "line": 29, "column": 25 } } @@ -487,11 +539,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 2 } } @@ -512,22 +564,22 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 9 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 9 } } @@ -535,11 +587,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 6 } } @@ -547,11 +599,11 @@ "init": null, "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 6 } } @@ -560,11 +612,11 @@ "kind": "var", "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 10 } } @@ -585,22 +637,22 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 8 }, "end": { - "line": 18, + "line": 34, "column": 9 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 8 }, "end": { - "line": 18, + "line": 34, "column": 9 } } @@ -608,11 +660,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 5 }, "end": { - "line": 18, + "line": 34, "column": 6 } } @@ -620,11 +672,11 @@ "init": null, "loc": { "start": { - "line": 18, + "line": 34, "column": 5 }, "end": { - "line": 18, + "line": 34, "column": 6 } } @@ -633,11 +685,11 @@ "kind": "var", "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 10 } } @@ -653,11 +705,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 2 } } @@ -668,33 +720,33 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 6 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 6 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 7 } } @@ -710,11 +762,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 2 } } @@ -725,33 +777,33 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 6 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 6 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 7 } } @@ -763,9 +815,9 @@ "column": 1 }, "end": { - "line": 21, - "column": 7 + "line": 38, + "column": 1 } } } -TypeError: Type 'A' is not assignable to type 'D'. [interfaceAssignment3.ts:21:1] +TypeError: Type 'A' is not assignable to type 'D'. [interfaceAssignment3.ts:37:1] diff --git a/es2panda/test/compiler/ts/interfaceAssignment3.ts b/es2panda/test/compiler/ts/interfaceAssignment3.ts index ec03978f9fb6892f023b9b5c331fa726c6a8ced9..c20b973408fa28a87eb71ce37b35e38233039f23 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment3.ts +++ b/es2panda/test/compiler/ts/interfaceAssignment3.ts @@ -34,4 +34,4 @@ var d: D; var a: A; a = d; -d = a; \ No newline at end of file +d = a; diff --git a/es2panda/test/compiler/ts/interfaceAssignment4-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment4-expected.txt index e2ab0e529d475ff01f9529718dbb5af1b02b4b4b..e020631b608f1ec59598410e1c5484e9e4685e28 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment4-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment4-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -81,11 +81,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -94,11 +94,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -106,44 +106,44 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 26 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 28 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 29 } } @@ -151,11 +151,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -166,11 +166,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -178,11 +178,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -203,22 +203,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 9 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 9 } } @@ -226,11 +226,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -249,11 +249,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 14 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -263,11 +263,11 @@ "value": 1, "loc": { "start": { - "line": 6, + "line": 22, "column": 17 }, "end": { - "line": 6, + "line": 22, "column": 18 } } @@ -275,11 +275,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 14 }, "end": { - "line": 6, + "line": 22, "column": 18 } } @@ -295,11 +295,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 20 }, "end": { - "line": 6, + "line": 22, "column": 21 } } @@ -312,25 +312,25 @@ "value": true, "loc": { "start": { - "line": 6, + "line": 22, "column": 24 }, "end": { - "line": 6, + "line": 22, "column": 28 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 6, + "line": 22, "column": 30 }, "end": { - "line": 6, + "line": 22, "column": 35 } } @@ -340,11 +340,11 @@ "value": 2, "loc": { "start": { - "line": 6, + "line": 22, "column": 37 }, "end": { - "line": 6, + "line": 22, "column": 38 } } @@ -352,11 +352,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 39 } } @@ -364,11 +364,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 20 }, "end": { - "line": 6, + "line": 22, "column": 39 } } @@ -376,22 +376,22 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 12 }, "end": { - "line": 6, + "line": 22, "column": 41 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 41 } } @@ -400,11 +400,11 @@ "kind": "var", "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 42 } } @@ -416,9 +416,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 42 } } } -TypeError: Type 'number' is not assignable to type 'boolean | string'. [interfaceAssignment4.ts:6:37] +TypeError: Type 'number' is not assignable to type 'boolean | string'. [interfaceAssignment4.ts:22:37] diff --git a/es2panda/test/compiler/ts/interfaceAssignment5-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment5-expected.txt index 3a989c51793fb9df30a33808af47aa59f1f0f395..a2a41d5ce242a0b4e6cd0e50d90d256b406b252d 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment5-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment5-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -118,22 +118,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 15 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 16 } } @@ -141,11 +141,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 29 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -169,27 +169,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, "loc": { "start": { - "line": 5, - "column": 21 + "line": 21, + "column": 22 }, "end": { - "line": 5, + "line": 21, "column": 22 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 22 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -197,27 +210,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 25 + } + } + }, "loc": { "start": { - "line": 5, - "column": 24 + "line": 21, + "column": 25 }, "end": { - "line": 5, + "line": 21, "column": 25 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 25 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -225,27 +251,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 27 + }, + "end": { + "line": 21, + "column": 28 + } + } + }, "loc": { "start": { - "line": 5, - "column": 27 + "line": 21, + "column": 29 }, "end": { - "line": 5, + "line": 21, "column": 28 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 29 }, "end": { - "line": 5, + "line": 21, "column": 28 } } @@ -253,11 +292,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -278,11 +317,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -291,22 +330,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 14 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -314,11 +353,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 29 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -329,11 +368,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 11 }, "end": { - "line": 9, + "line": 25, "column": 12 } } @@ -342,27 +381,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "B", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "B", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 21 + }, + "end": { + "line": 25, + "column": 22 + } + } + }, "loc": { "start": { - "line": 9, - "column": 21 + "line": 25, + "column": 22 }, "end": { - "line": 9, + "line": 25, "column": 22 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 22 }, "end": { - "line": 9, + "line": 25, "column": 22 } } @@ -370,27 +422,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 25 + } + } + }, "loc": { "start": { - "line": 9, - "column": 24 + "line": 25, + "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 25 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 25 } } @@ -398,27 +463,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "B", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "B", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 27 + }, + "end": { + "line": 25, + "column": 28 + } + } + }, "loc": { "start": { - "line": 9, - "column": 27 + "line": 25, + "column": 29 }, "end": { - "line": 9, + "line": 25, "column": 28 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 29 }, "end": { - "line": 9, + "line": 25, "column": 28 } } @@ -426,11 +504,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -451,22 +529,22 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 9 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 9 } } @@ -474,11 +552,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -497,11 +575,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 14 }, "end": { - "line": 13, + "line": 29, "column": 15 } } @@ -511,11 +589,11 @@ "value": 2, "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 18 } } @@ -523,11 +601,11 @@ "kind": "init", "loc": { "start": { - "line": 13, + "line": 29, "column": 14 }, "end": { - "line": 13, + "line": 29, "column": 18 } } @@ -543,25 +621,25 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 20 }, "end": { - "line": 13, + "line": 29, "column": 21 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 13, + "line": 29, "column": 23 }, "end": { - "line": 13, + "line": 29, "column": 28 } } @@ -569,11 +647,11 @@ "kind": "init", "loc": { "start": { - "line": 13, + "line": 29, "column": 20 }, "end": { - "line": 13, + "line": 29, "column": 28 } } @@ -581,22 +659,22 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 12 }, "end": { - "line": 13, + "line": 29, "column": 30 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 30 } } @@ -605,11 +683,11 @@ "kind": "var", "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 31 } } @@ -621,9 +699,9 @@ "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 31 } } } -TypeError: Type '{ a: number; c: string; }' is not assignable to type 'C'. [interfaceAssignment5.ts:13:5] +TypeError: Type '{ a: 2; c: "foo"; }' is not assignable to type 'C'. [interfaceAssignment5.ts:29:5] diff --git a/es2panda/test/compiler/ts/interfaceAssignment6-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment6-expected.txt index 0ce5a7bc0dc17837bfd7223f5f8dea05c3d8b0f7..a47790094fb21413bf1eb19dd8f655be81639c98 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment6-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment6-expected.txt @@ -15,11 +15,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -27,11 +27,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -40,11 +40,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -52,11 +52,11 @@ "readonly": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -70,11 +70,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -98,11 +98,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -111,11 +111,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 27 }, "end": { - "line": 3, + "line": 19, "column": 33 } } @@ -123,11 +123,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 33 } } @@ -135,11 +135,11 @@ "readonly": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 34 } } @@ -147,11 +147,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -162,11 +162,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -174,11 +174,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -199,22 +199,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 9 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 9 } } @@ -222,11 +222,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -244,25 +244,25 @@ "value": 5, "loc": { "start": { - "line": 6, + "line": 22, "column": 14 }, "end": { - "line": 6, + "line": 22, "column": 15 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 6, + "line": 22, "column": 17 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -270,11 +270,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 14 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -282,22 +282,22 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 12 }, "end": { - "line": 6, + "line": 22, "column": 24 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 24 } } @@ -306,11 +306,11 @@ "kind": "var", "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -322,9 +322,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [interfaceAssignment6.ts:6:14] +TypeError: Type 'string' is not assignable to type 'number'. [interfaceAssignment6.ts:22:14] diff --git a/es2panda/test/compiler/ts/interfaceAssignment7-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment7-expected.txt index 989a818e713f060457a2b71edcea615b339014c7..30ef984887e3acd8dd344a7fac6b54153bfbc8df 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment7-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment7-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -28,11 +28,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -44,11 +44,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -56,11 +56,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -70,22 +70,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 29 }, "end": { - "line": 2, + "line": 18, "column": 35 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 36 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -114,22 +114,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -145,11 +145,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -158,22 +158,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -181,11 +181,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -196,11 +196,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -208,11 +208,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -233,22 +233,22 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 9 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 9 } } @@ -256,11 +256,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -279,11 +279,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 14 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -293,11 +293,11 @@ "value": 5, "loc": { "start": { - "line": 7, + "line": 23, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -305,11 +305,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 14 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -325,25 +325,25 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 20 }, "end": { - "line": 7, + "line": 23, "column": 21 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 7, + "line": 23, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 28 } } @@ -351,11 +351,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 20 }, "end": { - "line": 7, + "line": 23, "column": 28 } } @@ -363,22 +363,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 30 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 30 } } @@ -387,11 +387,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 31 } } @@ -403,9 +403,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 31 } } } -TypeError: Type '{ a: number; b: string; }' is not assignable to type 'A'. [interfaceAssignment7.ts:7:5] +TypeError: Type '{ a: 5; b: "foo"; }' is not assignable to type 'A'. [interfaceAssignment7.ts:23:5] diff --git a/es2panda/test/compiler/ts/interfaceAssignment8-expected.txt b/es2panda/test/compiler/ts/interfaceAssignment8-expected.txt index 6ca53a1b35093d98fc68d8c8c1835bf0dd49f245..061251b06b53e3071dcb1d8e84945b94d06fc442 100644 --- a/es2panda/test/compiler/ts/interfaceAssignment8-expected.txt +++ b/es2panda/test/compiler/ts/interfaceAssignment8-expected.txt @@ -15,11 +15,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -27,11 +27,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -40,11 +40,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -52,11 +52,11 @@ "readonly": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -64,11 +64,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -79,11 +79,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -91,11 +91,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -114,11 +114,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 6 }, "end": { - "line": 6, + "line": 22, "column": 7 } } @@ -139,11 +139,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 24 } } @@ -151,11 +151,11 @@ "readonly": false, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -163,11 +163,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -178,11 +178,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -190,11 +190,11 @@ "extends": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -215,22 +215,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 8 }, "end": { - "line": 9, + "line": 25, "column": 9 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 8 }, "end": { - "line": 9, + "line": 25, "column": 9 } } @@ -238,11 +238,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 6 } } @@ -250,11 +250,11 @@ "init": null, "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 6 } } @@ -263,11 +263,11 @@ "kind": "var", "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 10 } } @@ -288,22 +288,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -311,11 +311,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -323,11 +323,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -336,11 +336,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 10 } } @@ -356,11 +356,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 2 } } @@ -371,33 +371,33 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 6 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 6 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 7 } } @@ -409,9 +409,9 @@ "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 7 } } } -TypeError: Type 'B' is not assignable to type 'A'. [interfaceAssignment8.ts:12:1] +TypeError: Type 'B' is not assignable to type 'A'. [interfaceAssignment8.ts:28:1] diff --git a/es2panda/test/compiler/ts/interfaceInheritance1-expected.txt b/es2panda/test/compiler/ts/interfaceInheritance1-expected.txt index b31fdec5c333098ac7b54216939dacb5077d4bb7..b84cd790f66bccdf7e6ca68ce1798ab955ad6b1e 100644 --- a/es2panda/test/compiler/ts/interfaceInheritance1-expected.txt +++ b/es2panda/test/compiler/ts/interfaceInheritance1-expected.txt @@ -8,11 +8,11 @@ "body": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -36,27 +36,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "C", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "C", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 22 + } + } + }, "loc": { "start": { - "line": 1, - "column": 21 + "line": 17, + "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -64,11 +77,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -80,11 +93,11 @@ "body": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -95,11 +108,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -108,27 +121,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, "loc": { "start": { - "line": 5, - "column": 21 + "line": 21, + "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -136,11 +162,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -152,11 +178,11 @@ "body": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -167,11 +193,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 11 }, "end": { - "line": 9, + "line": 25, "column": 12 } } @@ -180,27 +206,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "B", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "B", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 21 + }, + "end": { + "line": 25, + "column": 22 + } + } + }, "loc": { "start": { - "line": 9, - "column": 21 + "line": 25, + "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 22 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 22 } } @@ -208,11 +247,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -224,9 +263,9 @@ "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } } -TypeError: Type 'A' recursively references itself as a base type [interfaceInheritance1.ts:1:11] +TypeError: Type A recursively references itself as a base type. [interfaceInheritance1.ts:17:11] diff --git a/es2panda/test/compiler/ts/interfaceInheritance2-expected.txt b/es2panda/test/compiler/ts/interfaceInheritance2-expected.txt index 6dcba4f746e40a508390b5e38649d0f5066bae96..e618a159c36b6c3400a8ad9cad8f905ecbd9a597 100644 --- a/es2panda/test/compiler/ts/interfaceInheritance2-expected.txt +++ b/es2panda/test/compiler/ts/interfaceInheritance2-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -118,22 +118,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -141,11 +141,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -169,27 +169,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, "loc": { "start": { - "line": 5, - "column": 21 + "line": 21, + "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -197,11 +210,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -213,9 +226,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } } -TypeError: Interface 'B' incorrectly extends interface 'A' [interfaceInheritance2.ts:5:1] +TypeError: Interface 'B' incorrectly extends interface 'A' [interfaceInheritance2.ts:21:11] diff --git a/es2panda/test/compiler/ts/interfaceInheritance3-expected.txt b/es2panda/test/compiler/ts/interfaceInheritance3-expected.txt index 48f3e0ce1b87e3276756d5d778cdb75f34647683..afbc30495baab24c65f1b68be4c11b3614ba7e19 100644 --- a/es2panda/test/compiler/ts/interfaceInheritance3-expected.txt +++ b/es2panda/test/compiler/ts/interfaceInheritance3-expected.txt @@ -15,11 +15,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -27,11 +27,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -40,11 +40,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -52,11 +52,11 @@ "readonly": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -64,11 +64,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -79,11 +79,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -91,11 +91,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -115,11 +115,11 @@ "value": 5, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -128,22 +128,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 15 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 16 } } @@ -151,11 +151,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -166,11 +166,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -179,27 +179,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, "loc": { "start": { - "line": 5, - "column": 21 + "line": 21, + "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -207,11 +220,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -223,9 +236,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } } -TypeError: Property '5' of type 'boolean' is not assignable to numeric index type 'number'. [interfaceInheritance3.ts:6:5] +TypeError: Property '5' of type 'boolean' is not assignable to numeric index type 'number'. [interfaceInheritance3.ts:22:5] diff --git a/es2panda/test/compiler/ts/interfaceInheritance4-expected.txt b/es2panda/test/compiler/ts/interfaceInheritance4-expected.txt index f9a0e9cf031cd8682ce15479d753c739e1fd1c8b..9b652043aafd85f9a1e91c2b9327740f8796276f 100644 --- a/es2panda/test/compiler/ts/interfaceInheritance4-expected.txt +++ b/es2panda/test/compiler/ts/interfaceInheritance4-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -74,22 +74,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -97,11 +97,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -124,11 +124,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -149,11 +149,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -162,22 +162,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -193,11 +193,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -208,33 +208,33 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 15 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 17 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -242,11 +242,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -269,11 +269,11 @@ "extends": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -285,11 +285,11 @@ "body": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 26 }, "end": { - "line": 11, + "line": 27, "column": 29 } } @@ -300,11 +300,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 11 }, "end": { - "line": 11, + "line": 27, "column": 12 } } @@ -313,27 +313,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 27, + "column": 21 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, "loc": { "start": { - "line": 11, - "column": 21 + "line": 27, + "column": 22 }, "end": { - "line": 11, + "line": 27, "column": 22 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 22 }, "end": { - "line": 11, + "line": 27, "column": 22 } } @@ -341,27 +354,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "B", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "B", + "decorators": [], + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 25 + } + } + }, "loc": { "start": { - "line": 11, - "column": 24 + "line": 27, + "column": 26 }, "end": { - "line": 11, + "line": 27, "column": 25 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 26 }, "end": { - "line": 11, + "line": 27, "column": 25 } } @@ -369,11 +395,11 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 29 } } @@ -385,9 +411,9 @@ "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 29 } } } -TypeError: Interface 'C' cannot simultaneously extend types 'A' and 'B'. [interfaceInheritance4.ts:11:11] +TypeError: Interface 'C' incorrectly extends interface 'B' [interfaceInheritance4.ts:27:11] diff --git a/es2panda/test/compiler/ts/interfacePropertyReferenceContainingInterface-expected.txt b/es2panda/test/compiler/ts/interfacePropertyReferenceContainingInterface-expected.txt index c50625026bf7de34b8d6838134e5c0530a7f9cb7..cef1e6bf61ff526bde88b35501263c2637ca62df 100644 --- a/es2panda/test/compiler/ts/interfacePropertyReferenceContainingInterface-expected.txt +++ b/es2panda/test/compiler/ts/interfacePropertyReferenceContainingInterface-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -34,33 +34,33 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -76,11 +76,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -93,33 +93,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -127,11 +127,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -142,11 +142,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -154,11 +154,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -179,11 +179,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -196,33 +196,33 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 9 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 9 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 10 } } @@ -230,11 +230,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -245,11 +245,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -258,27 +258,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, "loc": { "start": { - "line": 6, - "column": 21 + "line": 22, + "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -286,11 +299,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -311,22 +324,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 11 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 11 } } @@ -334,11 +347,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 8 } } @@ -346,11 +359,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 8 } } @@ -359,11 +372,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 12 } } @@ -388,11 +401,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 4 } } @@ -403,11 +416,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -416,11 +429,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -431,11 +444,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 7 }, "end": { - "line": 12, + "line": 28, "column": 8 } } @@ -444,11 +457,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 8 } } @@ -459,11 +472,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 9 }, "end": { - "line": 12, + "line": 28, "column": 10 } } @@ -472,11 +485,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 10 } } @@ -487,11 +500,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 11 }, "end": { - "line": 12, + "line": 28, "column": 12 } } @@ -500,11 +513,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 12 } } @@ -515,11 +528,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 13 }, "end": { - "line": 12, + "line": 28, "column": 14 } } @@ -528,11 +541,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 14 } } @@ -543,11 +556,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 16 } } @@ -556,22 +569,22 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 16 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 17 } } @@ -598,11 +611,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 4 } } @@ -613,11 +626,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -626,11 +639,11 @@ "optional": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -641,11 +654,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 7 }, "end": { - "line": 13, + "line": 29, "column": 8 } } @@ -654,11 +667,11 @@ "optional": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 8 } } @@ -669,11 +682,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 9 }, "end": { - "line": 13, + "line": 29, "column": 10 } } @@ -682,11 +695,11 @@ "optional": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 10 } } @@ -697,11 +710,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 11 }, "end": { - "line": 13, + "line": 29, "column": 12 } } @@ -710,11 +723,11 @@ "optional": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 12 } } @@ -725,11 +738,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 13 }, "end": { - "line": 13, + "line": 29, "column": 14 } } @@ -738,11 +751,11 @@ "optional": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 14 } } @@ -753,11 +766,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 15 }, "end": { - "line": 13, + "line": 29, "column": 16 } } @@ -766,11 +779,11 @@ "optional": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 16 } } @@ -781,11 +794,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 18 } } @@ -794,22 +807,22 @@ "optional": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 18 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 19 } } @@ -836,11 +849,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 4 } } @@ -851,11 +864,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -864,11 +877,11 @@ "optional": false, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -879,11 +892,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 7 }, "end": { - "line": 14, + "line": 30, "column": 8 } } @@ -892,11 +905,11 @@ "optional": false, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 8 } } @@ -907,11 +920,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 9 }, "end": { - "line": 14, + "line": 30, "column": 10 } } @@ -920,11 +933,11 @@ "optional": false, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 10 } } @@ -935,11 +948,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 12 } } @@ -948,11 +961,11 @@ "optional": false, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 12 } } @@ -963,11 +976,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 13 }, "end": { - "line": 14, + "line": 30, "column": 14 } } @@ -976,11 +989,11 @@ "optional": false, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 14 } } @@ -991,11 +1004,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 15 }, "end": { - "line": 14, + "line": 30, "column": 16 } } @@ -1004,11 +1017,11 @@ "optional": false, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 16 } } @@ -1019,11 +1032,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 17 }, "end": { - "line": 14, + "line": 30, "column": 18 } } @@ -1032,22 +1045,22 @@ "optional": false, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 18 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 19 } } @@ -1059,7 +1072,7 @@ "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 1 } } diff --git a/es2panda/test/compiler/ts/interfacePropertyReferenceContainingInterface1-expected.txt b/es2panda/test/compiler/ts/interfacePropertyReferenceContainingInterface1-expected.txt index 3350815678882d9b6acbb8fd633ad4ccf1e9fa39..a465a43c2abf8234443706f066fc877b2bbc5574 100644 --- a/es2panda/test/compiler/ts/interfacePropertyReferenceContainingInterface1-expected.txt +++ b/es2panda/test/compiler/ts/interfacePropertyReferenceContainingInterface1-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -34,33 +34,33 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -76,11 +76,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -93,33 +93,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -127,11 +127,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -142,11 +142,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -154,11 +154,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -179,11 +179,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -196,33 +196,33 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 9 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 9 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 10 } } @@ -230,11 +230,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -245,11 +245,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -258,27 +258,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, "loc": { "start": { - "line": 6, - "column": 21 + "line": 22, + "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -286,11 +299,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -311,22 +324,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 11 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 11 } } @@ -334,11 +347,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 8 } } @@ -346,11 +359,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 8 } } @@ -359,11 +372,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 12 } } @@ -388,11 +401,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 4 } } @@ -403,11 +416,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -416,11 +429,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -431,11 +444,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 7 }, "end": { - "line": 12, + "line": 28, "column": 8 } } @@ -444,11 +457,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 8 } } @@ -459,11 +472,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 9 }, "end": { - "line": 12, + "line": 28, "column": 10 } } @@ -472,11 +485,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 10 } } @@ -487,11 +500,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 11 }, "end": { - "line": 12, + "line": 28, "column": 12 } } @@ -500,11 +513,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 12 } } @@ -515,11 +528,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 13 }, "end": { - "line": 12, + "line": 28, "column": 14 } } @@ -528,11 +541,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 14 } } @@ -543,11 +556,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 16 } } @@ -556,22 +569,22 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 16 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 16 } } @@ -583,9 +596,9 @@ "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 1 } } } -TypeError: Property 'r' does not exist on type 'A'. [interfacePropertyReferenceContainingInterface1.ts:12:15] +TypeError: Property r does not exist on this type. [interfacePropertyReferenceContainingInterface1.ts:28:15] diff --git a/es2panda/test/compiler/ts/interfacePropertyWithIncompatibleIndexInfo-expected.txt b/es2panda/test/compiler/ts/interfacePropertyWithIncompatibleIndexInfo-expected.txt index f02d3b65a4cc0d8a2c85a3a44e8770952c905206..612355aef4b72f79913e69bffaa24fdd4c06455f 100644 --- a/es2panda/test/compiler/ts/interfacePropertyWithIncompatibleIndexInfo-expected.txt +++ b/es2panda/test/compiler/ts/interfacePropertyWithIncompatibleIndexInfo-expected.txt @@ -15,11 +15,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -27,11 +27,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -40,11 +40,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -52,11 +52,11 @@ "readonly": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -72,11 +72,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -85,22 +85,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -108,11 +108,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -123,11 +123,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -135,11 +135,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -151,9 +151,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } } -TypeError: Property 'a' of type 'string' is not assignable to string index type 'boolean'. [interfacePropertyWithIncompatibleIndexInfo.ts:3:5] +TypeError: Property 'a' of type 'string' is not assignable to string index type 'boolean'. [interfacePropertyWithIncompatibleIndexInfo.ts:19:5] diff --git a/es2panda/test/compiler/ts/interfaceUsedAsValue-expected.txt b/es2panda/test/compiler/ts/interfaceUsedAsValue-expected.txt index c4b5e4a677cadf4831996324e9fffbe4f98c0c13..d2c3305688db9a5a84f4aeb27b55c211fc20ed28 100644 --- a/es2panda/test/compiler/ts/interfaceUsedAsValue-expected.txt +++ b/es2panda/test/compiler/ts/interfaceUsedAsValue-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -60,11 +60,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -77,11 +77,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -89,11 +89,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -105,11 +105,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -117,11 +117,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -131,22 +131,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 30 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 31 } } @@ -161,11 +161,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 7 } } @@ -189,11 +189,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 20 }, "end": { - "line": 4, + "line": 20, "column": 26 } } @@ -201,11 +201,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 17 }, "end": { - "line": 4, + "line": 20, "column": 18 } } @@ -215,22 +215,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 29 }, "end": { - "line": 4, + "line": 20, "column": 36 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 37 } } @@ -238,13 +238,26 @@ { "type": "TSConstructSignatureDeclaration", "params": [], + "returnType": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 21, + "column": 12 + }, + "end": { + "line": 21, + "column": 18 + } + } + }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -252,11 +265,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -267,11 +280,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -279,11 +292,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -299,11 +312,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -314,22 +327,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 8, + "line": 24, "column": 10 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 10 } } @@ -338,11 +351,11 @@ "kind": "var", "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 11 } } @@ -354,9 +367,9 @@ "column": 1 }, "end": { - "line": 8, - "column": 11 + "line": 25, + "column": 1 } } } -TypeError: a only refers to a type , but is being used as a value here [interfaceUsedAsValue.ts:8:9] +TypeError: a only refers to a type, but is being used as a value here. [interfaceUsedAsValue.ts:24:9] diff --git a/es2panda/test/compiler/ts/interfaceUsedAsValue.ts b/es2panda/test/compiler/ts/interfaceUsedAsValue.ts index ba30bdcb34f477af3eb2f6359574b19cc5daf76e..be9ed7f44b54e0a8fc5faa2098e13f40abc18eb1 100644 --- a/es2panda/test/compiler/ts/interfaceUsedAsValue.ts +++ b/es2panda/test/compiler/ts/interfaceUsedAsValue.ts @@ -18,7 +18,7 @@ interface a { a: number, b(a: any, b: any): string, (a: number, b: string): boolean, - new() + new(): string } -var b = a; \ No newline at end of file +var b = a; diff --git a/es2panda/test/compiler/ts/interfaceWithNonCompatibleIndexInfos-expected.txt b/es2panda/test/compiler/ts/interfaceWithNonCompatibleIndexInfos-expected.txt index 06c0be1643ef55eaa86598b95a6cf28b9c2b50c8..42cb89ff6f30866c6928fd23850144a0aabfacfe 100644 --- a/es2panda/test/compiler/ts/interfaceWithNonCompatibleIndexInfos-expected.txt +++ b/es2panda/test/compiler/ts/interfaceWithNonCompatibleIndexInfos-expected.txt @@ -15,11 +15,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -27,11 +27,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -40,11 +40,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -52,11 +52,11 @@ "readonly": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -70,11 +70,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -95,11 +95,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -107,11 +107,11 @@ "readonly": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -134,11 +134,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -146,11 +146,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -162,9 +162,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Numeric index type 'string' is not assignable to string index type 'number' [interfaceWithNonCompatibleIndexInfos.ts:3:5] +TypeError: Number index info type string is not assignable to string index info type number. [interfaceWithNonCompatibleIndexInfos.ts:18:5] diff --git a/es2panda/test/compiler/ts/interface_enum_member-expected.txt b/es2panda/test/compiler/ts/interface_enum_member-expected.txt index 5a3f380391cb83fdbed6febf57299359768124a2..5f3e4aec474893971c6e7e416cadd88d07541e5b 100644 --- a/es2panda/test/compiler/ts/interface_enum_member-expected.txt +++ b/es2panda/test/compiler/ts/interface_enum_member-expected.txt @@ -9,11 +9,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -27,22 +27,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -51,11 +51,11 @@ "const": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -76,11 +76,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -95,11 +95,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 9 } } @@ -110,44 +110,44 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 10 }, "end": { - "line": 6, + "line": 22, "column": 11 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 2 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 2 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -155,11 +155,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -170,11 +170,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -182,11 +182,11 @@ "extends": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -198,7 +198,7 @@ "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 1 } } diff --git a/es2panda/test/compiler/ts/letUsedBeforeDeclaration-expected.txt b/es2panda/test/compiler/ts/letUsedBeforeDeclaration-expected.txt index f7ccfb4ebacbb0398c137422ffc2fa850a827767..4dd2c1070e0cad948b24cfb6ed4abe3a0cd22265 100644 --- a/es2panda/test/compiler/ts/letUsedBeforeDeclaration-expected.txt +++ b/es2panda/test/compiler/ts/letUsedBeforeDeclaration-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 2 } } @@ -26,33 +26,33 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 6 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -69,11 +69,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -93,11 +93,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -106,11 +106,11 @@ "kind": "let", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -122,9 +122,9 @@ "column": 1 }, "end": { - "line": 2, - "column": 15 + "line": 19, + "column": 1 } } } -TypeError: Block-scoped variable 'a' used before its declaration [letUsedBeforeDeclaration.ts:1:1] +TypeError: Block-scoped variable 'a' used before its declaration [letUsedBeforeDeclaration.ts:18:5] diff --git a/es2panda/test/compiler/ts/letUsedBeforeDeclaration.ts b/es2panda/test/compiler/ts/letUsedBeforeDeclaration.ts index 4bf17e8b5802616dc9f77eecbc93b26eadf9bd6f..af20a3a85184cbe4e2a34ca092020ba4c2b13a16 100644 --- a/es2panda/test/compiler/ts/letUsedBeforeDeclaration.ts +++ b/es2panda/test/compiler/ts/letUsedBeforeDeclaration.ts @@ -15,4 +15,4 @@ a = 2; -let a: number; \ No newline at end of file +let a: number; diff --git a/es2panda/test/compiler/ts/memberExpTest_1-expected.txt b/es2panda/test/compiler/ts/memberExpTest_1-expected.txt index 122ba48c998ef75f8b2683115c28169a211f3844..7505ba37d8d793487b286937992dc29255992c8d 100644 --- a/es2panda/test/compiler/ts/memberExpTest_1-expected.txt +++ b/es2panda/test/compiler/ts/memberExpTest_1-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 4 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 6 }, "end": { - "line": 3, + "line": 17, "column": 12 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 13 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -74,22 +74,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 18, "column": 6 }, "end": { - "line": 4, + "line": 18, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 2 } } @@ -97,11 +97,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 13 }, "end": { - "line": 5, + "line": 19, "column": 2 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 11 }, "end": { - "line": 2, + "line": 16, "column": 12 } } @@ -124,11 +124,11 @@ "extends": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 2 } } @@ -149,22 +149,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 20, "column": 8 }, "end": { - "line": 6, + "line": 20, "column": 9 } } }, "loc": { "start": { - "line": 6, + "line": 20, "column": 8 }, "end": { - "line": 6, + "line": 20, "column": 9 } } @@ -172,11 +172,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 20, "column": 5 }, "end": { - "line": 6, + "line": 20, "column": 6 } } @@ -184,11 +184,11 @@ "init": null, "loc": { "start": { - "line": 6, + "line": 20, "column": 5 }, "end": { - "line": 6, + "line": 20, "column": 6 } } @@ -197,11 +197,11 @@ "kind": "var", "loc": { "start": { - "line": 6, + "line": 20, "column": 1 }, "end": { - "line": 6, + "line": 20, "column": 10 } } @@ -219,11 +219,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 2 } } @@ -234,11 +234,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 21, "column": 3 }, "end": { - "line": 7, + "line": 21, "column": 6 } } @@ -247,11 +247,11 @@ "optional": false, "loc": { "start": { - "line": 7, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 6 } } @@ -261,33 +261,33 @@ "value": 2, "loc": { "start": { - "line": 7, + "line": 21, "column": 9 }, "end": { - "line": 7, + "line": 21, "column": 10 } } }, "loc": { "start": { - "line": 7, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 10 } } }, "loc": { "start": { - "line": 7, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 11 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 22, "column": 2 } } @@ -320,11 +320,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 22, "column": 3 }, "end": { - "line": 8, + "line": 22, "column": 6 } } @@ -333,47 +333,47 @@ "optional": false, "loc": { "start": { - "line": 8, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 22, "column": 6 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 8, + "line": 22, "column": 9 }, "end": { - "line": 8, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 8, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 8, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 22, "column": 15 } } @@ -391,11 +391,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 23, "column": 1 }, "end": { - "line": 9, + "line": 23, "column": 2 } } @@ -406,11 +406,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 23, "column": 3 }, "end": { - "line": 9, + "line": 23, "column": 9 } } @@ -419,11 +419,11 @@ "optional": false, "loc": { "start": { - "line": 9, + "line": 23, "column": 1 }, "end": { - "line": 9, + "line": 23, "column": 9 } } @@ -433,33 +433,33 @@ "value": 2, "loc": { "start": { - "line": 9, + "line": 23, "column": 12 }, "end": { - "line": 9, + "line": 23, "column": 13 } } }, "loc": { "start": { - "line": 9, + "line": 23, "column": 1 }, "end": { - "line": 9, + "line": 23, "column": 13 } } }, "loc": { "start": { - "line": 9, + "line": 23, "column": 1 }, "end": { - "line": 9, + "line": 23, "column": 14 } } @@ -471,9 +471,9 @@ "column": 1 }, "end": { - "line": 9, + "line": 23, "column": 14 } } } -TypeError: Property 'foobar' does not exist on type 'a'. [memberExpTest_1.ts:9:3] +TypeError: Property foobar does not exist on this type. [memberExpTest_1.ts:23:3] diff --git a/es2panda/test/compiler/ts/memberExpTest_2-expected.txt b/es2panda/test/compiler/ts/memberExpTest_2-expected.txt index abd2e7b8c44385440c9c5b75f157a1efbdeedada..dc3ea12478d7e53ccfd2ac42262e6f1fc0d6079c 100644 --- a/es2panda/test/compiler/ts/memberExpTest_2-expected.txt +++ b/es2panda/test/compiler/ts/memberExpTest_2-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 11 } } @@ -122,33 +122,33 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 13 }, "end": { - "line": 6, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 13 }, "end": { - "line": 6, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -156,11 +156,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -171,11 +171,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -183,11 +183,11 @@ "extends": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -208,22 +208,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 8 }, "end": { - "line": 9, + "line": 25, "column": 9 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 8 }, "end": { - "line": 9, + "line": 25, "column": 9 } } @@ -231,11 +231,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 6 } } @@ -243,11 +243,11 @@ "init": null, "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 6 } } @@ -256,11 +256,11 @@ "kind": "var", "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 10 } } @@ -281,22 +281,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -304,11 +304,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -316,11 +316,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -329,11 +329,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 10 } } @@ -351,11 +351,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -366,11 +366,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 3 }, "end": { - "line": 11, + "line": 27, "column": 9 } } @@ -379,11 +379,11 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 9 } } @@ -394,33 +394,33 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 12 }, "end": { - "line": 11, + "line": 27, "column": 13 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 13 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 14 } } @@ -440,11 +440,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 2 } } @@ -455,11 +455,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 3 }, "end": { - "line": 12, + "line": 28, "column": 9 } } @@ -468,11 +468,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 9 } } @@ -483,11 +483,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 10 }, "end": { - "line": 12, + "line": 28, "column": 16 } } @@ -496,11 +496,11 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 16 } } @@ -511,33 +511,33 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 19 }, "end": { - "line": 12, + "line": 28, "column": 20 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 20 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 21 } } @@ -549,9 +549,9 @@ "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 21 } } } -TypeError: Property 'foobar' does not exist on type 'a'. [memberExpTest_2.ts:12:10] +TypeError: Property foobar does not exist on this type. [memberExpTest_2.ts:28:10] diff --git a/es2panda/test/compiler/ts/memberExpTest_3-expected.txt b/es2panda/test/compiler/ts/memberExpTest_3-expected.txt index 833b0bb9e83ef64e02aa82678fce7bcc7aacebb4..07b7d2baf28aa768aa2420fa2b84eab76dacf405 100644 --- a/es2panda/test/compiler/ts/memberExpTest_3-expected.txt +++ b/es2panda/test/compiler/ts/memberExpTest_3-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -45,11 +45,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -58,22 +58,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -81,11 +81,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -104,11 +104,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 26 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -117,22 +117,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 37 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 26 }, "end": { - "line": 2, + "line": 18, "column": 38 } } @@ -140,11 +140,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 38 } } @@ -152,33 +152,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 38 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 39 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -186,11 +186,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -201,11 +201,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -213,11 +213,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -238,11 +238,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -257,44 +257,44 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -302,11 +302,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -317,11 +317,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -329,11 +329,11 @@ "extends": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -354,11 +354,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 8 } } @@ -371,33 +371,33 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 11 }, "end": { - "line": 8, + "line": 24, "column": 12 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 11 }, "end": { - "line": 8, + "line": 24, "column": 12 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 13 } } @@ -405,11 +405,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -420,11 +420,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 11 }, "end": { - "line": 7, + "line": 23, "column": 12 } } @@ -432,11 +432,11 @@ "extends": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -457,22 +457,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 9 }, "end": { - "line": 10, + "line": 26, "column": 10 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 9 }, "end": { - "line": 10, + "line": 26, "column": 10 } } @@ -480,11 +480,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 7 } } @@ -492,11 +492,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 7 } } @@ -505,11 +505,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 11 } } @@ -535,11 +535,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 3 } } @@ -550,11 +550,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 4 }, "end": { - "line": 11, + "line": 27, "column": 7 } } @@ -563,11 +563,11 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 7 } } @@ -578,11 +578,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -591,11 +591,11 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -605,11 +605,11 @@ "value": 0, "loc": { "start": { - "line": 11, + "line": 27, "column": 12 }, "end": { - "line": 11, + "line": 27, "column": 13 } } @@ -618,11 +618,11 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 14 } } @@ -633,11 +633,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 15 }, "end": { - "line": 11, + "line": 27, "column": 16 } } @@ -646,11 +646,11 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 16 } } @@ -661,11 +661,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 17 }, "end": { - "line": 11, + "line": 27, "column": 20 } } @@ -674,11 +674,11 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 20 } } @@ -688,33 +688,33 @@ "value": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 23 }, "end": { - "line": 11, + "line": 27, "column": 28 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 28 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 29 } } @@ -726,9 +726,9 @@ "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 29 } } } -TypeError: Type 'false' is not assignable to type 'string | number'. [memberExpTest_3.ts:11:1] +TypeError: Type 'boolean' is not assignable to type 'string | number'. [memberExpTest_3.ts:27:1] diff --git a/es2panda/test/compiler/ts/memberExpTest_4-expected.txt b/es2panda/test/compiler/ts/memberExpTest_4-expected.txt index f4b307b988e4956ee93860d315cd82edb417a855..30f2b1fdf42675e573458bf56d42072473555cb7 100644 --- a/es2panda/test/compiler/ts/memberExpTest_4-expected.txt +++ b/es2panda/test/compiler/ts/memberExpTest_4-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -74,22 +74,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -118,22 +118,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -141,11 +141,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -168,11 +168,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -193,11 +193,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -206,22 +206,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -229,11 +229,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -244,11 +244,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -257,27 +257,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "a", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, "loc": { "start": { - "line": 6, - "column": 21 + "line": 22, + "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -285,11 +298,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -310,22 +323,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -333,11 +346,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -345,11 +358,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -358,11 +371,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 10 } } @@ -380,11 +393,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -395,11 +408,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 3 }, "end": { - "line": 11, + "line": 27, "column": 4 } } @@ -408,47 +421,47 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 4 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 11, + "line": 27, "column": 7 }, "end": { - "line": 11, + "line": 27, "column": 12 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 12 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 13 } } @@ -460,9 +473,9 @@ "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 13 } } } -TypeError: Type '"foo"' is not assignable to type 'number'. [memberExpTest_4.ts:11:1] +TypeError: Type 'string' is not assignable to type 'number'. [memberExpTest_4.ts:27:1] diff --git a/es2panda/test/compiler/ts/memberExpTest_5-expected.txt b/es2panda/test/compiler/ts/memberExpTest_5-expected.txt index 3216555cca0b3f32127b00772515036c3f766f30..b4f2a1a02b4a969c89bd41182965b8091bf4eb1c 100644 --- a/es2panda/test/compiler/ts/memberExpTest_5-expected.txt +++ b/es2panda/test/compiler/ts/memberExpTest_5-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -74,22 +74,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -118,22 +118,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -141,11 +141,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -168,11 +168,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -193,11 +193,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -206,22 +206,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -229,11 +229,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -244,11 +244,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -257,27 +257,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "a", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, "loc": { "start": { - "line": 6, - "column": 21 + "line": 22, + "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -285,11 +298,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -310,22 +323,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -333,11 +346,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -345,11 +358,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -358,11 +371,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 10 } } @@ -380,11 +393,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -395,11 +408,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 3 }, "end": { - "line": 11, + "line": 27, "column": 4 } } @@ -408,47 +421,47 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 4 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 11, + "line": 27, "column": 7 }, "end": { - "line": 11, + "line": 27, "column": 12 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 12 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 13 } } @@ -460,9 +473,9 @@ "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 13 } } } -TypeError: Type '"foo"' is not assignable to type 'number'. [memberExpTest_5.ts:11:1] +TypeError: Type 'string' is not assignable to type 'number'. [memberExpTest_5.ts:27:1] diff --git a/es2panda/test/compiler/ts/memberExpTest_6-expected.txt b/es2panda/test/compiler/ts/memberExpTest_6-expected.txt index 08ba567fdc68562f0f53e1f91a10f115081a9eaf..71a14b130a2c4eaf87490c7ad98b43e08a46572d 100644 --- a/es2panda/test/compiler/ts/memberExpTest_6-expected.txt +++ b/es2panda/test/compiler/ts/memberExpTest_6-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -74,22 +74,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -97,11 +97,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -124,11 +124,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -149,11 +149,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -162,22 +162,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -185,11 +185,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -200,11 +200,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -213,27 +213,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "A", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "A", + "decorators": [], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, "loc": { "start": { - "line": 6, - "column": 21 + "line": 22, + "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -241,11 +254,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -269,22 +282,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -297,22 +310,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 12 }, "end": { - "line": 10, + "line": 26, "column": 13 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 12 }, "end": { - "line": 10, + "line": 26, "column": 13 } } @@ -320,11 +333,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 13 } } @@ -332,11 +345,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -344,11 +357,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -357,11 +370,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 14 } } @@ -376,11 +389,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -391,11 +404,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 3 }, "end": { - "line": 11, + "line": 27, "column": 4 } } @@ -404,22 +417,22 @@ "optional": false, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 4 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 5 } } @@ -434,11 +447,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 2 } } @@ -449,11 +462,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 3 }, "end": { - "line": 12, + "line": 28, "column": 4 } } @@ -462,22 +475,22 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 4 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 5 } } @@ -492,11 +505,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 2 } } @@ -507,11 +520,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 3 }, "end": { - "line": 13, + "line": 29, "column": 4 } } @@ -520,22 +533,22 @@ "optional": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 4 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 5 } } @@ -547,9 +560,9 @@ "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 5 } } } -TypeError: Property 'd' does not exist on type 'A'. [memberExpTest_6.ts:13:3] +TypeError: Property d does not exist on this type. [memberExpTest_6.ts:29:3] diff --git a/es2panda/test/compiler/ts/memberExpTests-expected.txt b/es2panda/test/compiler/ts/memberExpTests-expected.txt index a0684526028ff956dc901ec26a9d681758f4c052..6f0b1ce2ed7f789fb82cb415d2b4d713bd0880bb 100644 --- a/es2panda/test/compiler/ts/memberExpTests-expected.txt +++ b/es2panda/test/compiler/ts/memberExpTests-expected.txt @@ -15,22 +15,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -55,11 +55,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -69,11 +69,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -83,11 +83,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -97,11 +97,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -109,22 +109,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -133,11 +133,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -155,11 +155,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -169,11 +169,11 @@ "value": 3, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -182,11 +182,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -196,33 +196,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -243,11 +243,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 8 } } @@ -256,22 +256,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 10 }, "end": { - "line": 6, + "line": 22, "column": 16 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 17 } } @@ -287,11 +287,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 8 } } @@ -300,22 +300,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 10 }, "end": { - "line": 7, + "line": 23, "column": 16 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 17 } } @@ -323,11 +323,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 22 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -338,11 +338,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 21 } } @@ -350,11 +350,11 @@ "extends": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -375,11 +375,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 8 } } @@ -388,22 +388,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 16 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 17 } } @@ -419,11 +419,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 8 } } @@ -432,22 +432,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 10 }, "end": { - "line": 11, + "line": 27, "column": 16 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 17 } } @@ -463,11 +463,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 11 } } @@ -480,33 +480,33 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 13 }, "end": { - "line": 12, + "line": 28, "column": 23 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 13 }, "end": { - "line": 12, + "line": 28, "column": 23 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 2 } } @@ -514,11 +514,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 22 }, "end": { - "line": 13, + "line": 29, "column": 2 } } @@ -529,11 +529,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 11 }, "end": { - "line": 9, + "line": 25, "column": 21 } } @@ -541,11 +541,11 @@ "extends": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 2 } } @@ -566,22 +566,22 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 9 }, "end": { - "line": 14, + "line": 30, "column": 19 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 9 }, "end": { - "line": 14, + "line": 30, "column": 19 } } @@ -589,11 +589,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 7 } } @@ -601,11 +601,11 @@ "init": null, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 7 } } @@ -614,11 +614,11 @@ "kind": "var", "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 20 } } @@ -639,22 +639,22 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 19 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 19 } } @@ -662,11 +662,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 7 } } @@ -674,11 +674,11 @@ "init": null, "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 7 } } @@ -687,11 +687,11 @@ "kind": "var", "loc": { "start": { - "line": 15, + "line": 31, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 20 } } @@ -709,11 +709,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 3 } } @@ -724,11 +724,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 4 }, "end": { - "line": 16, + "line": 32, "column": 7 } } @@ -737,11 +737,11 @@ "optional": false, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 7 } } @@ -751,33 +751,33 @@ "value": 2, "loc": { "start": { - "line": 16, + "line": 32, "column": 10 }, "end": { - "line": 16, + "line": 32, "column": 11 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 11 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 12 } } @@ -795,11 +795,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 3 } } @@ -810,11 +810,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 4 }, "end": { - "line": 17, + "line": 33, "column": 7 } } @@ -823,47 +823,47 @@ "optional": false, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 7 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 17, + "line": 33, "column": 10 }, "end": { - "line": 17, + "line": 33, "column": 15 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 15 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 16 } } @@ -881,11 +881,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 3 } } @@ -896,11 +896,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 4 }, "end": { - "line": 18, + "line": 34, "column": 7 } } @@ -909,11 +909,11 @@ "optional": false, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 7 } } @@ -926,11 +926,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 10 }, "end": { - "line": 18, + "line": 34, "column": 12 } } @@ -941,11 +941,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 13 }, "end": { - "line": 18, + "line": 34, "column": 16 } } @@ -954,33 +954,33 @@ "optional": false, "loc": { "start": { - "line": 18, + "line": 34, "column": 10 }, "end": { - "line": 18, + "line": 34, "column": 16 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 16 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 17 } } @@ -998,11 +998,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 3 } } @@ -1013,11 +1013,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 4 }, "end": { - "line": 19, + "line": 35, "column": 7 } } @@ -1026,11 +1026,11 @@ "optional": false, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 7 } } @@ -1043,11 +1043,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 10 }, "end": { - "line": 19, + "line": 35, "column": 12 } } @@ -1058,11 +1058,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 13 }, "end": { - "line": 19, + "line": 35, "column": 16 } } @@ -1071,33 +1071,33 @@ "optional": false, "loc": { "start": { - "line": 19, + "line": 35, "column": 10 }, "end": { - "line": 19, + "line": 35, "column": 16 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 16 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 17 } } @@ -1115,11 +1115,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 3 } } @@ -1130,11 +1130,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 4 }, "end": { - "line": 20, + "line": 36, "column": 10 } } @@ -1143,11 +1143,11 @@ "optional": false, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 10 } } @@ -1158,33 +1158,33 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 13 }, "end": { - "line": 20, + "line": 36, "column": 15 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 15 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 16 } } @@ -1204,11 +1204,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 3 } } @@ -1219,11 +1219,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 4 }, "end": { - "line": 21, + "line": 37, "column": 10 } } @@ -1232,11 +1232,11 @@ "optional": false, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 10 } } @@ -1247,11 +1247,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 11 }, "end": { - "line": 21, + "line": 37, "column": 14 } } @@ -1260,11 +1260,11 @@ "optional": false, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 14 } } @@ -1274,33 +1274,33 @@ "value": 3, "loc": { "start": { - "line": 21, + "line": 37, "column": 17 }, "end": { - "line": 21, + "line": 37, "column": 18 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 18 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 19 } } @@ -1320,11 +1320,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 3 } } @@ -1335,11 +1335,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 4 }, "end": { - "line": 22, + "line": 38, "column": 10 } } @@ -1348,11 +1348,11 @@ "optional": false, "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 10 } } @@ -1363,11 +1363,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 11 }, "end": { - "line": 22, + "line": 38, "column": 14 } } @@ -1376,47 +1376,47 @@ "optional": false, "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 14 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 22, + "line": 38, "column": 17 }, "end": { - "line": 22, + "line": 38, "column": 22 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 22 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 23 } } @@ -1437,11 +1437,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 5 }, "end": { - "line": 27, + "line": 43, "column": 8 } } @@ -1452,33 +1452,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 27, + "line": 43, "column": 10 }, "end": { - "line": 27, + "line": 43, "column": 16 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 10 }, "end": { - "line": 27, + "line": 43, "column": 18 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 5 }, "end": { - "line": 28, + "line": 44, "column": 2 } } @@ -1486,11 +1486,11 @@ ], "loc": { "start": { - "line": 26, + "line": 42, "column": 22 }, "end": { - "line": 28, + "line": 44, "column": 2 } } @@ -1501,11 +1501,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 11 }, "end": { - "line": 26, + "line": 42, "column": 21 } } @@ -1513,11 +1513,11 @@ "extends": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 28, + "line": 44, "column": 2 } } @@ -1538,22 +1538,22 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 9 }, "end": { - "line": 29, + "line": 45, "column": 19 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 9 }, "end": { - "line": 29, + "line": 45, "column": 19 } } @@ -1561,11 +1561,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 7 } } @@ -1573,11 +1573,11 @@ "init": null, "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 7 } } @@ -1586,11 +1586,11 @@ "kind": "var", "loc": { "start": { - "line": 29, + "line": 45, "column": 1 }, "end": { - "line": 29, + "line": 45, "column": 20 } } @@ -1610,11 +1610,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 3 } } @@ -1625,11 +1625,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 4 }, "end": { - "line": 30, + "line": 46, "column": 7 } } @@ -1638,11 +1638,11 @@ "optional": false, "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 7 } } @@ -1652,11 +1652,11 @@ "value": 2, "loc": { "start": { - "line": 30, + "line": 46, "column": 8 }, "end": { - "line": 30, + "line": 46, "column": 9 } } @@ -1665,11 +1665,11 @@ "optional": false, "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 10 } } @@ -1679,33 +1679,33 @@ "value": 5, "loc": { "start": { - "line": 30, + "line": 46, "column": 13 }, "end": { - "line": 30, + "line": 46, "column": 14 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 14 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 15 } } @@ -1726,11 +1726,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 8 } } @@ -1749,11 +1749,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 12 }, "end": { - "line": 35, + "line": 51, "column": 15 } } @@ -1762,22 +1762,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 17 }, "end": { - "line": 35, + "line": 51, "column": 23 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 12 }, "end": { - "line": 35, + "line": 51, "column": 24 } } @@ -1785,22 +1785,22 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 11 }, "end": { - "line": 35, + "line": 51, "column": 24 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 36, + "line": 52, "column": 2 } } @@ -1808,11 +1808,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 22 }, "end": { - "line": 36, + "line": 52, "column": 2 } } @@ -1823,11 +1823,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 11 }, "end": { - "line": 34, + "line": 50, "column": 21 } } @@ -1835,11 +1835,11 @@ "extends": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 1 }, "end": { - "line": 36, + "line": 52, "column": 2 } } @@ -1860,22 +1860,22 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 9 }, "end": { - "line": 37, + "line": 53, "column": 19 } } }, "loc": { "start": { - "line": 37, + "line": 53, "column": 9 }, "end": { - "line": 37, + "line": 53, "column": 19 } } @@ -1883,11 +1883,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 7 } } @@ -1895,11 +1895,11 @@ "init": null, "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 7 } } @@ -1908,11 +1908,11 @@ "kind": "var", "loc": { "start": { - "line": 37, + "line": 53, "column": 1 }, "end": { - "line": 37, + "line": 53, "column": 20 } } @@ -1932,11 +1932,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 3 } } @@ -1947,11 +1947,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 4 }, "end": { - "line": 38, + "line": 54, "column": 7 } } @@ -1960,11 +1960,11 @@ "optional": false, "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 7 } } @@ -1975,11 +1975,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 8 }, "end": { - "line": 38, + "line": 54, "column": 11 } } @@ -1988,11 +1988,11 @@ "optional": false, "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 11 } } @@ -2002,33 +2002,33 @@ "value": 3, "loc": { "start": { - "line": 38, + "line": 54, "column": 14 }, "end": { - "line": 38, + "line": 54, "column": 15 } } }, "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 15 } } }, "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 16 } } @@ -2049,11 +2049,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 5 }, "end": { - "line": 42, + "line": 58, "column": 8 } } @@ -2072,11 +2072,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 12 }, "end": { - "line": 42, + "line": 58, "column": 18 } } @@ -2085,22 +2085,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 42, + "line": 58, "column": 20 }, "end": { - "line": 42, + "line": 58, "column": 26 } } }, "loc": { "start": { - "line": 42, + "line": 58, "column": 12 }, "end": { - "line": 42, + "line": 58, "column": 27 } } @@ -2108,22 +2108,22 @@ ], "loc": { "start": { - "line": 42, + "line": 58, "column": 11 }, "end": { - "line": 42, + "line": 58, "column": 27 } } }, "loc": { "start": { - "line": 42, + "line": 58, "column": 5 }, "end": { - "line": 43, + "line": 59, "column": 2 } } @@ -2131,11 +2131,11 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 22 }, "end": { - "line": 43, + "line": 59, "column": 2 } } @@ -2146,11 +2146,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 11 }, "end": { - "line": 41, + "line": 57, "column": 21 } } @@ -2158,11 +2158,11 @@ "extends": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 43, + "line": 59, "column": 2 } } @@ -2183,11 +2183,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 8 } } @@ -2202,44 +2202,44 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 10 }, "end": { - "line": 45, + "line": 61, "column": 20 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 10 }, "end": { - "line": 45, + "line": 61, "column": 20 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 10 }, "end": { - "line": 45, + "line": 61, "column": 22 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 46, + "line": 62, "column": 2 } } @@ -2247,11 +2247,11 @@ ], "loc": { "start": { - "line": 44, + "line": 60, "column": 22 }, "end": { - "line": 46, + "line": 62, "column": 2 } } @@ -2262,11 +2262,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 11 }, "end": { - "line": 44, + "line": 60, "column": 21 } } @@ -2274,11 +2274,11 @@ "extends": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 1 }, "end": { - "line": 46, + "line": 62, "column": 2 } } @@ -2299,22 +2299,22 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 9 }, "end": { - "line": 47, + "line": 63, "column": 19 } } }, "loc": { "start": { - "line": 47, + "line": 63, "column": 9 }, "end": { - "line": 47, + "line": 63, "column": 19 } } @@ -2322,11 +2322,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 5 }, "end": { - "line": 47, + "line": 63, "column": 7 } } @@ -2334,11 +2334,11 @@ "init": null, "loc": { "start": { - "line": 47, + "line": 63, "column": 5 }, "end": { - "line": 47, + "line": 63, "column": 7 } } @@ -2347,11 +2347,11 @@ "kind": "var", "loc": { "start": { - "line": 47, + "line": 63, "column": 1 }, "end": { - "line": 47, + "line": 63, "column": 20 } } @@ -2375,11 +2375,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 3 } } @@ -2390,11 +2390,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 4 }, "end": { - "line": 48, + "line": 64, "column": 7 } } @@ -2403,11 +2403,11 @@ "optional": false, "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 7 } } @@ -2417,11 +2417,11 @@ "value": 0, "loc": { "start": { - "line": 48, + "line": 64, "column": 8 }, "end": { - "line": 48, + "line": 64, "column": 9 } } @@ -2430,11 +2430,11 @@ "optional": false, "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 10 } } @@ -2445,11 +2445,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 11 }, "end": { - "line": 48, + "line": 64, "column": 14 } } @@ -2458,11 +2458,11 @@ "optional": false, "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 14 } } @@ -2473,11 +2473,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 15 }, "end": { - "line": 48, + "line": 64, "column": 21 } } @@ -2486,11 +2486,11 @@ "optional": false, "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 21 } } @@ -2500,33 +2500,33 @@ "value": 3, "loc": { "start": { - "line": 48, + "line": 64, "column": 24 }, "end": { - "line": 48, + "line": 64, "column": 25 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 25 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 26 } } @@ -2547,11 +2547,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 5 }, "end": { - "line": 52, + "line": 68, "column": 6 } } @@ -2575,11 +2575,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 10 }, "end": { - "line": 52, + "line": 68, "column": 13 } } @@ -2588,22 +2588,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 15 }, "end": { - "line": 52, + "line": 68, "column": 21 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 10 }, "end": { - "line": 52, + "line": 68, "column": 22 } } @@ -2611,11 +2611,11 @@ ], "loc": { "start": { - "line": 52, + "line": 68, "column": 9 }, "end": { - "line": 52, + "line": 68, "column": 22 } } @@ -2634,11 +2634,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 26 }, "end": { - "line": 52, + "line": 68, "column": 29 } } @@ -2647,22 +2647,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 31 }, "end": { - "line": 52, + "line": 68, "column": 37 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 26 }, "end": { - "line": 52, + "line": 68, "column": 38 } } @@ -2670,11 +2670,11 @@ ], "loc": { "start": { - "line": 52, + "line": 68, "column": 25 }, "end": { - "line": 52, + "line": 68, "column": 38 } } @@ -2682,33 +2682,33 @@ ], "loc": { "start": { - "line": 52, + "line": 68, "column": 9 }, "end": { - "line": 52, + "line": 68, "column": 38 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 8 }, "end": { - "line": 52, + "line": 68, "column": 39 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 5 }, "end": { - "line": 53, + "line": 69, "column": 2 } } @@ -2716,11 +2716,11 @@ ], "loc": { "start": { - "line": 51, + "line": 67, "column": 22 }, "end": { - "line": 53, + "line": 69, "column": 2 } } @@ -2731,11 +2731,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 11 }, "end": { - "line": 51, + "line": 67, "column": 21 } } @@ -2743,11 +2743,11 @@ "extends": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 1 }, "end": { - "line": 53, + "line": 69, "column": 2 } } @@ -2768,11 +2768,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 8 } } @@ -2787,44 +2787,44 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 11 }, "end": { - "line": 55, + "line": 71, "column": 21 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 11 }, "end": { - "line": 55, + "line": 71, "column": 21 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 11 }, "end": { - "line": 55, + "line": 71, "column": 23 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 56, + "line": 72, "column": 2 } } @@ -2832,11 +2832,11 @@ ], "loc": { "start": { - "line": 54, + "line": 70, "column": 22 }, "end": { - "line": 56, + "line": 72, "column": 2 } } @@ -2847,11 +2847,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 11 }, "end": { - "line": 54, + "line": 70, "column": 21 } } @@ -2859,11 +2859,11 @@ "extends": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 2 } } @@ -2884,11 +2884,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 8 } } @@ -2901,33 +2901,33 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 11 }, "end": { - "line": 58, + "line": 74, "column": 21 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 11 }, "end": { - "line": 58, + "line": 74, "column": 21 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 22 } } @@ -2935,11 +2935,11 @@ ], "loc": { "start": { - "line": 57, + "line": 73, "column": 22 }, "end": { - "line": 59, + "line": 75, "column": 2 } } @@ -2950,11 +2950,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 11 }, "end": { - "line": 57, + "line": 73, "column": 21 } } @@ -2962,11 +2962,11 @@ "extends": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 59, + "line": 75, "column": 2 } } @@ -2987,22 +2987,22 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 9 }, "end": { - "line": 60, + "line": 76, "column": 19 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 9 }, "end": { - "line": 60, + "line": 76, "column": 19 } } @@ -3010,11 +3010,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 5 }, "end": { - "line": 60, + "line": 76, "column": 7 } } @@ -3022,11 +3022,11 @@ "init": null, "loc": { "start": { - "line": 60, + "line": 76, "column": 5 }, "end": { - "line": 60, + "line": 76, "column": 7 } } @@ -3035,11 +3035,11 @@ "kind": "var", "loc": { "start": { - "line": 60, + "line": 76, "column": 1 }, "end": { - "line": 60, + "line": 76, "column": 20 } } @@ -3065,11 +3065,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 3 } } @@ -3080,11 +3080,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 4 }, "end": { - "line": 61, + "line": 77, "column": 7 } } @@ -3093,11 +3093,11 @@ "optional": false, "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 7 } } @@ -3108,11 +3108,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 8 }, "end": { - "line": 61, + "line": 77, "column": 11 } } @@ -3121,11 +3121,11 @@ "optional": false, "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 11 } } @@ -3135,11 +3135,11 @@ "value": 0, "loc": { "start": { - "line": 61, + "line": 77, "column": 12 }, "end": { - "line": 61, + "line": 77, "column": 13 } } @@ -3148,11 +3148,11 @@ "optional": false, "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 14 } } @@ -3163,11 +3163,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 15 }, "end": { - "line": 61, + "line": 77, "column": 16 } } @@ -3176,11 +3176,11 @@ "optional": false, "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 16 } } @@ -3191,11 +3191,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 17 }, "end": { - "line": 61, + "line": 77, "column": 20 } } @@ -3204,11 +3204,11 @@ "optional": false, "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 20 } } @@ -3218,33 +3218,33 @@ "value": 5, "loc": { "start": { - "line": 61, + "line": 77, "column": 23 }, "end": { - "line": 61, + "line": 77, "column": 24 } } }, "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 24 } } }, "loc": { "start": { - "line": 61, + "line": 77, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 25 } } @@ -3270,11 +3270,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 3 } } @@ -3285,11 +3285,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 4 }, "end": { - "line": 62, + "line": 78, "column": 7 } } @@ -3298,11 +3298,11 @@ "optional": false, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 7 } } @@ -3313,11 +3313,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 8 }, "end": { - "line": 62, + "line": 78, "column": 11 } } @@ -3326,11 +3326,11 @@ "optional": false, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 11 } } @@ -3340,11 +3340,11 @@ "value": 0, "loc": { "start": { - "line": 62, + "line": 78, "column": 12 }, "end": { - "line": 62, + "line": 78, "column": 13 } } @@ -3353,11 +3353,11 @@ "optional": false, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 14 } } @@ -3368,11 +3368,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 15 }, "end": { - "line": 62, + "line": 78, "column": 16 } } @@ -3381,11 +3381,11 @@ "optional": false, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 16 } } @@ -3396,11 +3396,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 17 }, "end": { - "line": 62, + "line": 78, "column": 20 } } @@ -3409,47 +3409,47 @@ "optional": false, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 20 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 62, + "line": 78, "column": 23 }, "end": { - "line": 62, + "line": 78, "column": 28 } } }, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 28 } } }, "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 29 } } @@ -3470,22 +3470,22 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 9 }, "end": { - "line": 63, + "line": 79, "column": 19 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 9 }, "end": { - "line": 63, + "line": 79, "column": 19 } } @@ -3493,11 +3493,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 7 } } @@ -3505,11 +3505,11 @@ "init": null, "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 7 } } @@ -3518,11 +3518,11 @@ "kind": "var", "loc": { "start": { - "line": 63, + "line": 79, "column": 1 }, "end": { - "line": 63, + "line": 79, "column": 20 } } @@ -3548,11 +3548,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 3 } } @@ -3563,11 +3563,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 4 }, "end": { - "line": 64, + "line": 80, "column": 7 } } @@ -3576,11 +3576,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 7 } } @@ -3591,11 +3591,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 8 }, "end": { - "line": 64, + "line": 80, "column": 11 } } @@ -3604,11 +3604,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 11 } } @@ -3618,11 +3618,11 @@ "value": 1, "loc": { "start": { - "line": 64, + "line": 80, "column": 12 }, "end": { - "line": 64, + "line": 80, "column": 13 } } @@ -3631,11 +3631,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 14 } } @@ -3646,11 +3646,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 15 }, "end": { - "line": 64, + "line": 80, "column": 16 } } @@ -3659,11 +3659,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 16 } } @@ -3674,11 +3674,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 17 }, "end": { - "line": 64, + "line": 80, "column": 20 } } @@ -3687,11 +3687,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 20 } } @@ -3712,11 +3712,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 23 }, "end": { - "line": 64, + "line": 80, "column": 25 } } @@ -3727,11 +3727,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 26 }, "end": { - "line": 64, + "line": 80, "column": 29 } } @@ -3740,11 +3740,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 23 }, "end": { - "line": 64, + "line": 80, "column": 29 } } @@ -3755,11 +3755,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 30 }, "end": { - "line": 64, + "line": 80, "column": 33 } } @@ -3768,11 +3768,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 23 }, "end": { - "line": 64, + "line": 80, "column": 33 } } @@ -3782,11 +3782,11 @@ "value": 0, "loc": { "start": { - "line": 64, + "line": 80, "column": 34 }, "end": { - "line": 64, + "line": 80, "column": 35 } } @@ -3795,11 +3795,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 23 }, "end": { - "line": 64, + "line": 80, "column": 36 } } @@ -3810,11 +3810,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 37 }, "end": { - "line": 64, + "line": 80, "column": 38 } } @@ -3823,11 +3823,11 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 23 }, "end": { - "line": 64, + "line": 80, "column": 38 } } @@ -3838,11 +3838,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 39 }, "end": { - "line": 64, + "line": 80, "column": 42 } } @@ -3851,33 +3851,33 @@ "optional": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 23 }, "end": { - "line": 64, + "line": 80, "column": 42 } } }, "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 42 } } }, "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 43 } } @@ -3898,11 +3898,11 @@ "decorators": [], "loc": { "start": { - "line": 68, + "line": 84, "column": 5 }, "end": { - "line": 68, + "line": 84, "column": 6 } } @@ -3911,22 +3911,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 68, + "line": 84, "column": 8 }, "end": { - "line": 68, + "line": 84, "column": 14 } } }, "loc": { "start": { - "line": 68, + "line": 84, "column": 5 }, "end": { - "line": 68, + "line": 84, "column": 15 } } @@ -3942,11 +3942,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 69, + "line": 85, "column": 6 } } @@ -3955,22 +3955,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 69, + "line": 85, "column": 8 }, "end": { - "line": 69, + "line": 85, "column": 14 } } }, "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 69, + "line": 85, "column": 15 } } @@ -3986,11 +3986,11 @@ "decorators": [], "loc": { "start": { - "line": 70, + "line": 86, "column": 5 }, "end": { - "line": 70, + "line": 86, "column": 6 } } @@ -3999,22 +3999,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 70, + "line": 86, "column": 8 }, "end": { - "line": 70, + "line": 86, "column": 14 } } }, "loc": { "start": { - "line": 70, + "line": 86, "column": 5 }, "end": { - "line": 70, + "line": 86, "column": 15 } } @@ -4022,11 +4022,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 22 }, "end": { - "line": 71, + "line": 87, "column": 2 } } @@ -4037,11 +4037,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 11 }, "end": { - "line": 67, + "line": 83, "column": 21 } } @@ -4049,11 +4049,11 @@ "extends": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 1 }, "end": { - "line": 71, + "line": 87, "column": 2 } } @@ -4074,11 +4074,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 5 }, "end": { - "line": 73, + "line": 89, "column": 6 } } @@ -4087,22 +4087,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 73, + "line": 89, "column": 8 }, "end": { - "line": 73, + "line": 89, "column": 14 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 5 }, "end": { - "line": 74, + "line": 90, "column": 2 } } @@ -4110,11 +4110,11 @@ ], "loc": { "start": { - "line": 72, + "line": 88, "column": 42 }, "end": { - "line": 74, + "line": 90, "column": 2 } } @@ -4125,11 +4125,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 11 }, "end": { - "line": 72, + "line": 88, "column": 22 } } @@ -4138,27 +4138,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "Interface9", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "Interface9", + "decorators": [], + "loc": { + "start": { + "line": 88, + "column": 31 + }, + "end": { + "line": 88, + "column": 41 + } + } + }, "loc": { "start": { - "line": 72, - "column": 31 + "line": 88, + "column": 42 }, "end": { - "line": 72, + "line": 88, "column": 41 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 42 }, "end": { - "line": 72, + "line": 88, "column": 41 } } @@ -4166,11 +4179,11 @@ ], "loc": { "start": { - "line": 72, + "line": 88, "column": 1 }, "end": { - "line": 74, + "line": 90, "column": 2 } } @@ -4191,22 +4204,22 @@ "decorators": [], "loc": { "start": { - "line": 75, + "line": 91, "column": 12 }, "end": { - "line": 75, + "line": 91, "column": 23 } } }, "loc": { "start": { - "line": 75, + "line": 91, "column": 12 }, "end": { - "line": 75, + "line": 91, "column": 23 } } @@ -4214,11 +4227,11 @@ "decorators": [], "loc": { "start": { - "line": 75, + "line": 91, "column": 5 }, "end": { - "line": 75, + "line": 91, "column": 10 } } @@ -4226,11 +4239,11 @@ "init": null, "loc": { "start": { - "line": 75, + "line": 91, "column": 5 }, "end": { - "line": 75, + "line": 91, "column": 10 } } @@ -4239,11 +4252,11 @@ "kind": "var", "loc": { "start": { - "line": 75, + "line": 91, "column": 1 }, "end": { - "line": 75, + "line": 91, "column": 24 } } @@ -4261,11 +4274,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 1 }, "end": { - "line": 76, + "line": 92, "column": 6 } } @@ -4276,11 +4289,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 7 }, "end": { - "line": 76, + "line": 92, "column": 8 } } @@ -4289,11 +4302,11 @@ "optional": false, "loc": { "start": { - "line": 76, + "line": 92, "column": 1 }, "end": { - "line": 76, + "line": 92, "column": 8 } } @@ -4303,33 +4316,33 @@ "value": 5, "loc": { "start": { - "line": 76, + "line": 92, "column": 11 }, "end": { - "line": 76, + "line": 92, "column": 12 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 1 }, "end": { - "line": 76, + "line": 92, "column": 12 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 1 }, "end": { - "line": 76, + "line": 92, "column": 13 } } @@ -4347,11 +4360,11 @@ "decorators": [], "loc": { "start": { - "line": 77, + "line": 93, "column": 1 }, "end": { - "line": 77, + "line": 93, "column": 6 } } @@ -4362,11 +4375,11 @@ "decorators": [], "loc": { "start": { - "line": 77, + "line": 93, "column": 7 }, "end": { - "line": 77, + "line": 93, "column": 8 } } @@ -4375,47 +4388,47 @@ "optional": false, "loc": { "start": { - "line": 77, + "line": 93, "column": 1 }, "end": { - "line": 77, + "line": 93, "column": 8 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 77, + "line": 93, "column": 11 }, "end": { - "line": 77, + "line": 93, "column": 16 } } }, "loc": { "start": { - "line": 77, + "line": 93, "column": 1 }, "end": { - "line": 77, + "line": 93, "column": 16 } } }, "loc": { "start": { - "line": 77, + "line": 93, "column": 1 }, "end": { - "line": 77, + "line": 93, "column": 17 } } @@ -4433,11 +4446,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 1 }, "end": { - "line": 78, + "line": 94, "column": 6 } } @@ -4448,11 +4461,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 7 }, "end": { - "line": 78, + "line": 94, "column": 8 } } @@ -4461,11 +4474,11 @@ "optional": false, "loc": { "start": { - "line": 78, + "line": 94, "column": 1 }, "end": { - "line": 78, + "line": 94, "column": 8 } } @@ -4475,33 +4488,33 @@ "value": 5, "loc": { "start": { - "line": 78, + "line": 94, "column": 11 }, "end": { - "line": 78, + "line": 94, "column": 12 } } }, "loc": { "start": { - "line": 78, + "line": 94, "column": 1 }, "end": { - "line": 78, + "line": 94, "column": 12 } } }, "loc": { "start": { - "line": 78, + "line": 94, "column": 1 }, "end": { - "line": 78, + "line": 94, "column": 13 } } @@ -4519,11 +4532,11 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 95, "column": 1 }, "end": { - "line": 79, + "line": 95, "column": 6 } } @@ -4534,11 +4547,11 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 95, "column": 7 }, "end": { - "line": 79, + "line": 95, "column": 8 } } @@ -4547,11 +4560,11 @@ "optional": false, "loc": { "start": { - "line": 79, + "line": 95, "column": 1 }, "end": { - "line": 79, + "line": 95, "column": 8 } } @@ -4561,33 +4574,33 @@ "value": 5, "loc": { "start": { - "line": 79, + "line": 95, "column": 11 }, "end": { - "line": 79, + "line": 95, "column": 12 } } }, "loc": { "start": { - "line": 79, + "line": 95, "column": 1 }, "end": { - "line": 79, + "line": 95, "column": 12 } } }, "loc": { "start": { - "line": 79, + "line": 95, "column": 1 }, "end": { - "line": 79, + "line": 95, "column": 13 } } @@ -4614,11 +4627,11 @@ "decorators": [], "loc": { "start": { - "line": 80, + "line": 96, "column": 14 }, "end": { - "line": 80, + "line": 96, "column": 15 } } @@ -4632,22 +4645,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 80, + "line": 96, "column": 17 }, "end": { - "line": 80, + "line": 96, "column": 23 } } }, "loc": { "start": { - "line": 80, + "line": 96, "column": 17 }, "end": { - "line": 80, + "line": 96, "column": 25 } } @@ -4659,11 +4672,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 80, + "line": 96, "column": 29 }, "end": { - "line": 80, + "line": 96, "column": 36 } } @@ -4672,11 +4685,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 80, + "line": 96, "column": 37 }, "end": { - "line": 80, + "line": 96, "column": 44 } } @@ -4685,11 +4698,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 80, + "line": 96, "column": 45 }, "end": { - "line": 80, + "line": 96, "column": 52 } } @@ -4697,11 +4710,11 @@ ], "loc": { "start": { - "line": 80, + "line": 96, "column": 28 }, "end": { - "line": 80, + "line": 96, "column": 52 } } @@ -4709,22 +4722,22 @@ ], "loc": { "start": { - "line": 80, + "line": 96, "column": 17 }, "end": { - "line": 80, + "line": 96, "column": 52 } } }, "loc": { "start": { - "line": 80, + "line": 96, "column": 14 }, "end": { - "line": 80, + "line": 96, "column": 53 } } @@ -4739,11 +4752,11 @@ "decorators": [], "loc": { "start": { - "line": 80, + "line": 96, "column": 54 }, "end": { - "line": 80, + "line": 96, "column": 55 } } @@ -4758,22 +4771,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 80, + "line": 96, "column": 59 }, "end": { - "line": 80, + "line": 96, "column": 65 } } }, "loc": { "start": { - "line": 80, + "line": 96, "column": 59 }, "end": { - "line": 80, + "line": 96, "column": 67 } } @@ -4781,11 +4794,11 @@ "decorators": [], "loc": { "start": { - "line": 80, + "line": 96, "column": 56 }, "end": { - "line": 80, + "line": 96, "column": 57 } } @@ -4797,33 +4810,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 80, + "line": 96, "column": 70 }, "end": { - "line": 80, + "line": 96, "column": 76 } } }, "loc": { "start": { - "line": 80, + "line": 96, "column": 70 }, "end": { - "line": 80, + "line": 96, "column": 78 } } }, "loc": { "start": { - "line": 80, + "line": 96, "column": 54 }, "end": { - "line": 80, + "line": 96, "column": 80 } } @@ -4831,11 +4844,11 @@ ], "loc": { "start": { - "line": 80, + "line": 96, "column": 12 }, "end": { - "line": 80, + "line": 96, "column": 80 } } @@ -4843,11 +4856,11 @@ "decorators": [], "loc": { "start": { - "line": 80, + "line": 96, "column": 5 }, "end": { - "line": 80, + "line": 96, "column": 10 } } @@ -4855,11 +4868,11 @@ "init": null, "loc": { "start": { - "line": 80, + "line": 96, "column": 5 }, "end": { - "line": 80, + "line": 96, "column": 10 } } @@ -4868,11 +4881,11 @@ "kind": "var", "loc": { "start": { - "line": 80, + "line": 96, "column": 1 }, "end": { - "line": 80, + "line": 96, "column": 81 } } @@ -4890,11 +4903,11 @@ "decorators": [], "loc": { "start": { - "line": 81, + "line": 97, "column": 1 }, "end": { - "line": 81, + "line": 97, "column": 6 } } @@ -4905,11 +4918,11 @@ "decorators": [], "loc": { "start": { - "line": 81, + "line": 97, "column": 7 }, "end": { - "line": 81, + "line": 97, "column": 8 } } @@ -4918,11 +4931,11 @@ "optional": false, "loc": { "start": { - "line": 81, + "line": 97, "column": 1 }, "end": { - "line": 81, + "line": 97, "column": 8 } } @@ -4935,11 +4948,11 @@ "value": 1, "loc": { "start": { - "line": 81, + "line": 97, "column": 12 }, "end": { - "line": 81, + "line": 97, "column": 13 } } @@ -4949,11 +4962,11 @@ "value": 2, "loc": { "start": { - "line": 81, + "line": 97, "column": 15 }, "end": { - "line": 81, + "line": 97, "column": 16 } } @@ -4963,11 +4976,11 @@ "value": 3, "loc": { "start": { - "line": 81, + "line": 97, "column": 18 }, "end": { - "line": 81, + "line": 97, "column": 19 } } @@ -4975,33 +4988,33 @@ ], "loc": { "start": { - "line": 81, + "line": 97, "column": 11 }, "end": { - "line": 81, + "line": 97, "column": 20 } } }, "loc": { "start": { - "line": 81, + "line": 97, "column": 1 }, "end": { - "line": 81, + "line": 97, "column": 20 } } }, "loc": { "start": { - "line": 81, + "line": 97, "column": 1 }, "end": { - "line": 81, + "line": 97, "column": 21 } } @@ -5019,11 +5032,11 @@ "decorators": [], "loc": { "start": { - "line": 82, + "line": 98, "column": 1 }, "end": { - "line": 82, + "line": 98, "column": 6 } } @@ -5034,11 +5047,11 @@ "decorators": [], "loc": { "start": { - "line": 82, + "line": 98, "column": 7 }, "end": { - "line": 82, + "line": 98, "column": 8 } } @@ -5047,11 +5060,11 @@ "optional": false, "loc": { "start": { - "line": 82, + "line": 98, "column": 1 }, "end": { - "line": 82, + "line": 98, "column": 8 } } @@ -5061,42 +5074,42 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 82, + "line": 98, "column": 12 }, "end": { - "line": 82, + "line": 98, "column": 17 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 82, + "line": 98, "column": 19 }, "end": { - "line": 82, + "line": 98, "column": 24 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 82, + "line": 98, "column": 26 }, "end": { - "line": 82, + "line": 98, "column": 31 } } @@ -5104,33 +5117,33 @@ ], "loc": { "start": { - "line": 82, + "line": 98, "column": 11 }, "end": { - "line": 82, + "line": 98, "column": 32 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 1 }, "end": { - "line": 82, + "line": 98, "column": 32 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 1 }, "end": { - "line": 82, + "line": 98, "column": 33 } } @@ -5148,11 +5161,11 @@ "decorators": [], "loc": { "start": { - "line": 83, + "line": 99, "column": 1 }, "end": { - "line": 83, + "line": 99, "column": 6 } } @@ -5163,11 +5176,11 @@ "decorators": [], "loc": { "start": { - "line": 83, + "line": 99, "column": 7 }, "end": { - "line": 83, + "line": 99, "column": 8 } } @@ -5176,11 +5189,11 @@ "optional": false, "loc": { "start": { - "line": 83, + "line": 99, "column": 1 }, "end": { - "line": 83, + "line": 99, "column": 8 } } @@ -5205,33 +5218,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 83, + "line": 99, "column": 25 }, "end": { - "line": 83, + "line": 99, "column": 31 } } }, "loc": { "start": { - "line": 83, + "line": 99, "column": 25 }, "end": { - "line": 83, + "line": 99, "column": 33 } } }, "loc": { "start": { - "line": 83, + "line": 99, "column": 24 }, "end": { - "line": 83, + "line": 99, "column": 34 } } @@ -5239,11 +5252,11 @@ "decorators": [], "loc": { "start": { - "line": 83, + "line": 99, "column": 21 }, "end": { - "line": 83, + "line": 99, "column": 22 } } @@ -5259,42 +5272,42 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 83, + "line": 99, "column": 46 }, "end": { - "line": 83, + "line": 99, "column": 51 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 83, + "line": 99, "column": 53 }, "end": { - "line": 83, + "line": 99, "column": 58 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 83, + "line": 99, "column": 60 }, "end": { - "line": 83, + "line": 99, "column": 65 } } @@ -5302,22 +5315,22 @@ ], "loc": { "start": { - "line": 83, + "line": 99, "column": 45 }, "end": { - "line": 83, + "line": 99, "column": 66 } } }, "loc": { "start": { - "line": 83, + "line": 99, "column": 38 }, "end": { - "line": 83, + "line": 99, "column": 66 } } @@ -5325,55 +5338,55 @@ ], "loc": { "start": { - "line": 83, + "line": 99, "column": 36 }, "end": { - "line": 83, + "line": 99, "column": 68 } } }, "loc": { "start": { - "line": 83, + "line": 99, "column": 11 }, "end": { - "line": 83, + "line": 99, "column": 68 } } }, "loc": { "start": { - "line": 83, + "line": 99, "column": 11 }, "end": { - "line": 83, + "line": 99, "column": 68 } } }, "loc": { "start": { - "line": 83, + "line": 99, "column": 1 }, "end": { - "line": 83, + "line": 99, "column": 68 } } }, "loc": { "start": { - "line": 83, + "line": 99, "column": 1 }, "end": { - "line": 83, + "line": 99, "column": 69 } } @@ -5394,11 +5407,11 @@ "decorators": [], "loc": { "start": { - "line": 86, + "line": 102, "column": 5 }, "end": { - "line": 86, + "line": 102, "column": 6 } } @@ -5407,22 +5420,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 86, + "line": 102, "column": 8 }, "end": { - "line": 86, + "line": 102, "column": 14 } } }, "loc": { "start": { - "line": 86, + "line": 102, "column": 5 }, "end": { - "line": 86, + "line": 102, "column": 15 } } @@ -5430,11 +5443,11 @@ ], "loc": { "start": { - "line": 85, + "line": 101, "column": 23 }, "end": { - "line": 87, + "line": 103, "column": 2 } } @@ -5445,11 +5458,11 @@ "decorators": [], "loc": { "start": { - "line": 85, + "line": 101, "column": 11 }, "end": { - "line": 85, + "line": 101, "column": 22 } } @@ -5457,11 +5470,11 @@ "extends": [], "loc": { "start": { - "line": 85, + "line": 101, "column": 1 }, "end": { - "line": 87, + "line": 103, "column": 2 } } @@ -5485,22 +5498,22 @@ "decorators": [], "loc": { "start": { - "line": 89, + "line": 105, "column": 12 }, "end": { - "line": 89, + "line": 105, "column": 23 } } }, "loc": { "start": { - "line": 89, + "line": 105, "column": 12 }, "end": { - "line": 89, + "line": 105, "column": 23 } } @@ -5513,22 +5526,22 @@ "decorators": [], "loc": { "start": { - "line": 89, + "line": 105, "column": 26 }, "end": { - "line": 89, + "line": 105, "column": 37 } } }, "loc": { "start": { - "line": 89, + "line": 105, "column": 26 }, "end": { - "line": 89, + "line": 105, "column": 37 } } @@ -5536,11 +5549,11 @@ ], "loc": { "start": { - "line": 89, + "line": 105, "column": 12 }, "end": { - "line": 89, + "line": 105, "column": 37 } } @@ -5548,11 +5561,11 @@ "decorators": [], "loc": { "start": { - "line": 89, + "line": 105, "column": 5 }, "end": { - "line": 89, + "line": 105, "column": 10 } } @@ -5560,11 +5573,11 @@ "init": null, "loc": { "start": { - "line": 89, + "line": 105, "column": 5 }, "end": { - "line": 89, + "line": 105, "column": 10 } } @@ -5573,11 +5586,11 @@ "kind": "var", "loc": { "start": { - "line": 89, + "line": 105, "column": 1 }, "end": { - "line": 89, + "line": 105, "column": 38 } } @@ -5592,11 +5605,11 @@ "decorators": [], "loc": { "start": { - "line": 90, + "line": 106, "column": 1 }, "end": { - "line": 90, + "line": 106, "column": 6 } } @@ -5607,11 +5620,11 @@ "decorators": [], "loc": { "start": { - "line": 90, + "line": 106, "column": 7 }, "end": { - "line": 90, + "line": 106, "column": 8 } } @@ -5620,22 +5633,22 @@ "optional": false, "loc": { "start": { - "line": 90, + "line": 106, "column": 1 }, "end": { - "line": 90, + "line": 106, "column": 8 } } }, "loc": { "start": { - "line": 90, + "line": 106, "column": 1 }, "end": { - "line": 90, + "line": 106, "column": 9 } } @@ -5662,11 +5675,11 @@ "decorators": [], "loc": { "start": { - "line": 92, + "line": 108, "column": 23 }, "end": { - "line": 92, + "line": 108, "column": 24 } } @@ -5685,11 +5698,11 @@ "decorators": [], "loc": { "start": { - "line": 92, + "line": 108, "column": 28 }, "end": { - "line": 92, + "line": 108, "column": 29 } } @@ -5698,22 +5711,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 92, + "line": 108, "column": 31 }, "end": { - "line": 92, + "line": 108, "column": 37 } } }, "loc": { "start": { - "line": 92, + "line": 108, "column": 28 }, "end": { - "line": 92, + "line": 108, "column": 39 } } @@ -5721,22 +5734,22 @@ ], "loc": { "start": { - "line": 92, + "line": 108, "column": 26 }, "end": { - "line": 92, + "line": 108, "column": 39 } } }, "loc": { "start": { - "line": 92, + "line": 108, "column": 14 }, "end": { - "line": 92, + "line": 108, "column": 41 } } @@ -5744,11 +5757,11 @@ ], "loc": { "start": { - "line": 92, + "line": 108, "column": 12 }, "end": { - "line": 92, + "line": 108, "column": 41 } } @@ -5756,11 +5769,11 @@ "decorators": [], "loc": { "start": { - "line": 92, + "line": 108, "column": 5 }, "end": { - "line": 92, + "line": 108, "column": 10 } } @@ -5768,11 +5781,11 @@ "init": null, "loc": { "start": { - "line": 92, + "line": 108, "column": 5 }, "end": { - "line": 92, + "line": 108, "column": 10 } } @@ -5781,11 +5794,11 @@ "kind": "var", "loc": { "start": { - "line": 92, + "line": 108, "column": 1 }, "end": { - "line": 92, + "line": 108, "column": 42 } } @@ -5805,11 +5818,11 @@ "decorators": [], "loc": { "start": { - "line": 93, + "line": 109, "column": 1 }, "end": { - "line": 93, + "line": 109, "column": 6 } } @@ -5820,11 +5833,11 @@ "decorators": [], "loc": { "start": { - "line": 93, + "line": 109, "column": 7 }, "end": { - "line": 93, + "line": 109, "column": 8 } } @@ -5833,11 +5846,11 @@ "optional": false, "loc": { "start": { - "line": 93, + "line": 109, "column": 1 }, "end": { - "line": 93, + "line": 109, "column": 8 } } @@ -5848,11 +5861,11 @@ "decorators": [], "loc": { "start": { - "line": 93, + "line": 109, "column": 9 }, "end": { - "line": 93, + "line": 109, "column": 10 } } @@ -5861,11 +5874,11 @@ "optional": false, "loc": { "start": { - "line": 93, + "line": 109, "column": 1 }, "end": { - "line": 93, + "line": 109, "column": 10 } } @@ -5875,33 +5888,33 @@ "value": 3, "loc": { "start": { - "line": 93, + "line": 109, "column": 13 }, "end": { - "line": 93, + "line": 109, "column": 14 } } }, "loc": { "start": { - "line": 93, + "line": 109, "column": 1 }, "end": { - "line": 93, + "line": 109, "column": 14 } } }, "loc": { "start": { - "line": 93, + "line": 109, "column": 1 }, "end": { - "line": 93, + "line": 109, "column": 15 } } @@ -5913,7 +5926,7 @@ "column": 1 }, "end": { - "line": 93, + "line": 109, "column": 15 } } diff --git a/es2panda/test/compiler/ts/member_expression_1-expected.txt b/es2panda/test/compiler/ts/member_expression_1-expected.txt index e51fdba14cb390e9a362be5569921fdf4f9d0584..4e57d01aad4fb4ae437b910450e9d2b3519f1028 100644 --- a/es2panda/test/compiler/ts/member_expression_1-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_1-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -290,11 +290,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -318,11 +318,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -346,11 +346,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -361,11 +361,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 18 } } @@ -374,33 +374,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -412,9 +412,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_1.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_1.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_10-expected.txt b/es2panda/test/compiler/ts/member_expression_10-expected.txt index e41bad7cd40a2f11ef06ef7ee7155c326abf3f8e..6284c00386c4cf7b9aeb09a2ba67c92e9d9b0978 100644 --- a/es2panda/test/compiler/ts/member_expression_10-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_10-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_10.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_10.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_11-expected.txt b/es2panda/test/compiler/ts/member_expression_11-expected.txt index 7a00cdb3a435772bdcafa22e710f72192bed2de3..be22b32ac51ce1f26cfe658c013c34647c23e1f7 100644 --- a/es2panda/test/compiler/ts/member_expression_11-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_11-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_11.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_11.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_12-expected.txt b/es2panda/test/compiler/ts/member_expression_12-expected.txt index 54885999ba99a24912f6429c605f5cada99cf0e9..dc542b8fce73897553da25b172323d05b586653f 100644 --- a/es2panda/test/compiler/ts/member_expression_12-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_12-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_12.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_12.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_13-expected.txt b/es2panda/test/compiler/ts/member_expression_13-expected.txt index d37c6e6312cdf094df9b2f0dfcb8dd961ead82a8..7b8ab3f554dba5517689d72858c54553cb4b598d 100644 --- a/es2panda/test/compiler/ts/member_expression_13-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_13-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_13.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_13.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_14-expected.txt b/es2panda/test/compiler/ts/member_expression_14-expected.txt index 5ef2e83b6e71f02e2f19a5d0b1a39d0c94753111..9d6ceb9b64daf6d1280d985b045db2b12d8fc602 100644 --- a/es2panda/test/compiler/ts/member_expression_14-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_14-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_14.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_14.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_15-expected.txt b/es2panda/test/compiler/ts/member_expression_15-expected.txt index b6289567e79a29a1126e3635e6f48ac5e358d496..f07b338e8ac696227c441b03c0c9bddfdb2893ae 100644 --- a/es2panda/test/compiler/ts/member_expression_15-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_15-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_15.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_15.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_16-expected.txt b/es2panda/test/compiler/ts/member_expression_16-expected.txt index 099fddac58ea9a15391f3196aada94da550f8fec..b64172e1f129a1628ecd5d6e7a195c2587d5b106 100644 --- a/es2panda/test/compiler/ts/member_expression_16-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_16-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_16.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_16.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_17-expected.txt b/es2panda/test/compiler/ts/member_expression_17-expected.txt index 41558ced0cae5a1def77630f2a4d7926a1b98594..2c7ab57c10ea3a7e10d857a41686e779543f8758 100644 --- a/es2panda/test/compiler/ts/member_expression_17-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_17-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_17.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_17.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_18-expected.txt b/es2panda/test/compiler/ts/member_expression_18-expected.txt index d8978a0793f983c6da6876f094f58ccfef6c855f..d7548a51490d3e76a63725dda26b81a7f5ca3cdc 100644 --- a/es2panda/test/compiler/ts/member_expression_18-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_18-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_18.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_18.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_19-expected.txt b/es2panda/test/compiler/ts/member_expression_19-expected.txt index 81a062352d2f8725dd3d6f155ddb35f4b82a3fb0..4d9e08142dfc4c99507b7931994d4b6f9663dcbb 100644 --- a/es2panda/test/compiler/ts/member_expression_19-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_19-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_19.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_19.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_2-expected.txt b/es2panda/test/compiler/ts/member_expression_2-expected.txt index f4514dda596c4ec915f2c5f1bc333b1ba151019f..92965f73dd2f642a663964f8c18a3e418aac4b4b 100644 --- a/es2panda/test/compiler/ts/member_expression_2-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_2-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -290,11 +290,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -318,11 +318,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -346,25 +346,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -373,33 +373,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -411,9 +411,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_2.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_2.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_20-expected.txt b/es2panda/test/compiler/ts/member_expression_20-expected.txt index 12edcf24e58b9b06866d39443de5c9555ea028aa..4ece6a16c8e9021acd7a1e51248d412bfead665b 100644 --- a/es2panda/test/compiler/ts/member_expression_20-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_20-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_20.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_20.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_21-expected.txt b/es2panda/test/compiler/ts/member_expression_21-expected.txt index f6055a3861b51bbdb3cbba3c95e7aa16c1dbf824..45a12fdd6cf5ba909f366d5e3e0af1af3a0f431e 100644 --- a/es2panda/test/compiler/ts/member_expression_21-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_21-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_21.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_21.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_22-expected.txt b/es2panda/test/compiler/ts/member_expression_22-expected.txt index daebfdc03f20fe15d52edefb800e89283e8ce7e3..6e44106af9c2ef570a2835b946b86fc3fffc1ac7 100644 --- a/es2panda/test/compiler/ts/member_expression_22-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_22-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_22.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_22.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_23-expected.txt b/es2panda/test/compiler/ts/member_expression_23-expected.txt index 2029e5f9578b5c1cfef683dfe922d3b000e4e579..6d26833a93c0105edbbc6dbc2bedd2ffb2d11112 100644 --- a/es2panda/test/compiler/ts/member_expression_23-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_23-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_23.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_23.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_24-expected.txt b/es2panda/test/compiler/ts/member_expression_24-expected.txt index cdd3431979d499e71e4e9da2832d5af25ff88886..ce33201cf5cfa90dd2a05a7f9540fd66053673a7 100644 --- a/es2panda/test/compiler/ts/member_expression_24-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_24-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_24.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_24.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_25-expected.txt b/es2panda/test/compiler/ts/member_expression_25-expected.txt index 3d1f837985c0044e6a9ba5abfca3ef8e45b9f1e2..6dd5512f1a3168c27907ceaed91bbba6ecf6009b 100644 --- a/es2panda/test/compiler/ts/member_expression_25-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_25-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_25.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_25.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_26-expected.txt b/es2panda/test/compiler/ts/member_expression_26-expected.txt index 0c04dc3627542df24d96da321e6a67232374a766..f626a24e351bc754c784f593941195e0f94a5fa4 100644 --- a/es2panda/test/compiler/ts/member_expression_26-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_26-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_26.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_26.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_27-expected.txt b/es2panda/test/compiler/ts/member_expression_27-expected.txt index 329912b523dcd84b9049c6d18050baf7ed3ae2f1..14ddb0c005f8d9bd8ad6d1f4e99d2551e03fae74 100644 --- a/es2panda/test/compiler/ts/member_expression_27-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_27-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_27.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_27.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_28-expected.txt b/es2panda/test/compiler/ts/member_expression_28-expected.txt index 250b0c6ba02ef0460791a3c30ba067d675dafb2c..b4d95a819e971017164baebb5a26c09a9707e254 100644 --- a/es2panda/test/compiler/ts/member_expression_28-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_28-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_28.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_28.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_29-expected.txt b/es2panda/test/compiler/ts/member_expression_29-expected.txt index 0ad84babd3e11853b8884d7fd7f88bd238b42f0c..4b2a43324d349bf40cf7b719107e94a853fc5b6e 100644 --- a/es2panda/test/compiler/ts/member_expression_29-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_29-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_29.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_29.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_3-expected.txt b/es2panda/test/compiler/ts/member_expression_3-expected.txt index 12d8e5036acbd37c54f2bea61302fcc783d84e50..627fbfb73b1c08ec890f1dc34e5963c4bdf640ef 100644 --- a/es2panda/test/compiler/ts/member_expression_3-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_3-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -290,11 +290,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -318,11 +318,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -346,11 +346,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -361,11 +361,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 18 } } @@ -374,33 +374,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -412,9 +412,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_3.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_3.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_30-expected.txt b/es2panda/test/compiler/ts/member_expression_30-expected.txt index 0b84ff6d570bb46ab2be85e9c2ef900dc32c50b2..5962538dc4ee6253b8fa316d465e15f7090be44e 100644 --- a/es2panda/test/compiler/ts/member_expression_30-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_30-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_30.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_30.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_31-expected.txt b/es2panda/test/compiler/ts/member_expression_31-expected.txt index 29268b67bd4884b75e513fcb3d4bcbb7c53716d5..9c0c36d4ffbe86460deae8e339b58a9f30ae9685 100644 --- a/es2panda/test/compiler/ts/member_expression_31-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_31-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_31.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_31.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_32-expected.txt b/es2panda/test/compiler/ts/member_expression_32-expected.txt index 396713245a240b20bfcffdbc8ffff59cfbc1550d..8603f08ae44a4f45b480801ef6106b7b8b327068 100644 --- a/es2panda/test/compiler/ts/member_expression_32-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_32-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_32.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_32.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_33-expected.txt b/es2panda/test/compiler/ts/member_expression_33-expected.txt index 656ed1ae9e215cd3fe090643a5e17fed91230d2e..a50608c5d28bac665edec2c560d445fd81858cae 100644 --- a/es2panda/test/compiler/ts/member_expression_33-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_33-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_33.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_33.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_34-expected.txt b/es2panda/test/compiler/ts/member_expression_34-expected.txt index e074b70be5a35427f27a999f3f06fa270c3a3189..51fab04564c1dbb3282269531eed29240fd3efbe 100644 --- a/es2panda/test/compiler/ts/member_expression_34-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_34-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -348,11 +348,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_34.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_34.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_35-expected.txt b/es2panda/test/compiler/ts/member_expression_35-expected.txt index 1482b9bb1731d1b5baabcdd82b802e0f2f6111b7..6d8229e105df2d61d81fd2247ed9ab7c02722b45 100644 --- a/es2panda/test/compiler/ts/member_expression_35-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_35-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -348,25 +348,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_35.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_35.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_36-expected.txt b/es2panda/test/compiler/ts/member_expression_36-expected.txt index 2c02e4e990721b067c83c489d5894a701e0b5f0e..db1d15f825f28eea5294bb32e83b4ca254a9fa44 100644 --- a/es2panda/test/compiler/ts/member_expression_36-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_36-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_36.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_36.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_37-expected.txt b/es2panda/test/compiler/ts/member_expression_37-expected.txt index 599902518613909fc350a88aa84fab78b8b1f24c..254ad778dcc51c650077791b7ae15a741614ec50 100644 --- a/es2panda/test/compiler/ts/member_expression_37-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_37-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_37.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_37.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_38-expected.txt b/es2panda/test/compiler/ts/member_expression_38-expected.txt index 831d9976e9970b8c23a85701f1b743be508f0367..98bd88bf1642bec99d835dce1d87f57f17497ff1 100644 --- a/es2panda/test/compiler/ts/member_expression_38-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_38-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -348,11 +348,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_38.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_38.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_39-expected.txt b/es2panda/test/compiler/ts/member_expression_39-expected.txt index 3e3b0265146a7aaca342e67b85865d7b03b9ce16..2046d4f01814e49eb63ea81ec84f2b7e84fcca87 100644 --- a/es2panda/test/compiler/ts/member_expression_39-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_39-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -348,25 +348,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_39.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_39.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_4-expected.txt b/es2panda/test/compiler/ts/member_expression_4-expected.txt index ee70f673e617194ee29988d5cac3675489c3be28..ed22cdc8bc74a2cffff6e64820795445d359a660 100644 --- a/es2panda/test/compiler/ts/member_expression_4-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_4-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -290,11 +290,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -318,11 +318,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -346,25 +346,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -373,33 +373,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -411,9 +411,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_4.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_4.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_40-expected.txt b/es2panda/test/compiler/ts/member_expression_40-expected.txt index ba0d1821a8ad4dee683c55f2eca21b6f10e69939..afbb85b0bf3f3aed1c8f86a44dd6c6bb47c42049 100644 --- a/es2panda/test/compiler/ts/member_expression_40-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_40-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_40.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_40.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_41-expected.txt b/es2panda/test/compiler/ts/member_expression_41-expected.txt index 9af70ff770614ba31734f607b26b476302031a2a..443867174e20fe54af1864fe01d65bfc66bf1d11 100644 --- a/es2panda/test/compiler/ts/member_expression_41-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_41-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_41.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_41.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_42-expected.txt b/es2panda/test/compiler/ts/member_expression_42-expected.txt index 062e5a4ee246afa1e060bcf04dda3c5866e8c5e6..34d91cea370fad4cdc2388f6a325c02989a81f6b 100644 --- a/es2panda/test/compiler/ts/member_expression_42-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_42-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -348,11 +348,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_42.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_42.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_43-expected.txt b/es2panda/test/compiler/ts/member_expression_43-expected.txt index a05e7155d9e99319fb2bae3be96930e08990f8ec..f5f53c5f76c240650567bf860a0c1acea7da2b09 100644 --- a/es2panda/test/compiler/ts/member_expression_43-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_43-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -348,25 +348,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -375,44 +375,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_43.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_43.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_44-expected.txt b/es2panda/test/compiler/ts/member_expression_44-expected.txt index 35a14938cb958914171eb90a6f885ac14736c798..b933a00f69cce9e1fb26570c04ced5a097020cb3 100644 --- a/es2panda/test/compiler/ts/member_expression_44-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_44-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_44.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_44.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_45-expected.txt b/es2panda/test/compiler/ts/member_expression_45-expected.txt index 8182337bac031eac1269436d86211fb3b634e7de..873ffb4401a2970e7191ded8fcb7281a4bee2ff8 100644 --- a/es2panda/test/compiler/ts/member_expression_45-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_45-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,25 +348,25 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -375,44 +375,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -424,9 +424,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_45.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_45.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_46-expected.txt b/es2panda/test/compiler/ts/member_expression_46-expected.txt index da2ef9da655d036640cdbe8be97625c3da07d6de..b90584ad3783f12d1dd24a8fc1e40b081a56675d 100644 --- a/es2panda/test/compiler/ts/member_expression_46-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_46-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -230,11 +230,11 @@ "value": 0, "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -243,33 +243,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -281,9 +281,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_46.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_46.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_47-expected.txt b/es2panda/test/compiler/ts/member_expression_47-expected.txt index 7c131025a240b23323e506848ca7d7b7dc692f5b..c063b632019721feedc2505710cdbd6c3b9c231c 100644 --- a/es2panda/test/compiler/ts/member_expression_47-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_47-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -218,11 +218,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -232,11 +232,11 @@ "value": 0, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -245,44 +245,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -294,9 +294,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_47.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_47.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_48-expected.txt b/es2panda/test/compiler/ts/member_expression_48-expected.txt index 55fab14d3136df0e1b98f02fc01a663576e14ea2..96a96d8171a2356724b938ae2c9feb90b89ca39a 100644 --- a/es2panda/test/compiler/ts/member_expression_48-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_48-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -230,11 +230,11 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -243,33 +243,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -281,9 +281,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_48.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_48.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_49-expected.txt b/es2panda/test/compiler/ts/member_expression_49-expected.txt index d4a9b19ca51e67eece79c681819331434e052e4b..336f8a972da18aada7b491f1c8bfbb7b885cfd4f 100644 --- a/es2panda/test/compiler/ts/member_expression_49-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_49-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -218,11 +218,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -232,11 +232,11 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -245,44 +245,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -294,9 +294,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_49.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_49.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_5-expected.txt b/es2panda/test/compiler/ts/member_expression_5-expected.txt index f4b9cc3c6c9aa7ae93df5e9005ad06a010f3f6cf..330ebcd98958e7d341926056b62e0cdbb2be7bfc 100644 --- a/es2panda/test/compiler/ts/member_expression_5-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_5-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -290,11 +290,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -318,11 +318,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -346,11 +346,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -361,11 +361,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 18 } } @@ -374,33 +374,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -412,9 +412,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_5.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_5.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_50-expected.txt b/es2panda/test/compiler/ts/member_expression_50-expected.txt index 3c0fc035c4b298a5071a89a103391344078f8d0c..e37b38a6e78a518ff785aaa3b2265d14db6864cc 100644 --- a/es2panda/test/compiler/ts/member_expression_50-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_50-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -274,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -306,22 +306,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -330,33 +330,33 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -368,9 +368,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_50.ts:4:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_50.ts:20:1] diff --git a/es2panda/test/compiler/ts/member_expression_51-expected.txt b/es2panda/test/compiler/ts/member_expression_51-expected.txt index 940c5c25d9e0b76164c409d0748d17918ab5c81b..268de4aa1daa0fb87a9dbbbbe6389b0eb366e174 100644 --- a/es2panda/test/compiler/ts/member_expression_51-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_51-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -276,11 +276,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -294,11 +294,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -308,22 +308,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -332,44 +332,44 @@ "optional": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -381,9 +381,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [member_expression_51.ts:4:1] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_51.ts:20:1] diff --git a/es2panda/test/compiler/ts/member_expression_52-expected.txt b/es2panda/test/compiler/ts/member_expression_52-expected.txt index dd295c6cc5cd16dedbf1766366a03bba320d6dc6..468080fab7df441d826c3b334f1924380f037338 100644 --- a/es2panda/test/compiler/ts/member_expression_52-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_52-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -274,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -306,22 +306,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -330,33 +330,33 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -368,9 +368,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'string'. [member_expression_52.ts:4:7] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_52.ts:20:7] diff --git a/es2panda/test/compiler/ts/member_expression_53-expected.txt b/es2panda/test/compiler/ts/member_expression_53-expected.txt index 981b99edd9d211f21a2acabb15612da778420ca9..4bb04fcbed6b6d5e0ca2deb308f3b25969d42a5e 100644 --- a/es2panda/test/compiler/ts/member_expression_53-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_53-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -276,11 +276,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -294,11 +294,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -308,22 +308,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -332,44 +332,44 @@ "optional": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -381,9 +381,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'string'. [member_expression_53.ts:4:9] +TypeError: Type 'number' is not assignable to type 'string'. [member_expression_53.ts:20:9] diff --git a/es2panda/test/compiler/ts/member_expression_54-expected.txt b/es2panda/test/compiler/ts/member_expression_54-expected.txt index 851928a31dd61e73a07c61a369a065021665a04c..f19aec6e0ee8d6025b0236b6886af14631f540c7 100644 --- a/es2panda/test/compiler/ts/member_expression_54-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_54-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -230,11 +230,11 @@ "value": 0, "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -243,33 +243,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -281,9 +281,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_54.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_54.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_55-expected.txt b/es2panda/test/compiler/ts/member_expression_55-expected.txt index 80b13e02d42c16429e7501b1cd51612d7468f61a..4cee92a3c8a9af8dfc57d04f0b83b0190ec1f8e2 100644 --- a/es2panda/test/compiler/ts/member_expression_55-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_55-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -218,11 +218,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -232,11 +232,11 @@ "value": 0, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -245,44 +245,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -294,9 +294,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_55.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_55.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_56-expected.txt b/es2panda/test/compiler/ts/member_expression_56-expected.txt index 396eb3ea5e2b86411a2c47a71491063755fb2904..cdcf6dc7c2b9851a3415957cbf55122d7bed3143 100644 --- a/es2panda/test/compiler/ts/member_expression_56-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_56-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -230,11 +230,11 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -243,33 +243,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -281,9 +281,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_56.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_56.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_57-expected.txt b/es2panda/test/compiler/ts/member_expression_57-expected.txt index 7ee757d4a4ec806e04ae7df5d5a0d450543796aa..1da8544c6904138b91c719097341be9bec4f2503 100644 --- a/es2panda/test/compiler/ts/member_expression_57-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_57-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -218,11 +218,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -232,11 +232,11 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -245,44 +245,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -294,9 +294,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_57.ts:3:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_57.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_58-expected.txt b/es2panda/test/compiler/ts/member_expression_58-expected.txt index 91564ba3f8e4dc64cb0b8990bdac0b85a6e19762..21d5af94758a4bf749d4b181cf760664833f0ce7 100644 --- a/es2panda/test/compiler/ts/member_expression_58-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_58-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -274,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -306,22 +306,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -330,33 +330,33 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -368,9 +368,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_58.ts:4:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_58.ts:20:1] diff --git a/es2panda/test/compiler/ts/member_expression_59-expected.txt b/es2panda/test/compiler/ts/member_expression_59-expected.txt index 632769447e5598e4b915af4c023f3d8a14e42063..075d12018d165da49f18c3fd12285d8b14fba50f 100644 --- a/es2panda/test/compiler/ts/member_expression_59-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_59-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -276,11 +276,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -294,11 +294,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -308,22 +308,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -332,44 +332,44 @@ "optional": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -381,9 +381,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_59.ts:4:1] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_59.ts:20:1] diff --git a/es2panda/test/compiler/ts/member_expression_6-expected.txt b/es2panda/test/compiler/ts/member_expression_6-expected.txt index b5a1eb46b36e5a455f358a373550af463c79910f..ddd044d1af9679b5ac4ba9ab525ed851a0fb6d88 100644 --- a/es2panda/test/compiler/ts/member_expression_6-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_6-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -290,11 +290,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -318,11 +318,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -346,25 +346,25 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -373,33 +373,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -411,9 +411,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_6.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_6.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_60-expected.txt b/es2panda/test/compiler/ts/member_expression_60-expected.txt index 8ee08ea1466bb508c4478fd5625147287b5ee051..b7e39c340f4ba6bafe80eaf589de44871e7b2da4 100644 --- a/es2panda/test/compiler/ts/member_expression_60-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_60-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -274,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -306,22 +306,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -330,33 +330,33 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -368,9 +368,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [member_expression_60.ts:4:7] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_60.ts:20:7] diff --git a/es2panda/test/compiler/ts/member_expression_61-expected.txt b/es2panda/test/compiler/ts/member_expression_61-expected.txt index 662a90a6fd4914bc2c1aee433246fa72fa2d4f11..2ee637be1368f8ee80584e638ab0c9b9269b99f4 100644 --- a/es2panda/test/compiler/ts/member_expression_61-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_61-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -276,11 +276,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -294,11 +294,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -308,22 +308,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -332,44 +332,44 @@ "optional": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -381,9 +381,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'bigint'. [member_expression_61.ts:4:9] +TypeError: Type 'number' is not assignable to type 'bigint'. [member_expression_61.ts:20:9] diff --git a/es2panda/test/compiler/ts/member_expression_62-expected.txt b/es2panda/test/compiler/ts/member_expression_62-expected.txt index 628f825b707a57cbd106ab012a11f2a866bf358a..1441bc0ab0c27ec9240e5dfb3826373edcad6690 100644 --- a/es2panda/test/compiler/ts/member_expression_62-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_62-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -230,11 +230,11 @@ "value": 0, "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -243,33 +243,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -281,9 +281,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_62.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_62.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_63-expected.txt b/es2panda/test/compiler/ts/member_expression_63-expected.txt index 8b4552fdd12ce1f999dc4f72ef63589846be60b0..4581ff08ae6b764ace941f1c1abfa785253fd37b 100644 --- a/es2panda/test/compiler/ts/member_expression_63-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_63-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -218,11 +218,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -232,11 +232,11 @@ "value": 0, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -245,44 +245,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -294,9 +294,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_63.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_63.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_64-expected.txt b/es2panda/test/compiler/ts/member_expression_64-expected.txt index b569d1a418c8e2394bc800e7274603935c6e6fc0..9dab4f663b123af61bba6f6ce81080401d80a64d 100644 --- a/es2panda/test/compiler/ts/member_expression_64-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_64-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -230,11 +230,11 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -243,33 +243,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -281,9 +281,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_64.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_64.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_65-expected.txt b/es2panda/test/compiler/ts/member_expression_65-expected.txt index fbde617e2976a86366c8b650b4b59ab6b19845f5..7ee7636cd116a166acf826d778421aae337b12d9 100644 --- a/es2panda/test/compiler/ts/member_expression_65-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_65-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -218,11 +218,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -232,11 +232,11 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -245,44 +245,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -294,9 +294,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_65.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_65.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_66-expected.txt b/es2panda/test/compiler/ts/member_expression_66-expected.txt index 41637141505508069becc19422a5060f160913a4..07b72b46d6bc03f56c0181a92eef38c26b80210a 100644 --- a/es2panda/test/compiler/ts/member_expression_66-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_66-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -200,11 +200,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -274,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -306,22 +306,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -330,33 +330,33 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -368,9 +368,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_66.ts:4:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_66.ts:20:1] diff --git a/es2panda/test/compiler/ts/member_expression_67-expected.txt b/es2panda/test/compiler/ts/member_expression_67-expected.txt index c9dcddc3cbe045265090a8236f3245366cb28259..8e58469e31c8be32b0b9a3fb59deb0ede26d30b3 100644 --- a/es2panda/test/compiler/ts/member_expression_67-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_67-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -200,11 +200,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -276,11 +276,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -294,11 +294,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -308,22 +308,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -332,44 +332,44 @@ "optional": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -381,9 +381,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_67.ts:4:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_67.ts:20:1] diff --git a/es2panda/test/compiler/ts/member_expression_68-expected.txt b/es2panda/test/compiler/ts/member_expression_68-expected.txt index da85cd82b93e4293fdec1b691ee2eb5d33c43fd7..c72500917c9bbd74d8819765fd59b4bfca050109 100644 --- a/es2panda/test/compiler/ts/member_expression_68-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_68-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -274,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -306,22 +306,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -330,33 +330,33 @@ "optional": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -368,9 +368,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'boolean'. [member_expression_68.ts:4:7] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_68.ts:20:7] diff --git a/es2panda/test/compiler/ts/member_expression_69-expected.txt b/es2panda/test/compiler/ts/member_expression_69-expected.txt index cf3cf9717dd9bbc4d461e2ea375b405c445c08ac..a4816cd185babdd08e68a19148964921cb47d48f 100644 --- a/es2panda/test/compiler/ts/member_expression_69-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_69-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -29,11 +29,11 @@ "value": 0, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -57,11 +57,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -71,11 +71,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -85,11 +85,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -97,22 +97,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -142,11 +142,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -179,11 +179,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -200,11 +200,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -212,11 +212,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -224,11 +224,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -276,11 +276,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -294,11 +294,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -308,22 +308,22 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -332,44 +332,44 @@ "optional": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -381,9 +381,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'boolean'. [member_expression_69.ts:4:9] +TypeError: Type 'number' is not assignable to type 'boolean'. [member_expression_69.ts:20:9] diff --git a/es2panda/test/compiler/ts/member_expression_7-expected.txt b/es2panda/test/compiler/ts/member_expression_7-expected.txt index 5c66bd65589606da4491f9d50b0bcf49b0f5ec53..f4795167e010b8bf40a75acb774ef06492e5cfa7 100644 --- a/es2panda/test/compiler/ts/member_expression_7-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_7-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -290,11 +290,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -318,11 +318,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -346,11 +346,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -361,11 +361,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 18 } } @@ -374,33 +374,33 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 18 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -412,9 +412,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Property 'bad' does not exist on type '{ baz: number; }'. [member_expression_7.ts:3:15] +TypeError: Property bad does not exist on this type. [member_expression_7.ts:19:15] diff --git a/es2panda/test/compiler/ts/member_expression_70-expected.txt b/es2panda/test/compiler/ts/member_expression_70-expected.txt index c36d1ade991022d9799a888909721cfa69e01bba..9f962ce631278039b888c116d7c89691bdef1bbb 100644 --- a/es2panda/test/compiler/ts/member_expression_70-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_70-expected.txt @@ -21,11 +21,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -33,11 +33,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -46,11 +46,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -58,11 +58,11 @@ "readonly": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -76,11 +76,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -88,11 +88,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -101,11 +101,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -113,11 +113,11 @@ "readonly": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -125,11 +125,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -137,11 +137,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -149,11 +149,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -162,11 +162,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -198,11 +198,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -211,11 +211,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -225,33 +225,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -263,9 +263,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Index signature in type '{ [b: string]: number; readonly [a: number]: number; }' only permits reading. [member_expression_70.ts:2:1] +TypeError: Cannot assign to this property because it is readonly. [member_expression_70.ts:18:1] diff --git a/es2panda/test/compiler/ts/member_expression_71-expected.txt b/es2panda/test/compiler/ts/member_expression_71-expected.txt index e14151724c055d51fea46cca6e566a033175ac83..d278b0394e0685c45d81d102dbd69484a2ebf6dd 100644 --- a/es2panda/test/compiler/ts/member_expression_71-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_71-expected.txt @@ -21,11 +21,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -33,11 +33,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -46,11 +46,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -58,11 +58,11 @@ "readonly": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -76,11 +76,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -88,11 +88,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -101,11 +101,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -113,11 +113,11 @@ "readonly": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -125,11 +125,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -137,11 +137,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -149,11 +149,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -162,11 +162,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -184,25 +184,25 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -211,11 +211,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -225,33 +225,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -263,9 +263,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Index signature in type '{ readonly [b: string]: number; [a: number]: number; }' only permits reading. [member_expression_71.ts:2:1] +TypeError: Cannot assign to this property because it is readonly. [member_expression_71.ts:18:1] diff --git a/es2panda/test/compiler/ts/member_expression_72-expected.txt b/es2panda/test/compiler/ts/member_expression_72-expected.txt index bf31d7b09cd9fa2b5a0f39967dfc489efd165027..db58cd4100334c479e4dfbe52b8b68c742c013db 100644 --- a/es2panda/test/compiler/ts/member_expression_72-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_72-expected.txt @@ -15,11 +15,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -27,11 +27,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -40,11 +40,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -52,11 +52,11 @@ "readonly": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -70,11 +70,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -95,11 +95,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 27 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -107,11 +107,11 @@ "readonly": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 34 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -134,11 +134,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -146,11 +146,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -171,22 +171,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 11 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -194,11 +194,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -206,11 +206,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -219,11 +219,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -241,11 +241,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -255,11 +255,11 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 3 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -268,11 +268,11 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 5 } } @@ -282,33 +282,33 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 9 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -320,9 +320,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 1 } } } -TypeError: Index signature in type 'foo' only permits reading. [member_expression_72.ts:5:1] +TypeError: Cannot assign to this property because it is readonly. [member_expression_72.ts:21:1] diff --git a/es2panda/test/compiler/ts/member_expression_73-expected.txt b/es2panda/test/compiler/ts/member_expression_73-expected.txt index 111cd3646b74205b7367b082fad589152d5e2e8d..369c912056c7350d973b305b07137c12923e0dff 100644 --- a/es2panda/test/compiler/ts/member_expression_73-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_73-expected.txt @@ -15,11 +15,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -27,11 +27,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -40,11 +40,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -52,11 +52,11 @@ "readonly": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -70,11 +70,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 34 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 26 }, "end": { - "line": 2, + "line": 18, "column": 27 } } @@ -95,11 +95,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 36 }, "end": { - "line": 2, + "line": 18, "column": 42 } } @@ -107,11 +107,11 @@ "readonly": true, "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 43 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -134,11 +134,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -146,11 +146,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -171,22 +171,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 11 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -194,11 +194,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -206,11 +206,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -219,11 +219,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -241,25 +241,25 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 3 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -268,11 +268,11 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -282,33 +282,33 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 13 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 13 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 14 } } @@ -320,9 +320,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 1 } } } -TypeError: Index signature in type 'foo' only permits reading. [member_expression_73.ts:5:1] +TypeError: Cannot assign to this property because it is readonly. [member_expression_73.ts:21:1] diff --git a/es2panda/test/compiler/ts/member_expression_74-expected.txt b/es2panda/test/compiler/ts/member_expression_74-expected.txt index c61cd86268aa1d49ff4c7ecb4f67ceecd7a13ce8..8529f6720d748d9a335af1dc5a1c1ae7234d1708 100644 --- a/es2panda/test/compiler/ts/member_expression_74-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_74-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -46,11 +46,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -59,22 +59,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -82,22 +82,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -105,11 +105,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -117,11 +117,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -129,11 +129,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -142,11 +142,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -166,11 +166,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -181,11 +181,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -194,11 +194,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -209,11 +209,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -222,11 +222,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,33 +236,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -274,9 +274,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Cannot assign to 'c' because it is a read-only property. [member_expression_74.ts:2:5] +TypeError: Cannot assign to this property because it is readonly. [member_expression_74.ts:18:1] diff --git a/es2panda/test/compiler/ts/member_expression_75-expected.txt b/es2panda/test/compiler/ts/member_expression_75-expected.txt index 9b7bdf2df604f97377b24238d3255ca99d75a30a..ce8983276e602c4d968f25917977a30932aa3780 100644 --- a/es2panda/test/compiler/ts/member_expression_75-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_75-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 5, + "line": 21, "column": 19 } } @@ -128,33 +128,33 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 21 }, "end": { - "line": 5, + "line": 21, "column": 24 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 21 }, "end": { - "line": 5, + "line": 21, "column": 24 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -162,11 +162,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -174,11 +174,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -186,11 +186,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -199,11 +199,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 26 } } @@ -223,11 +223,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -238,11 +238,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 3 }, "end": { - "line": 6, + "line": 22, "column": 4 } } @@ -251,11 +251,11 @@ "optional": false, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 4 } } @@ -266,11 +266,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -279,11 +279,11 @@ "optional": false, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -293,33 +293,33 @@ "value": 5, "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 10 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 10 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 11 } } @@ -331,9 +331,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 1 } } } -TypeError: Cannot assign to 'c' because it is a read-only property. [member_expression_75.ts:6:5] +TypeError: Cannot assign to this property because it is readonly. [member_expression_75.ts:22:1] diff --git a/es2panda/test/compiler/ts/member_expression_76-expected.txt b/es2panda/test/compiler/ts/member_expression_76-expected.txt index 65f4625732b95c4825c75a2bcf70693264b4393f..8c6bb3c34b4a37c7ca2df17a4c9d8eeab042633d 100644 --- a/es2panda/test/compiler/ts/member_expression_76-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_76-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -128,33 +128,33 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 15 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 15 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 16 } } @@ -162,11 +162,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 16 } } @@ -174,11 +174,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -186,11 +186,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -199,11 +199,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -223,11 +223,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -238,11 +238,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 3 }, "end": { - "line": 6, + "line": 22, "column": 4 } } @@ -251,11 +251,11 @@ "optional": false, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 4 } } @@ -266,11 +266,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -279,11 +279,11 @@ "optional": false, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -293,33 +293,33 @@ "value": 5, "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 10 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 10 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 11 } } @@ -331,9 +331,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 1 } } } -TypeError: Cannot assign to 'c' because it is a read-only property. [member_expression_76.ts:6:5] +TypeError: Cannot assign to this property because it is readonly. [member_expression_76.ts:22:1] diff --git a/es2panda/test/compiler/ts/member_expression_77-expected.txt b/es2panda/test/compiler/ts/member_expression_77-expected.txt index cf430a873db8e839ad090773dd63d36b8dd62d8b..e2f40713f3b3447742542c8b21ebd22eb2f4f5d7 100644 --- a/es2panda/test/compiler/ts/member_expression_77-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_77-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -46,11 +46,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -59,22 +59,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 31 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -82,22 +82,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 32 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -105,11 +105,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -117,11 +117,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -129,11 +129,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -142,11 +142,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -166,11 +166,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -181,11 +181,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 3 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -194,11 +194,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -209,11 +209,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -222,11 +222,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,33 +236,33 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -274,9 +274,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Cannot assign to 'c' because it is a read-only property. [member_expression_77.ts:2:5] +TypeError: Cannot assign to this property because it is readonly. [member_expression_77.ts:18:1] diff --git a/es2panda/test/compiler/ts/member_expression_78-expected.txt b/es2panda/test/compiler/ts/member_expression_78-expected.txt index 2f8e3612f9080e6752efc30804035a1e71ab3089..fa743606910854b0051cf7770a582404b239a4df 100644 --- a/es2panda/test/compiler/ts/member_expression_78-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_78-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -49,11 +49,11 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -61,11 +61,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -73,22 +73,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -97,11 +97,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -117,11 +117,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -139,22 +139,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 14 } } @@ -162,11 +162,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -179,44 +179,44 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 19 }, "end": { - "line": 5, + "line": 21, "column": 24 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 19 }, "end": { - "line": 5, + "line": 21, "column": 24 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 25 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -225,11 +225,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -247,11 +247,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -262,11 +262,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 3 }, "end": { - "line": 6, + "line": 22, "column": 4 } } @@ -275,11 +275,11 @@ "optional": false, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 4 } } @@ -289,33 +289,33 @@ "value": 1, "loc": { "start": { - "line": 6, + "line": 22, "column": 7 }, "end": { - "line": 6, + "line": 22, "column": 8 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 8 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 9 } } @@ -327,9 +327,8 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 9 } } } -TypeError: Cannot assign to 'a' because it is a read-only property. [member_expression_78.ts:6:3] diff --git a/es2panda/test/compiler/ts/member_expression_79-expected.txt b/es2panda/test/compiler/ts/member_expression_79-expected.txt index 8caee4d032ef8aaa3b6cfadc0d0bbd227f597b32..4c63bd9175043b7462ef45942c1a0e2d3c55cd6f 100644 --- a/es2panda/test/compiler/ts/member_expression_79-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_79-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -105,22 +105,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 9 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -140,11 +140,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -153,11 +153,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -195,22 +195,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 13 }, "end": { - "line": 6, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 10 }, "end": { - "line": 6, + "line": 22, "column": 14 } } @@ -218,11 +218,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -235,44 +235,44 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 19 }, "end": { - "line": 6, + "line": 22, "column": 24 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 19 }, "end": { - "line": 6, + "line": 22, "column": 24 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 25 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -281,11 +281,11 @@ "kind": "var", "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -303,11 +303,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -318,11 +318,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 3 }, "end": { - "line": 7, + "line": 23, "column": 4 } } @@ -331,11 +331,11 @@ "optional": false, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 4 } } @@ -345,33 +345,33 @@ "value": 2, "loc": { "start": { - "line": 7, + "line": 23, "column": 7 }, "end": { - "line": 7, + "line": 23, "column": 8 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 8 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 9 } } @@ -383,9 +383,8 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 9 } } } -TypeError: Cannot assign to 'a' because it is a read-only property. [member_expression_79.ts:7:3] diff --git a/es2panda/test/compiler/ts/member_expression_8-expected.txt b/es2panda/test/compiler/ts/member_expression_8-expected.txt index 7e00d59a654a0240cc162d481020eb4ef8665764..83f90ebbd68272419d354c4b98dc4b60787f1426 100644 --- a/es2panda/test/compiler/ts/member_expression_8-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_8-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -320,11 +320,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -376,44 +376,44 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -425,9 +425,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Property 'bad' does not exist on type '{ baz: number; }'. [member_expression_8.ts:3:18] +TypeError: Property bad does not exist on this type. [member_expression_8.ts:19:18] diff --git a/es2panda/test/compiler/ts/member_expression_80-expected.txt b/es2panda/test/compiler/ts/member_expression_80-expected.txt index 3f09f34e23285b5c305bc00095fcafa3bd85c01e..8df87aa3f2a41c103102f0a4bc99286d3c1e3bab 100644 --- a/es2panda/test/compiler/ts/member_expression_80-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_80-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -39,11 +39,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -53,22 +53,22 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -78,11 +78,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -90,11 +90,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -102,11 +102,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -119,44 +119,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 29 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 29 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -165,11 +165,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -187,11 +187,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -201,11 +201,11 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 3 }, "end": { - "line": 3, + "line": 19, "column": 4 } } @@ -214,11 +214,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -228,33 +228,33 @@ "value": 3, "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -266,9 +266,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } } -TypeError: Index signature in type '{ readonly [x: number]: 3; }' only permits reading. [member_expression_80.ts:3:1] +TypeError: Cannot assign to this property because it is readonly. [member_expression_80.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_81-expected.txt b/es2panda/test/compiler/ts/member_expression_81-expected.txt index 12913e5918b69526c28480990b9137bdfbe625b2..16b1b2f2199f94c9c8597b6be09ef158ee6f0b7a 100644 --- a/es2panda/test/compiler/ts/member_expression_81-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_81-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -36,39 +36,39 @@ "operator": "+", "left": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -78,11 +78,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -90,11 +90,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -102,11 +102,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -119,44 +119,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -165,11 +165,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -187,11 +187,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -202,11 +202,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 3 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -215,11 +215,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -229,33 +229,33 @@ "value": 3, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -267,9 +267,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } } -TypeError: Index signature in type '{ readonly [x: string]: 3; }' only permits reading. [member_expression_81.ts:3:1] +TypeError: Cannot assign to this property because it is readonly. [member_expression_81.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_82-expected.txt b/es2panda/test/compiler/ts/member_expression_82-expected.txt index ebf2f71425b9623e97ccda084fd3204190840d4b..424845f3e9949850397c7c844411115ba0fb51b6 100644 --- a/es2panda/test/compiler/ts/member_expression_82-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_82-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -36,39 +36,39 @@ "operator": "+", "left": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -78,11 +78,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -90,11 +90,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -102,11 +102,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -119,44 +119,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -165,11 +165,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -187,25 +187,25 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "property": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 3 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -214,11 +214,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 9 } } @@ -228,33 +228,33 @@ "value": 3, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -266,9 +266,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 14 } } } -TypeError: Index signature in type '{ readonly [x: string]: 3; }' only permits reading. [member_expression_82.ts:3:1] +TypeError: Cannot assign to this property because it is readonly. [member_expression_82.ts:19:1] diff --git a/es2panda/test/compiler/ts/member_expression_9-expected.txt b/es2panda/test/compiler/ts/member_expression_9-expected.txt index b46d4804e8610484fccf1ed5c1dc1956842d9d06..713af92f8c265de094441d0f9b14eccfd52aff97 100644 --- a/es2panda/test/compiler/ts/member_expression_9-expected.txt +++ b/es2panda/test/compiler/ts/member_expression_9-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -95,11 +95,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -119,11 +119,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -143,11 +143,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -167,22 +167,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -212,11 +212,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -236,11 +236,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -249,11 +249,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 7 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -320,11 +320,11 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -335,11 +335,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -348,11 +348,11 @@ "optional": true, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -376,44 +376,44 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -425,7 +425,7 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } diff --git a/es2panda/test/compiler/ts/new_expression_1-expected.txt b/es2panda/test/compiler/ts/new_expression_1-expected.txt index 808c980e2318a01c2ababdb401ee0dbba5a69c77..5a9579cba1b8667f4f21326c2faae2d5f1331c99 100644 --- a/es2panda/test/compiler/ts/new_expression_1-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_1-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_1.ts:2:23] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_1.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_10-expected.txt b/es2panda/test/compiler/ts/new_expression_10-expected.txt index 9288a1a4d0c1595469aee94e771c437677057462..f4bd24ab1af7a3a01485be4a4b403f5be681c72f 100644 --- a/es2panda/test/compiler/ts/new_expression_10-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_10-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_10.ts:2:17] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_10.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_100-expected.txt b/es2panda/test/compiler/ts/new_expression_100-expected.txt index a6ce2ac0f6c22c5ad4c5c51a2e784299047ff6e1..da53d52a20bfc928468023173fc242df5a3a7f2f 100644 --- a/es2panda/test/compiler/ts/new_expression_100-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_100-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,28 +170,28 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [new_expression_100.ts:2:23] +TypeError: Type 'string' is not assignable to type 'number'. [new_expression_100.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_101-expected.txt b/es2panda/test/compiler/ts/new_expression_101-expected.txt index 67fcc24c8a15d1e4e8f00830c4c19bdd6ce0ff8c..0957173365a067a8fd5dcb0c5e27c650b0485995 100644 --- a/es2panda/test/compiler/ts/new_expression_101-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_101-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_101.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_101.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_102-expected.txt b/es2panda/test/compiler/ts/new_expression_102-expected.txt index 9bc7ee391a19da865d60a4b5f951eba994be67fe..fb376f333c0c6624b289141a2370a6cf5f87cd03 100644 --- a/es2panda/test/compiler/ts/new_expression_102-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_102-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_102.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_102.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_103-expected.txt b/es2panda/test/compiler/ts/new_expression_103-expected.txt index 13f7f8bfa870072c0608ba5ab60e5c0324769da8..178b4f052481a26f501d49c943c0f9327607b2e6 100644 --- a/es2panda/test/compiler/ts/new_expression_103-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_103-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_103.ts:2:17] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_103.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_104-expected.txt b/es2panda/test/compiler/ts/new_expression_104-expected.txt index 3603bb160d8dcba2c9337e820eda9676b16b3b50..e9a7ae0801ccd338d96b84acf53a4f592b9d38f9 100644 --- a/es2panda/test/compiler/ts/new_expression_104-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_104-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_104.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_104.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_105-expected.txt b/es2panda/test/compiler/ts/new_expression_105-expected.txt index d3489f44a6b50b4f8f1d59d3eab17876801356cb..8b96464fc4eb95eb4d72b337c216fbe3ba15d004 100644 --- a/es2panda/test/compiler/ts/new_expression_105-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_105-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_105.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_105.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_106-expected.txt b/es2panda/test/compiler/ts/new_expression_106-expected.txt index 6d92957413bc78efecb021698ade8058de4599f5..ab85e663bb5c29b377d3904cb3a772f8b33dd9cb 100644 --- a/es2panda/test/compiler/ts/new_expression_106-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_106-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_106.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_106.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_107-expected.txt b/es2panda/test/compiler/ts/new_expression_107-expected.txt index b270ad80a5b03bcb48fe333e75d00641c8e0052b..b5c945ff4798972b59192ae1b3f8b6f99d91bc4a 100644 --- a/es2panda/test/compiler/ts/new_expression_107-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_107-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,28 +170,28 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'boolean'. [new_expression_107.ts:2:23] +TypeError: Type 'string' is not assignable to type 'boolean'. [new_expression_107.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_108-expected.txt b/es2panda/test/compiler/ts/new_expression_108-expected.txt index a38d284b9811420236bc52e5ca3894f326fdc664..d9ac5275983477fe7f8003ac944aa8e08f18112c 100644 --- a/es2panda/test/compiler/ts/new_expression_108-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_108-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_108.ts:2:23] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_108.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_109-expected.txt b/es2panda/test/compiler/ts/new_expression_109-expected.txt index 215e48acc79657c8cacdcdf9b62724a336ef9579..b7b57f88c61a1bb2acc7ebdae357eec25a6475ec 100644 --- a/es2panda/test/compiler/ts/new_expression_109-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_109-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_109.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_109.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_11-expected.txt b/es2panda/test/compiler/ts/new_expression_11-expected.txt index ed6db5e718c678d33b02efb0174184c9ec903794..4a15ca78f81584be589006e8547e767b1691b1a5 100644 --- a/es2panda/test/compiler/ts/new_expression_11-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_11-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_11.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_11.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_110-expected.txt b/es2panda/test/compiler/ts/new_expression_110-expected.txt index bfb195a1c2efac8946d688f42d34da9fe05fb57a..6ec7dc2ffc3feeea44a1a7d61c9bc38798211644 100644 --- a/es2panda/test/compiler/ts/new_expression_110-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_110-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_110.ts:2:17] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_110.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_111-expected.txt b/es2panda/test/compiler/ts/new_expression_111-expected.txt index 513c802f6d41bd1636e56ffea2e50329c50fa55e..88470e87e129491b8049d7b6082ca39ae1e0094b 100644 --- a/es2panda/test/compiler/ts/new_expression_111-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_111-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_111.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_111.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_112-expected.txt b/es2panda/test/compiler/ts/new_expression_112-expected.txt index c563d65d816fad3bcd5814275e3db859f5d62144..bff91b716934b7ac97cee63ee8a57d77299ba913 100644 --- a/es2panda/test/compiler/ts/new_expression_112-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_112-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_112.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_112.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_113-expected.txt b/es2panda/test/compiler/ts/new_expression_113-expected.txt index 9ee35ac82dfbfbc08ed2caeaeb366b940a77df7e..0b298c50790da2b82d899a1d2a0d3fc10a1b6295 100644 --- a/es2panda/test/compiler/ts/new_expression_113-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_113-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_113.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_113.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_114-expected.txt b/es2panda/test/compiler/ts/new_expression_114-expected.txt index 08a7e3d7e8a938b2d644c2f837d1990908d00306..8a7259a070e2a9522997f464535eb92e194a138d 100644 --- a/es2panda/test/compiler/ts/new_expression_114-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_114-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,28 +170,28 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [new_expression_114.ts:2:17] +TypeError: Type 'string' is not assignable to type 'number'. [new_expression_114.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_115-expected.txt b/es2panda/test/compiler/ts/new_expression_115-expected.txt index 7825fea7d9420f42dd335d57cde6c0bcc3eca80d..b1a4bd6e36442b2777e0b099c69040786e7654ed 100644 --- a/es2panda/test/compiler/ts/new_expression_115-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_115-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_115.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_115.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_116-expected.txt b/es2panda/test/compiler/ts/new_expression_116-expected.txt index bc61a2875e20b97d068a26f369d57d515fa678a1..281e60586de2e17415721310355d0abacd23f2d3 100644 --- a/es2panda/test/compiler/ts/new_expression_116-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_116-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -187,11 +187,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_116.ts:2:19] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_116.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_117-expected.txt b/es2panda/test/compiler/ts/new_expression_117-expected.txt index c848839b0ba549c3133dee2995f38f1628d17c57..2ed79bbff04d2b63292714a5988fb2ba968e56ce 100644 --- a/es2panda/test/compiler/ts/new_expression_117-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_117-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -187,11 +187,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_117.ts:2:19] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_117.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_118-expected.txt b/es2panda/test/compiler/ts/new_expression_118-expected.txt index c415670be99e6c83a67c1d555eb45e8aa1b6d21c..3cb438d7357e6edc27da98ed7beeee0fda232288 100644 --- a/es2panda/test/compiler/ts/new_expression_118-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_118-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_118.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_118.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_119-expected.txt b/es2panda/test/compiler/ts/new_expression_119-expected.txt index b8701f2e2ae67bb9e4698a2af9fd8cf780bb0cd9..5d09f2526e2afc0a25d89d8dfa0e27c985920af7 100644 --- a/es2panda/test/compiler/ts/new_expression_119-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_119-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_119.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_119.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_12-expected.txt b/es2panda/test/compiler/ts/new_expression_12-expected.txt index 362770a4ea693b4896ebaafe89a9f51f9fb8c146..aa407d614be9e143a9c15c0294d0d59d601bd906 100644 --- a/es2panda/test/compiler/ts/new_expression_12-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_12-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_12.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_12.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_120-expected.txt b/es2panda/test/compiler/ts/new_expression_120-expected.txt index d808912fcf628ef08e884b6bce39e5ac02268ac7..7261303d89b75923bb2066a6dd596c159de0c677 100644 --- a/es2panda/test/compiler/ts/new_expression_120-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_120-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_120.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_120.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_121-expected.txt b/es2panda/test/compiler/ts/new_expression_121-expected.txt index 8062ac6a4ef93dc9b764c817d198138b4b9edc97..34a5350c19d799d7ac75eb3410b8d10e338bbdb9 100644 --- a/es2panda/test/compiler/ts/new_expression_121-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_121-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,28 +170,28 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [new_expression_121.ts:2:17] +TypeError: Type 'string' is not assignable to type 'number'. [new_expression_121.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_122-expected.txt b/es2panda/test/compiler/ts/new_expression_122-expected.txt index d08b4975342cc94ccb257b9f88b4373705101b52..7b7fe725c62c3ea501051801bcb462fbe8ea5990 100644 --- a/es2panda/test/compiler/ts/new_expression_122-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_122-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_122.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_122.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_123-expected.txt b/es2panda/test/compiler/ts/new_expression_123-expected.txt index 96ec8e6af16be78ca41fb9c0996be9397ebe0391..9b0f29f480e41546dbb2c38ecc2b289c4f6792f6 100644 --- a/es2panda/test/compiler/ts/new_expression_123-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_123-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [new_expression_123.ts:2:19] +TypeError: Type 'string' is not assignable to type 'number'. [new_expression_123.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_124-expected.txt b/es2panda/test/compiler/ts/new_expression_124-expected.txt index 6e2de247511af6d34ebf3456da4cb65d952b95b2..677db5b5deb49664137706d5db8565fa5328b0a5 100644 --- a/es2panda/test/compiler/ts/new_expression_124-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_124-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -187,11 +187,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_124.ts:2:19] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_124.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_125-expected.txt b/es2panda/test/compiler/ts/new_expression_125-expected.txt index 86b4895edc75b3422e6bece3d34790af4edcc0d7..3316c9cab7c6208285852386011e544314a06ad2 100644 --- a/es2panda/test/compiler/ts/new_expression_125-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_125-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_125.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_125.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_126-expected.txt b/es2panda/test/compiler/ts/new_expression_126-expected.txt index 9b6dd164d69ff2e1906d7a094232a0c485beb037..96e2d2e7fb61dcf7fbf4e7cfda741933cecefcb9 100644 --- a/es2panda/test/compiler/ts/new_expression_126-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_126-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_126.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_126.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_127-expected.txt b/es2panda/test/compiler/ts/new_expression_127-expected.txt index d87c396d88025d7bd83eee130c8504144f5171e3..b0361621b440c37ad129f000b2bd751563a3074d 100644 --- a/es2panda/test/compiler/ts/new_expression_127-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_127-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_127.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_127.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_128-expected.txt b/es2panda/test/compiler/ts/new_expression_128-expected.txt index 56895db481778d0372cb012e3dc3e0fa7fba1915..7f09fe4f892ff72394a7f3bf17fe35129eae0d60 100644 --- a/es2panda/test/compiler/ts/new_expression_128-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_128-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,28 +170,28 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [new_expression_128.ts:2:17] +TypeError: Type 'string' is not assignable to type 'number'. [new_expression_128.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_129-expected.txt b/es2panda/test/compiler/ts/new_expression_129-expected.txt index 8560062abeb9c3c576e432f8bd3821d788869756..f662c62826b482d4d2c9637886a414a926a2287f 100644 --- a/es2panda/test/compiler/ts/new_expression_129-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_129-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_129.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_129.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_13-expected.txt b/es2panda/test/compiler/ts/new_expression_13-expected.txt index 9d827b1631a24859bd944fbe8a4002bbeefd2e08..271819de7a6140c351c9bb6c34febdb7cb0fd28c 100644 --- a/es2panda/test/compiler/ts/new_expression_13-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_13-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_13.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_13.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_130-expected.txt b/es2panda/test/compiler/ts/new_expression_130-expected.txt index 5717eff29fdbdbed22f76ee75a6dad44b2b8cd55..819409d7ee16c9101c7036e882afa75d88b750d8 100644 --- a/es2panda/test/compiler/ts/new_expression_130-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_130-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'boolean'. [new_expression_130.ts:2:19] +TypeError: Type 'string' is not assignable to type 'boolean'. [new_expression_130.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_131-expected.txt b/es2panda/test/compiler/ts/new_expression_131-expected.txt index fedd4b0996a2da3cca03ec09420b9ccda8feb5f0..080a54c591ca98fdd5ff21cff1fa9b259bd50623 100644 --- a/es2panda/test/compiler/ts/new_expression_131-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_131-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -187,11 +187,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_131.ts:2:19] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_131.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_132-expected.txt b/es2panda/test/compiler/ts/new_expression_132-expected.txt index 4a98b9aae5b548a743c6b62d89c463ffc84038b8..d13b6a4bc43cf55e50e23cfc0ab2de1f72f25cce 100644 --- a/es2panda/test/compiler/ts/new_expression_132-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_132-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_132.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_132.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_133-expected.txt b/es2panda/test/compiler/ts/new_expression_133-expected.txt index c4eb05a7c3ad1183cd1d49ce44f148e1c520ad88..5bfd6939e5a1bd9f6c3b3e146fc83fc6c9eb7931 100644 --- a/es2panda/test/compiler/ts/new_expression_133-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_133-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_133.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_133.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_134-expected.txt b/es2panda/test/compiler/ts/new_expression_134-expected.txt index f5a525e6e346f9176201356539895bda1b2c3c01..b0d545da7a8fefe03ae4151b1f282271e4e02638 100644 --- a/es2panda/test/compiler/ts/new_expression_134-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_134-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_134.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_134.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_135-expected.txt b/es2panda/test/compiler/ts/new_expression_135-expected.txt index 246b250a7e216bdf9db1516b1a224c89d7bdd0ec..34ce0622915509e8518a51aef5985440c6efc40c 100644 --- a/es2panda/test/compiler/ts/new_expression_135-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_135-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,28 +170,28 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'boolean'. [new_expression_135.ts:2:17] +TypeError: Type 'string' is not assignable to type 'boolean'. [new_expression_135.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_136-expected.txt b/es2panda/test/compiler/ts/new_expression_136-expected.txt index 1d6bed2dde834e50419f74345b5b1b4ee4747e9d..e8aa627129040c4d23485e678e908be36d6f7982 100644 --- a/es2panda/test/compiler/ts/new_expression_136-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_136-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_136.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_136.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_137-expected.txt b/es2panda/test/compiler/ts/new_expression_137-expected.txt index b483fa27652052ab16d1bc801193bb81e3dd917f..d658cdb76144124dc2f4d1fa9c1464c92b294158 100644 --- a/es2panda/test/compiler/ts/new_expression_137-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_137-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_137.ts:2:17] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_137.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_138-expected.txt b/es2panda/test/compiler/ts/new_expression_138-expected.txt index 9f926e8b05f83b694a393f01e3eb786833af9458..2c5c882a27afda4886f22096a38f0bce9916c9c9 100644 --- a/es2panda/test/compiler/ts/new_expression_138-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_138-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_138.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_138.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_139-expected.txt b/es2panda/test/compiler/ts/new_expression_139-expected.txt index 3fb4459a66b28a38128c9bcade976482cb67a2c5..d92137d6dbe7772e88b3bf270fc3f62bec729da7 100644 --- a/es2panda/test/compiler/ts/new_expression_139-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_139-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_139.ts:2:23] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_139.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_14-expected.txt b/es2panda/test/compiler/ts/new_expression_14-expected.txt index be361ea7b06530829069f050f5eb68b6904e1b16..ba65cd0cbaed73ea3e14faa5c77c29134fac7e88 100644 --- a/es2panda/test/compiler/ts/new_expression_14-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_14-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'bigint'. [new_expression_14.ts:2:23] +TypeError: Type 'number' is not assignable to type 'bigint'. [new_expression_14.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_140-expected.txt b/es2panda/test/compiler/ts/new_expression_140-expected.txt index 8f3ae2bc8cb0ca4bc158f2f2d70792fa44aaa3ae..81b2b92fce6dcfac602e8abc2f7c9e51d05d967e 100644 --- a/es2panda/test/compiler/ts/new_expression_140-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_140-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_140.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_140.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_141-expected.txt b/es2panda/test/compiler/ts/new_expression_141-expected.txt index e1afdaac85b6b7431ff7b2ac4310279699a03193..4337e641c21a56724a88b710b23ff8f8b26de7ae 100644 --- a/es2panda/test/compiler/ts/new_expression_141-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_141-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_141.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_141.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_142-expected.txt b/es2panda/test/compiler/ts/new_expression_142-expected.txt index 27d0763817d4ef8e50abc970b241de4f9124718c..7a991f121ccf6085979c3149004fb6f54b2463f3 100644 --- a/es2panda/test/compiler/ts/new_expression_142-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_142-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,28 +170,28 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'boolean'. [new_expression_142.ts:2:17] +TypeError: Type 'string' is not assignable to type 'boolean'. [new_expression_142.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_143-expected.txt b/es2panda/test/compiler/ts/new_expression_143-expected.txt index 8c75969814515d844681457d61a62c8017c7960d..4ec8c3bba7742fb859f868bfd3e8f9fe22afc38b 100644 --- a/es2panda/test/compiler/ts/new_expression_143-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_143-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_143.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_143.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_144-expected.txt b/es2panda/test/compiler/ts/new_expression_144-expected.txt index e2992488870933e50b16cd25021b423c602ea068..0662fb33519f19c79a3b6c36ca735e8a820f9f5e 100644 --- a/es2panda/test/compiler/ts/new_expression_144-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_144-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_144.ts:2:17] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_144.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_145-expected.txt b/es2panda/test/compiler/ts/new_expression_145-expected.txt index 783f2ac0841e14873475f471a59b643b97da656b..cd51c61bb5a80759dca73ae8447f6dfadb9b3443 100644 --- a/es2panda/test/compiler/ts/new_expression_145-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_145-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_145.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_145.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_146-expected.txt b/es2panda/test/compiler/ts/new_expression_146-expected.txt index 08fb3e7e623b5d8b7acb66575cf9d02f33a00e08..b71e5d45ae14dbe21de9e0de423590af9b89093a 100644 --- a/es2panda/test/compiler/ts/new_expression_146-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_146-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'number'. [new_expression_146.ts:2:23] +TypeError: Type 'string' is not assignable to type 'number'. [new_expression_146.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_147-expected.txt b/es2panda/test/compiler/ts/new_expression_147-expected.txt index dea5cc4c6438a54060c32d779e13c2e3bbc09ef4..b91d15ad40ee955997a87a165d5e32a89cb1f988 100644 --- a/es2panda/test/compiler/ts/new_expression_147-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_147-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_147.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_147.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_148-expected.txt b/es2panda/test/compiler/ts/new_expression_148-expected.txt index acbd9d44fe542ac381628f4f0cdd762efbfe9e72..d0205081186c1a92279b7644280f0afe98531be8 100644 --- a/es2panda/test/compiler/ts/new_expression_148-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_148-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_148.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_148.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_149-expected.txt b/es2panda/test/compiler/ts/new_expression_149-expected.txt index c0c9e4d0a6a2c977fc82ca12be918045f33d736e..07e6f3cd7b20341355a3539722ae4119636a9e45 100644 --- a/es2panda/test/compiler/ts/new_expression_149-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_149-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,28 +170,28 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'boolean'. [new_expression_149.ts:2:17] +TypeError: Type 'string' is not assignable to type 'boolean'. [new_expression_149.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_15-expected.txt b/es2panda/test/compiler/ts/new_expression_15-expected.txt index 79ab41a420a9bc20d9794e185e7826f2897c0dd4..802bb02c40a50d22101744869ec70cc381b4d26b 100644 --- a/es2panda/test/compiler/ts/new_expression_15-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_15-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'bigint'. [new_expression_15.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [new_expression_15.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_150-expected.txt b/es2panda/test/compiler/ts/new_expression_150-expected.txt index 890fa69c9266d8fe47a7644c23153fcba79263ef..0e7545a8a5a81e01b55c468fdce502102163a8c8 100644 --- a/es2panda/test/compiler/ts/new_expression_150-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_150-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_150.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_150.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_151-expected.txt b/es2panda/test/compiler/ts/new_expression_151-expected.txt index d949e8be50c7f3b4ff2c35e213faa7a3659f4fbc..eed118081aa6e4812783872025d24a1a82b73a88 100644 --- a/es2panda/test/compiler/ts/new_expression_151-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_151-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_151.ts:2:17] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_151.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_152-expected.txt b/es2panda/test/compiler/ts/new_expression_152-expected.txt index 127b1ceb56bd2231103aebbf992198259822ef14..39f5edd825866fe071a548099ffb73413ca1bef6 100644 --- a/es2panda/test/compiler/ts/new_expression_152-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_152-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_152.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_152.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_153-expected.txt b/es2panda/test/compiler/ts/new_expression_153-expected.txt index 529906dd8eed781e114dc1d6059b766beafbcd5a..f1cc7fca2ccd7042bbe7b750647dddba0ef8528e 100644 --- a/es2panda/test/compiler/ts/new_expression_153-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_153-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'string' is not assignable to parameter of type 'boolean'. [new_expression_153.ts:2:23] +TypeError: Type 'string' is not assignable to type 'boolean'. [new_expression_153.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_154-expected.txt b/es2panda/test/compiler/ts/new_expression_154-expected.txt index d3560f000f1a9e6fc2ab5330f45b40f431e5d943..409c688bbb22b54d00b6387ada515f075d03ac6f 100644 --- a/es2panda/test/compiler/ts/new_expression_154-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_154-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_154.ts:2:23] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_154.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_155-expected.txt b/es2panda/test/compiler/ts/new_expression_155-expected.txt index c4ffd75545c40e90ab5d0611d559a562c483ffc5..80dd397f85dde2a395b0206763fb21bb5a091ca9 100644 --- a/es2panda/test/compiler/ts/new_expression_155-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_155-expected.txt @@ -19,11 +19,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_155.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_155.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_156-expected.txt b/es2panda/test/compiler/ts/new_expression_156-expected.txt index 99db8e987ab76b404a4ab892a41ea9316adaf7d6..1cc71cc6573a5c166b9b9e10400dfa8619eaba3c 100644 --- a/es2panda/test/compiler/ts/new_expression_156-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_156-expected.txt @@ -19,11 +19,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,22 +170,22 @@ "arguments": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -194,11 +194,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -210,9 +210,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 0. [new_expression_156.ts:2:9] +TypeError: Expected 2 arguments, but got 0. [new_expression_156.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_157-expected.txt b/es2panda/test/compiler/ts/new_expression_157-expected.txt index 21af4f331070f2e742753178db4e24c7b3e73ef0..77fe7fd0f2bd9b586f971a3dc15e3795219d3b96 100644 --- a/es2panda/test/compiler/ts/new_expression_157-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_157-expected.txt @@ -19,11 +19,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -201,11 +201,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -213,22 +213,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 31 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -253,9 +253,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 3. [new_expression_157.ts:2:25] +TypeError: Expected 2 arguments, but got 3. [new_expression_157.ts:18:25] diff --git a/es2panda/test/compiler/ts/new_expression_158-expected.txt b/es2panda/test/compiler/ts/new_expression_158-expected.txt index 6090905669c71cd56ba547be1a9e87cd97c1fd7c..0b2343c800e969bca08bd2fa0e3cabe56710d53f 100644 --- a/es2panda/test/compiler/ts/new_expression_158-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_158-expected.txt @@ -16,22 +16,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -39,11 +39,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -51,11 +51,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -64,11 +64,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -84,11 +84,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -113,22 +113,22 @@ "arguments": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -137,11 +137,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -157,11 +157,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -171,33 +171,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'string'. [new_expression_158.ts:3:1] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_158.ts:19:1] diff --git a/es2panda/test/compiler/ts/new_expression_159-expected.txt b/es2panda/test/compiler/ts/new_expression_159-expected.txt index dc5232c31e81189f480e478112c147c148f1604d..eada3acd898d1a74bb4e49ee1a8ec61df8032346 100644 --- a/es2panda/test/compiler/ts/new_expression_159-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_159-expected.txt @@ -16,22 +16,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -39,11 +39,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -51,11 +51,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -64,11 +64,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -84,11 +84,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -113,22 +113,22 @@ "arguments": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -137,11 +137,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -157,11 +157,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -171,33 +171,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'false' is not assignable to type 'string'. [new_expression_159.ts:3:1] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_159.ts:19:1] diff --git a/es2panda/test/compiler/ts/new_expression_16-expected.txt b/es2panda/test/compiler/ts/new_expression_16-expected.txt index 576e6f79955f3b94a67953304132ab894b789423..a25dc4f9dfe152365ba503c9e0fd6a34d8a1b79d 100644 --- a/es2panda/test/compiler/ts/new_expression_16-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_16-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_16.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_16.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_160-expected.txt b/es2panda/test/compiler/ts/new_expression_160-expected.txt index 24d1d50b5a3096c0b98c75c763ff8f39b7801640..afb10dfd586a0f0782f0d9c7b85e34656e5160b2 100644 --- a/es2panda/test/compiler/ts/new_expression_160-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_160-expected.txt @@ -16,22 +16,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -39,11 +39,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -51,11 +51,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -64,11 +64,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -84,11 +84,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -113,22 +113,22 @@ "arguments": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -137,11 +137,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -157,47 +157,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '"foo"' is not assignable to type 'number'. [new_expression_160.ts:3:1] +TypeError: Type 'string' is not assignable to type 'number'. [new_expression_160.ts:19:1] diff --git a/es2panda/test/compiler/ts/new_expression_161-expected.txt b/es2panda/test/compiler/ts/new_expression_161-expected.txt index 42399bed1557a3c73ab433ea8ad0b52757f0ff39..88885534293e9232694b762a87dddbd05596ee49 100644 --- a/es2panda/test/compiler/ts/new_expression_161-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_161-expected.txt @@ -16,22 +16,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -39,11 +39,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -51,11 +51,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -64,11 +64,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -84,11 +84,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -113,22 +113,22 @@ "arguments": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -137,11 +137,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -157,11 +157,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -171,33 +171,33 @@ "value": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'false' is not assignable to type 'number'. [new_expression_161.ts:3:1] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_161.ts:19:1] diff --git a/es2panda/test/compiler/ts/new_expression_162-expected.txt b/es2panda/test/compiler/ts/new_expression_162-expected.txt index 77049b95535c980023ba90acca18a0a104146290..97b7ec420aef37ce54154cbd175846a56e343f2c 100644 --- a/es2panda/test/compiler/ts/new_expression_162-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_162-expected.txt @@ -16,22 +16,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -39,11 +39,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -51,11 +51,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -64,11 +64,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -84,11 +84,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -113,22 +113,22 @@ "arguments": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -137,11 +137,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -157,47 +157,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 10 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '"foo"' is not assignable to type 'boolean'. [new_expression_162.ts:3:1] +TypeError: Type 'string' is not assignable to type 'boolean'. [new_expression_162.ts:19:1] diff --git a/es2panda/test/compiler/ts/new_expression_163-expected.txt b/es2panda/test/compiler/ts/new_expression_163-expected.txt index bf5d2e2428a4d9e0ed48595031afbcbc47d6021b..93db3421084a6928d3d6b4b05749d65bbde2d772 100644 --- a/es2panda/test/compiler/ts/new_expression_163-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_163-expected.txt @@ -16,22 +16,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -39,11 +39,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -51,11 +51,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -64,11 +64,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -84,11 +84,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -113,22 +113,22 @@ "arguments": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -137,11 +137,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -157,11 +157,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -171,33 +171,33 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type '5' is not assignable to type 'boolean'. [new_expression_163.ts:3:1] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_163.ts:19:1] diff --git a/es2panda/test/compiler/ts/new_expression_17-expected.txt b/es2panda/test/compiler/ts/new_expression_17-expected.txt index ed35bd99ab53f0288677bf2fe060861e00e3c632..d42b4172b4ec48730a864f67dc8b38add291e275 100644 --- a/es2panda/test/compiler/ts/new_expression_17-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_17-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_17.ts:2:17] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_17.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_18-expected.txt b/es2panda/test/compiler/ts/new_expression_18-expected.txt index 149048760ab5bb6aa1c9435a615e7e5c9f16f4c3..be2b84164b85c77b754cae548560a2c0b623ed1a 100644 --- a/es2panda/test/compiler/ts/new_expression_18-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_18-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_18.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_18.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_19-expected.txt b/es2panda/test/compiler/ts/new_expression_19-expected.txt index 764651340c092d8085eb6fc178fe3096203f4bab..5c25bb42ec4def33f273412daf1a904595b74d39 100644 --- a/es2panda/test/compiler/ts/new_expression_19-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_19-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_19.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_19.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_2-expected.txt b/es2panda/test/compiler/ts/new_expression_2-expected.txt index b3b7987cc1329eaf5b2393f0f2f24b9d9cd7a25c..ec4de90a660df036da49afd2cba2a45f1350a3de 100644 --- a/es2panda/test/compiler/ts/new_expression_2-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_2-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_2.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_2.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_20-expected.txt b/es2panda/test/compiler/ts/new_expression_20-expected.txt index 20750312227503090f38532f06342c6cd3f4fc42..460ae63816889f111f1b4188b2b862fa40548d22 100644 --- a/es2panda/test/compiler/ts/new_expression_20-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_20-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_20.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_20.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_21-expected.txt b/es2panda/test/compiler/ts/new_expression_21-expected.txt index b40613adc53dba551e1619a715f2eeb8d5a26a5f..6007ec734617b24a992bb180541832adc91a864c 100644 --- a/es2panda/test/compiler/ts/new_expression_21-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_21-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_21.ts:2:23] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_21.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_22-expected.txt b/es2panda/test/compiler/ts/new_expression_22-expected.txt index 5fc2ed79981993190b1bd76d3a706180f33664f4..09be80c1d41cf38ec1c85c82b429bfbc1e22ec4a 100644 --- a/es2panda/test/compiler/ts/new_expression_22-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_22-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_22.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_22.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_23-expected.txt b/es2panda/test/compiler/ts/new_expression_23-expected.txt index 35fadeedf6979ceb81e3ea3d8b13c88d9b9f8932..e12fcc01f4844bb00f4e5cb6df23aab953e5d927 100644 --- a/es2panda/test/compiler/ts/new_expression_23-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_23-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_23.ts:2:17] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_23.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_24-expected.txt b/es2panda/test/compiler/ts/new_expression_24-expected.txt index 49b0add9220d4ce4acb3912ddea65f4d0b25d303..8958a4679a707d5b15eab468d251c907716f44cc 100644 --- a/es2panda/test/compiler/ts/new_expression_24-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_24-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_24.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_24.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_25-expected.txt b/es2panda/test/compiler/ts/new_expression_25-expected.txt index 7c696880d8651797213209ca1ef079924a6be362..dc857da3bf9fc7a13ad335a523b2580ead2fdcae 100644 --- a/es2panda/test/compiler/ts/new_expression_25-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_25-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_25.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_25.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_26-expected.txt b/es2panda/test/compiler/ts/new_expression_26-expected.txt index 1d3ebd0821a47bae8e9db1a922bfc56801a16b02..d33bf376d8d6e643f493ebebe295396f490d3c9b 100644 --- a/es2panda/test/compiler/ts/new_expression_26-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_26-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_26.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_26.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_27-expected.txt b/es2panda/test/compiler/ts/new_expression_27-expected.txt index c9420960a507c02118191533a461ce42415e883e..8033109a5cca42d7ccf2d83b342d2f95576fc648 100644 --- a/es2panda/test/compiler/ts/new_expression_27-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_27-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_27.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_27.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_28-expected.txt b/es2panda/test/compiler/ts/new_expression_28-expected.txt index d48762d2a336ffbddc4577824794f8dae67fb98b..2701edc4094695352b55d92f78b15ac4284471b8 100644 --- a/es2panda/test/compiler/ts/new_expression_28-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_28-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_28.ts:2:19] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_28.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_29-expected.txt b/es2panda/test/compiler/ts/new_expression_29-expected.txt index f015a5c3044e3c5a08ad4392d42dcc53da506766..511ee3a412f242ac4465079f9abd255560ff31ad 100644 --- a/es2panda/test/compiler/ts/new_expression_29-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_29-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_29.ts:2:19] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_29.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_3-expected.txt b/es2panda/test/compiler/ts/new_expression_3-expected.txt index 290660c39afa5911046b4cc7a76ce1ab0ff145ee..cb08a319230c8bc133656124a629aa191319b5d6 100644 --- a/es2panda/test/compiler/ts/new_expression_3-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_3-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_3.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_3.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_30-expected.txt b/es2panda/test/compiler/ts/new_expression_30-expected.txt index d1b19ff5d1d4651d047efa5ed6c36d9121f265dd..1aa111f5e25a4488747a3df3eab5dca2b418da10 100644 --- a/es2panda/test/compiler/ts/new_expression_30-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_30-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_30.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_30.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_31-expected.txt b/es2panda/test/compiler/ts/new_expression_31-expected.txt index 5f5d2cf94afc25cc88031ddd6194d4242bef1c14..0f6a635c7ab4a43532c8e028416cf4b7e76379c4 100644 --- a/es2panda/test/compiler/ts/new_expression_31-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_31-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_31.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_31.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_32-expected.txt b/es2panda/test/compiler/ts/new_expression_32-expected.txt index 2bc9ce9e5668bcf364230df31c5d5cf5e79a67a7..c4849f8a1fa5454b3a2a2092d26aa0386fa0e0db 100644 --- a/es2panda/test/compiler/ts/new_expression_32-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_32-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_32.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_32.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_33-expected.txt b/es2panda/test/compiler/ts/new_expression_33-expected.txt index 63deff832c965d2362386100b08ae11dd020ac8d..3614a9ce26de898841174aae955234db243b7a79 100644 --- a/es2panda/test/compiler/ts/new_expression_33-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_33-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_33.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_33.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_34-expected.txt b/es2panda/test/compiler/ts/new_expression_34-expected.txt index 49a5de267c291d43dc3772f8e5d0139052aeabfa..ffb052a3c41d8186d3eb71f60810c63d04ad4c01 100644 --- a/es2panda/test/compiler/ts/new_expression_34-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_34-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_34.ts:2:19] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_34.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_35-expected.txt b/es2panda/test/compiler/ts/new_expression_35-expected.txt index 08411135450d13b40597022db00469a30958ebcd..415d083dbc9d537cc606da2cc0c6dec29582dcf0 100644 --- a/es2panda/test/compiler/ts/new_expression_35-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_35-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_35.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_35.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_36-expected.txt b/es2panda/test/compiler/ts/new_expression_36-expected.txt index 783c8366e2eb86fd3d30cd42a1b78d03589238e7..056f4e7650a6bf5a89c2b730c5e72920774c6d3c 100644 --- a/es2panda/test/compiler/ts/new_expression_36-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_36-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_36.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_36.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_37-expected.txt b/es2panda/test/compiler/ts/new_expression_37-expected.txt index 07827ac7c81463d31170d809294d1025062e807e..7253f065b7925c6a30dc003fbcd63c888ea09ace 100644 --- a/es2panda/test/compiler/ts/new_expression_37-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_37-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_37.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_37.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_38-expected.txt b/es2panda/test/compiler/ts/new_expression_38-expected.txt index 9e2bf22f05c216aebe0d18bf77937f4ab3f33fb3..9f492fc0c6addb1053b50f873b6d5fbcb344fe39 100644 --- a/es2panda/test/compiler/ts/new_expression_38-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_38-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_38.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_38.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_39-expected.txt b/es2panda/test/compiler/ts/new_expression_39-expected.txt index dc26cdf96c739c71c1f75085cf4f0542d034b1d4..20bbedf50ddde71f4e30196c9bcfcdccd514bd7c 100644 --- a/es2panda/test/compiler/ts/new_expression_39-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_39-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'bigint'. [new_expression_39.ts:2:19] +TypeError: Type 'number' is not assignable to type 'bigint'. [new_expression_39.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_4-expected.txt b/es2panda/test/compiler/ts/new_expression_4-expected.txt index 41a4e4f66baca71546ef5800ef8d9c2225508aae..c62600d382e851381850aa8f93b5ea19a7990b8b 100644 --- a/es2panda/test/compiler/ts/new_expression_4-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_4-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_4.ts:2:17] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_4.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_40-expected.txt b/es2panda/test/compiler/ts/new_expression_40-expected.txt index 452fa112df563afef0bc125266adfe480dfb80fe..a92a65fbecfeecf4fe7506c79c7e79b105fb348e 100644 --- a/es2panda/test/compiler/ts/new_expression_40-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_40-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'bigint'. [new_expression_40.ts:2:19] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [new_expression_40.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_41-expected.txt b/es2panda/test/compiler/ts/new_expression_41-expected.txt index be999a421b34a23155065bb51b0492e319c5d453..071bc7a5aba320e2c559f13d21a42bc95fe87d7e 100644 --- a/es2panda/test/compiler/ts/new_expression_41-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_41-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_41.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_41.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_42-expected.txt b/es2panda/test/compiler/ts/new_expression_42-expected.txt index e2f8bf6d26b709fc09f084279bbb3b855a3f5359..b6ce5ec2c24eb55b9f5347d9169a20572087703d 100644 --- a/es2panda/test/compiler/ts/new_expression_42-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_42-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_42.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_42.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_43-expected.txt b/es2panda/test/compiler/ts/new_expression_43-expected.txt index 37117403cdf847b2c92fa433ead380d6ad0bb244..f77facd329883edc4825de3afc3f1e42f13b2c8e 100644 --- a/es2panda/test/compiler/ts/new_expression_43-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_43-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_43.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_43.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_44-expected.txt b/es2panda/test/compiler/ts/new_expression_44-expected.txt index eba0d7509bedb38b952d495dc88699e145797cfe..9c91b687d21d9c94a8e972cbd238a57f15d16e83 100644 --- a/es2panda/test/compiler/ts/new_expression_44-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_44-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_44.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_44.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_45-expected.txt b/es2panda/test/compiler/ts/new_expression_45-expected.txt index d2ec5ca43d922697d6bd10a04a2f61f2cfaf9440..61e92bacfa1b2693d8f26ef07ccfc5e20d5383e6 100644 --- a/es2panda/test/compiler/ts/new_expression_45-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_45-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_45.ts:2:19] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_45.ts:18:19] diff --git a/es2panda/test/compiler/ts/new_expression_46-expected.txt b/es2panda/test/compiler/ts/new_expression_46-expected.txt index 23100abf73da845ccb254be830a82222289c1d68..32a39bab8b6ec833ce7e1e59d81cc683def69c47 100644 --- a/es2panda/test/compiler/ts/new_expression_46-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_46-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_46.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_46.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_47-expected.txt b/es2panda/test/compiler/ts/new_expression_47-expected.txt index 97fc19a3ed27805ac6d9a2887b6d78717c1d0c56..4957d4fb7c7cdb542cc37146e2f826badc10559a 100644 --- a/es2panda/test/compiler/ts/new_expression_47-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_47-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_47.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_47.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_48-expected.txt b/es2panda/test/compiler/ts/new_expression_48-expected.txt index 41b8bd4f508b4e5a26efde8d632bfb4dc5409eeb..fe04b76ee16ab52626f5ea1af54dc3dad04b738f 100644 --- a/es2panda/test/compiler/ts/new_expression_48-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_48-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_48.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_48.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_49-expected.txt b/es2panda/test/compiler/ts/new_expression_49-expected.txt index ae3897321539d1a0b287367ba199a797629f93d2..4b4ff400a073accd9d67dc4120e4ffe321d3b2c7 100644 --- a/es2panda/test/compiler/ts/new_expression_49-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_49-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_49.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_49.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_5-expected.txt b/es2panda/test/compiler/ts/new_expression_5-expected.txt index f72a5e176d7857fcb64bacbcb402726feb5b13df..efca80a61f2f429c05702708f3205ac566e27726 100644 --- a/es2panda/test/compiler/ts/new_expression_5-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_5-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_5.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_5.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_50-expected.txt b/es2panda/test/compiler/ts/new_expression_50-expected.txt index 54a6e474acba088f9107f654e7fe385af26d08c5..c7fa318d3635c7fe2d35fd9551aa571434a82809 100644 --- a/es2panda/test/compiler/ts/new_expression_50-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_50-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'bigint'. [new_expression_50.ts:2:17] +TypeError: Type 'number' is not assignable to type 'bigint'. [new_expression_50.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_51-expected.txt b/es2panda/test/compiler/ts/new_expression_51-expected.txt index 601425d556871377283c00a6017d44c5debc2f5b..7876fee1bf4ba4098d05b289a736df1299140d01 100644 --- a/es2panda/test/compiler/ts/new_expression_51-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_51-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_51.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_51.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_52-expected.txt b/es2panda/test/compiler/ts/new_expression_52-expected.txt index 28719d33b290b751b9d8e13aab4ba218331393eb..69249eb9bf1806eb0c4d5fe1183d88c451041620 100644 --- a/es2panda/test/compiler/ts/new_expression_52-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_52-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'bigint'. [new_expression_52.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [new_expression_52.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_53-expected.txt b/es2panda/test/compiler/ts/new_expression_53-expected.txt index e17dc9b3a38d60e06b01d92465cbba78b08b1ca2..ef3c3dab3f3b2d9be0b0fddd39ea6bf4e6f28622 100644 --- a/es2panda/test/compiler/ts/new_expression_53-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_53-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_53.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_53.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_54-expected.txt b/es2panda/test/compiler/ts/new_expression_54-expected.txt index dde915b1430eceaae04be386464928420a49155f..3a6dc0fb3bb13e3f33f6895fb91965aec0545a3d 100644 --- a/es2panda/test/compiler/ts/new_expression_54-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_54-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_54.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_54.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_55-expected.txt b/es2panda/test/compiler/ts/new_expression_55-expected.txt index c35483458eaa3822f59e65762f7cc25620d796ab..e86d896f31376bf107fac16ac03c633e33e04fb4 100644 --- a/es2panda/test/compiler/ts/new_expression_55-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_55-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'bigint'. [new_expression_55.ts:2:17] +TypeError: Type 'number' is not assignable to type 'bigint'. [new_expression_55.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_56-expected.txt b/es2panda/test/compiler/ts/new_expression_56-expected.txt index e27f30d89945840c868261848472a2053d296a98..584863a973ca14ef9d9cafbc10ba0ed9eb1179a9 100644 --- a/es2panda/test/compiler/ts/new_expression_56-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_56-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_56.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_56.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_57-expected.txt b/es2panda/test/compiler/ts/new_expression_57-expected.txt index 7790fec6db13c67073f844f8f5508eb6608a8db4..a43184b237bb0e4cc9249173474214cd5344f992 100644 --- a/es2panda/test/compiler/ts/new_expression_57-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_57-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'bigint'. [new_expression_57.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [new_expression_57.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_58-expected.txt b/es2panda/test/compiler/ts/new_expression_58-expected.txt index ba5fd8b5894c916503222350b2c81e4cf38a1d2c..7b26b8e0b2b76585979e6455834eb1012d1dceff 100644 --- a/es2panda/test/compiler/ts/new_expression_58-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_58-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_58.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_58.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_59-expected.txt b/es2panda/test/compiler/ts/new_expression_59-expected.txt index 39a76c66aa391537096c594c90e2090875bb86ef..7b67e5de6fa08cf355027106cd0c031f948cfdcf 100644 --- a/es2panda/test/compiler/ts/new_expression_59-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_59-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_59.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_59.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_6-expected.txt b/es2panda/test/compiler/ts/new_expression_6-expected.txt index 623d6eb9f3c97239a6d6a65bf78f70c65c68c939..d55894f9e0c6ab576a8f39d912f1591bb94a194b 100644 --- a/es2panda/test/compiler/ts/new_expression_6-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_6-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_6.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_6.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_60-expected.txt b/es2panda/test/compiler/ts/new_expression_60-expected.txt index 46ed617c9c36990ac09134db677bd09498e6748f..c4ea54bec1e445753864093b1c2e0ab4f7c66932 100644 --- a/es2panda/test/compiler/ts/new_expression_60-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_60-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'bigint'. [new_expression_60.ts:2:17] +TypeError: Type 'number' is not assignable to type 'bigint'. [new_expression_60.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_61-expected.txt b/es2panda/test/compiler/ts/new_expression_61-expected.txt index 8673880a548da7be1582212140f3aa0709b8a066..c1ec47908cb0b6b66374c988c92fab4504abbe97 100644 --- a/es2panda/test/compiler/ts/new_expression_61-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_61-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_61.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_61.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_62-expected.txt b/es2panda/test/compiler/ts/new_expression_62-expected.txt index f3a9a3c3b14b0408a9bdf5d1c8588f7717cefd16..7c6c914cf5be70a13aa306f1e79f018a4e03992f 100644 --- a/es2panda/test/compiler/ts/new_expression_62-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_62-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'bigint'. [new_expression_62.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [new_expression_62.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_63-expected.txt b/es2panda/test/compiler/ts/new_expression_63-expected.txt index caf9d86176c0955c7fa01e2c98cab1f0d075a272..949cd7677f12d6b2408b8efdfb2124e911fe47a5 100644 --- a/es2panda/test/compiler/ts/new_expression_63-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_63-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_63.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_63.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_64-expected.txt b/es2panda/test/compiler/ts/new_expression_64-expected.txt index f9842baa2719c514d7177348cab510409d65fcd0..4a3404a7d9f9396aedc9ee1cfebb6bca257cd52c 100644 --- a/es2panda/test/compiler/ts/new_expression_64-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_64-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_64.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_64.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_65-expected.txt b/es2panda/test/compiler/ts/new_expression_65-expected.txt index 0d9ca47b6548e01df6410469b63630e13e9e01f0..6b8a6cf5bef88debf7f440db26a7b84409a1bc64 100644 --- a/es2panda/test/compiler/ts/new_expression_65-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_65-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'bigint'. [new_expression_65.ts:2:17] +TypeError: Type 'number' is not assignable to type 'bigint'. [new_expression_65.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_66-expected.txt b/es2panda/test/compiler/ts/new_expression_66-expected.txt index 0b5108c9482a726261b3709d98f2227218548945..af96a50e981a3fbfe2c7d3b6649fe3093cfc39d9 100644 --- a/es2panda/test/compiler/ts/new_expression_66-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_66-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_66.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_66.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_67-expected.txt b/es2panda/test/compiler/ts/new_expression_67-expected.txt index 3529d988a947e3a99f575f36f41ef67cf3f32df8..5174e78bae1521b3f30007dffd71c4a0b9cfe72e 100644 --- a/es2panda/test/compiler/ts/new_expression_67-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_67-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'bigint'. [new_expression_67.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [new_expression_67.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_68-expected.txt b/es2panda/test/compiler/ts/new_expression_68-expected.txt index 63f828ef2e2134be7559bc278c29a08bc0226f4f..624fe4fb1a1b6d3c59697b3806be374629794194 100644 --- a/es2panda/test/compiler/ts/new_expression_68-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_68-expected.txt @@ -22,11 +22,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_68.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_68.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_69-expected.txt b/es2panda/test/compiler/ts/new_expression_69-expected.txt index c6b13a3a9a3196c0ed5487ee101fbca790d72183..232369bab5eda87b5275369c195c45dcfd972096 100644 --- a/es2panda/test/compiler/ts/new_expression_69-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_69-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_69.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_69.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_7-expected.txt b/es2panda/test/compiler/ts/new_expression_7-expected.txt index 37bc7a7fc2b9be61e0238991992729b99a472c0b..a2be3a83a74228694ba0290c6a98d25a4f65000e 100644 --- a/es2panda/test/compiler/ts/new_expression_7-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_7-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_7.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_7.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_70-expected.txt b/es2panda/test/compiler/ts/new_expression_70-expected.txt index 9103bb862aa0040adacbe614c3807729e25e00fe..cf6ddffa4d7c25e25966713786e28691be653421 100644 --- a/es2panda/test/compiler/ts/new_expression_70-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_70-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_70.ts:2:17] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_70.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_71-expected.txt b/es2panda/test/compiler/ts/new_expression_71-expected.txt index a8af6ef51ba045d654c404f73b614fd6c040c40b..911f9e860788664d847bd20be587abc22111c913 100644 --- a/es2panda/test/compiler/ts/new_expression_71-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_71-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_71.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_71.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_72-expected.txt b/es2panda/test/compiler/ts/new_expression_72-expected.txt index 3b436e9c83a57bc31df57a2c9c3ebf26a4bdade8..1acf0cc5a61f5512d75722b81e80bb97bf8c1bae 100644 --- a/es2panda/test/compiler/ts/new_expression_72-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_72-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_72.ts:2:23] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_72.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_73-expected.txt b/es2panda/test/compiler/ts/new_expression_73-expected.txt index 30afbceea7d804a7121871981dbb53439a9f020b..d79f28515756570735b507f7e5f68a166b0878f3 100644 --- a/es2panda/test/compiler/ts/new_expression_73-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_73-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_73.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_73.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_74-expected.txt b/es2panda/test/compiler/ts/new_expression_74-expected.txt index 810fdfa6ac1860cff3dcecc4b5d06fe447b66080..616a3110aa4f14e65b30144ec784564eb3522a55 100644 --- a/es2panda/test/compiler/ts/new_expression_74-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_74-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_74.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_74.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_75-expected.txt b/es2panda/test/compiler/ts/new_expression_75-expected.txt index 3d160a8bf1809b03e32eba3b28e86a01c8e7e191..1eb1819781d59a0f4610e4f605d1bd7a9a35a997 100644 --- a/es2panda/test/compiler/ts/new_expression_75-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_75-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_75.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_75.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_76-expected.txt b/es2panda/test/compiler/ts/new_expression_76-expected.txt index 5400961db78dc7cf131f91c21f2ae50685030f3d..0e4716014f5419f87f4ade07289cfb961f938fb5 100644 --- a/es2panda/test/compiler/ts/new_expression_76-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_76-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_76.ts:2:17] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_76.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_77-expected.txt b/es2panda/test/compiler/ts/new_expression_77-expected.txt index 386dc8c6cfe90f633be3521d8c85929bf08b7e88..36bcb64c0b614a06dd42667ab148d31e7e759b8d 100644 --- a/es2panda/test/compiler/ts/new_expression_77-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_77-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_77.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_77.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_78-expected.txt b/es2panda/test/compiler/ts/new_expression_78-expected.txt index 38761edc10734ef627e7078536a551640153831c..02230c06b72748de31da16d9816cb3abb25b64c4 100644 --- a/es2panda/test/compiler/ts/new_expression_78-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_78-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_78.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_78.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_79-expected.txt b/es2panda/test/compiler/ts/new_expression_79-expected.txt index 2ce09ac69e2fdc4ce9201e9ae23a4ccd338f5c4e..4de0d0065651f5b1b622384f0022026ef346d6fa 100644 --- a/es2panda/test/compiler/ts/new_expression_79-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_79-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_79.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_79.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_8-expected.txt b/es2panda/test/compiler/ts/new_expression_8-expected.txt index c2154ee9880b8b51b5ed86ead09a5f15f8a1a71b..3268d3b0c8e3eac5e2140bc94a31abee3116ffab 100644 --- a/es2panda/test/compiler/ts/new_expression_8-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_8-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'number'. [new_expression_8.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'number'. [new_expression_8.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_80-expected.txt b/es2panda/test/compiler/ts/new_expression_80-expected.txt index 06a90efb7f1ecebcc9aef403a850ff47ccf961ec..1f3d0796f475e8727f2a47960421a824fa013cf9 100644 --- a/es2panda/test/compiler/ts/new_expression_80-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_80-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_80.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_80.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_81-expected.txt b/es2panda/test/compiler/ts/new_expression_81-expected.txt index 9af1d606f4387c3a96ebd266bb740c6a28553b9a..d0ec916029a21c66799384ee19b20ea8e1fb4c4c 100644 --- a/es2panda/test/compiler/ts/new_expression_81-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_81-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_81.ts:2:17] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_81.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_82-expected.txt b/es2panda/test/compiler/ts/new_expression_82-expected.txt index 36327aa1e0c8a6b8e1fc17e0e903d5e7de83aa9a..e4328eea92798050b7ec1ce2926f25903961e92a 100644 --- a/es2panda/test/compiler/ts/new_expression_82-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_82-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_82.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_82.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_83-expected.txt b/es2panda/test/compiler/ts/new_expression_83-expected.txt index 4e47f72015c8a6a941af80bcf9edcada9b104d9f..a78394b6a99b82b939cd18df05a513ea4c85d56e 100644 --- a/es2panda/test/compiler/ts/new_expression_83-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_83-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'bigint'. [new_expression_83.ts:2:23] +TypeError: Type 'number' is not assignable to type 'bigint'. [new_expression_83.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_84-expected.txt b/es2panda/test/compiler/ts/new_expression_84-expected.txt index 5842545cd53012ae146ce8f7a78cb2a592328115..ab02d004747255b6e31118544d6509347e669bfa 100644 --- a/es2panda/test/compiler/ts/new_expression_84-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_84-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'bigint'. [new_expression_84.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'bigint'. [new_expression_84.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_85-expected.txt b/es2panda/test/compiler/ts/new_expression_85-expected.txt index bd4caa1e87184961c845ba1ee47d598271f0952e..58fd440ebd83bf25df1ccbdebb90b9ed41805a7d 100644 --- a/es2panda/test/compiler/ts/new_expression_85-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_85-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_85.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_85.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_86-expected.txt b/es2panda/test/compiler/ts/new_expression_86-expected.txt index 7084c101ff0d8e170b4f9bf7672c8f12036d95ba..2e1950244c3b394661289d30f682f5d93e2efa58 100644 --- a/es2panda/test/compiler/ts/new_expression_86-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_86-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_86.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_86.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_87-expected.txt b/es2panda/test/compiler/ts/new_expression_87-expected.txt index 18a50747b49ee922ca28a3507566e106da3c7149..ae8ac55c7d30245e827bc2668604c2852292db85 100644 --- a/es2panda/test/compiler/ts/new_expression_87-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_87-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,25 +188,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_87.ts:2:17] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_87.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_88-expected.txt b/es2panda/test/compiler/ts/new_expression_88-expected.txt index f5d48e20fcc735e8e457dc9e703bf0a73d13e462..f1c2af00d90579b760b2bb4ad4ade5619f4679d2 100644 --- a/es2panda/test/compiler/ts/new_expression_88-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_88-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_88.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_88.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_89-expected.txt b/es2panda/test/compiler/ts/new_expression_89-expected.txt index 1b03167986377941f0547f95efaef6b245404bf7..fc18fb99103dcb7693d8b2c690de5f01875daa9d 100644 --- a/es2panda/test/compiler/ts/new_expression_89-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_89-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,11 +202,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -214,22 +214,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -238,11 +238,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -254,9 +254,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'boolean'. [new_expression_89.ts:2:23] +TypeError: Type 'number' is not assignable to type 'boolean'. [new_expression_89.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_9-expected.txt b/es2panda/test/compiler/ts/new_expression_9-expected.txt index 038fd13458ec482ee1e658475ecd422710063e0e..25d0b7577b8bcffb4402857ef5c0e0d6fee37896 100644 --- a/es2panda/test/compiler/ts/new_expression_9-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_9-expected.txt @@ -22,11 +22,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_9.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_9.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_90-expected.txt b/es2panda/test/compiler/ts/new_expression_90-expected.txt index cfb16a2a93dbaf9a3f08a9cf1fb0b193b077b363..1167a4b747e6aa8871375336802cdc0336de7a38 100644 --- a/es2panda/test/compiler/ts/new_expression_90-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_90-expected.txt @@ -22,11 +22,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -188,11 +188,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -200,22 +200,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -240,9 +240,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_90.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_90.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_91-expected.txt b/es2panda/test/compiler/ts/new_expression_91-expected.txt index cce958f97bb2653edf57dee1620b9f42935bb53f..ea4c9880f7b09425fb11751649e19149babe7ebf 100644 --- a/es2panda/test/compiler/ts/new_expression_91-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_91-expected.txt @@ -22,11 +22,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,22 +185,22 @@ "arguments": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 0. [new_expression_91.ts:2:9] +TypeError: Expected 2 arguments, but got 0. [new_expression_91.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_92-expected.txt b/es2panda/test/compiler/ts/new_expression_92-expected.txt index c86dc7535197213586d1f61d6513de5fe39e5420..dfd4feabfe00e73e9bf0a7011a05eaddcf231642 100644 --- a/es2panda/test/compiler/ts/new_expression_92-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_92-expected.txt @@ -22,11 +22,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -50,11 +50,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -76,22 +76,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -185,14 +185,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -202,26 +202,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 27 } } @@ -231,11 +230,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -243,22 +242,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 34 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 34 } } @@ -267,11 +266,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -283,9 +282,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 4. [new_expression_92.ts:2:25] +TypeError: Expected 2 arguments, but got 4. [new_expression_92.ts:18:25] diff --git a/es2panda/test/compiler/ts/new_expression_93-expected.txt b/es2panda/test/compiler/ts/new_expression_93-expected.txt index b3be0f62e65233558ac448e800fbba14a6373185..5d92013dd6db41397822472e8c239f4f25d2be3d 100644 --- a/es2panda/test/compiler/ts/new_expression_93-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_93-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_93.ts:2:23] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_93.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_94-expected.txt b/es2panda/test/compiler/ts/new_expression_94-expected.txt index 1fdf12998683ff7dd2c13d83b0d99b69d08299a2..1a71a8a9ab4f57028b9b4f7472cbcd29ea5d42d7 100644 --- a/es2panda/test/compiler/ts/new_expression_94-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_94-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -187,11 +187,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_94.ts:2:23] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_94.ts:18:23] diff --git a/es2panda/test/compiler/ts/new_expression_95-expected.txt b/es2panda/test/compiler/ts/new_expression_95-expected.txt index d3bc0a4b402e75d50bebad8c1a7354cbb89bdf08..5af4e763159dfd14f435a78567ff93347ccec111 100644 --- a/es2panda/test/compiler/ts/new_expression_95-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_95-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -170,14 +170,14 @@ "arguments": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_95.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_95.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_96-expected.txt b/es2panda/test/compiler/ts/new_expression_96-expected.txt index caa33c305a09a75785b674ad2fb8d3636fc2d776..554d753f315c957d5dba7ddf47d8a272cfe65eca 100644 --- a/es2panda/test/compiler/ts/new_expression_96-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_96-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'number' is not assignable to parameter of type 'string'. [new_expression_96.ts:2:17] +TypeError: Type 'number' is not assignable to type 'string'. [new_expression_96.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_97-expected.txt b/es2panda/test/compiler/ts/new_expression_97-expected.txt index 883adbd260c31dd42802a72451b52f20a3c184ce..6d9352a58626f5522746edf1ec2beae294e5d307 100644 --- a/es2panda/test/compiler/ts/new_expression_97-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_97-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_97.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_97.ts:18:9] diff --git a/es2panda/test/compiler/ts/new_expression_98-expected.txt b/es2panda/test/compiler/ts/new_expression_98-expected.txt index 01d5d42d23616551e7bb555616b227078d9e4637..b27298f6034063a58159feec49058e12c5683743 100644 --- a/es2panda/test/compiler/ts/new_expression_98-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_98-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,25 +173,25 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -199,22 +199,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -223,11 +223,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -239,9 +239,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Argument of type 'boolean' is not assignable to parameter of type 'string'. [new_expression_98.ts:2:17] +TypeError: Type 'boolean' is not assignable to type 'string'. [new_expression_98.ts:18:17] diff --git a/es2panda/test/compiler/ts/new_expression_99-expected.txt b/es2panda/test/compiler/ts/new_expression_99-expected.txt index 38c71961a8a0db27096f81102d49d0e394d2190a..88f0fa7250e6de8e23e916ab6629f977bef2c1f8 100644 --- a/es2panda/test/compiler/ts/new_expression_99-expected.txt +++ b/es2panda/test/compiler/ts/new_expression_99-expected.txt @@ -19,11 +19,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -59,11 +59,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -73,22 +73,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -108,11 +108,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -121,11 +121,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -173,11 +173,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -185,22 +185,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -209,11 +209,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -225,9 +225,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 1 } } } -TypeError: Expected 2 arguments, but got 1. [new_expression_99.ts:2:9] +TypeError: Expected 2 arguments, but got 1. [new_expression_99.ts:18:9] diff --git a/es2panda/test/compiler/ts/objectDestructuring-expected.txt b/es2panda/test/compiler/ts/objectDestructuring-expected.txt index 1e4e678832da25c5a9d90bb4fdb8b58c9adb80b4..bb02d9ce414df2540bacaf2145c442dbdb6eae4c 100644 --- a/es2panda/test/compiler/ts/objectDestructuring-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -47,11 +47,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -94,11 +94,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -106,11 +106,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -129,11 +129,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -143,11 +143,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -155,11 +155,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -175,25 +175,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -201,11 +201,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -213,22 +213,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } @@ -271,33 +271,33 @@ "value": 3, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -313,47 +313,47 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -377,11 +377,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -395,11 +395,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 14 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -408,11 +408,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 5, + "line": 21, "column": 20 }, "end": { - "line": 5, + "line": 21, "column": 21 } } @@ -421,11 +421,11 @@ "type": "OmittedExpression", "loc": { "start": { - "line": 5, + "line": 21, "column": 22 }, "end": { - "line": 5, + "line": 21, "column": 23 } } @@ -436,11 +436,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 24 }, "end": { - "line": 5, + "line": 21, "column": 28 } } @@ -448,11 +448,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 29 } } @@ -460,11 +460,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 29 } } @@ -480,11 +480,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 31 }, "end": { - "line": 5, + "line": 21, "column": 35 } } @@ -497,11 +497,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 31 }, "end": { - "line": 5, + "line": 21, "column": 35 } } @@ -511,22 +511,22 @@ "value": true, "loc": { "start": { - "line": 5, + "line": 21, "column": 38 }, "end": { - "line": 5, + "line": 21, "column": 42 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 31 }, "end": { - "line": 5, + "line": 21, "column": 42 } } @@ -534,11 +534,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 31 }, "end": { - "line": 5, + "line": 21, "column": 42 } } @@ -546,11 +546,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 44 } } @@ -569,11 +569,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 49 }, "end": { - "line": 5, + "line": 21, "column": 53 } } @@ -586,11 +586,11 @@ "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 56 }, "end": { - "line": 5, + "line": 21, "column": 57 } } @@ -600,11 +600,11 @@ "elements": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 59 }, "end": { - "line": 5, + "line": 21, "column": 61 } } @@ -614,25 +614,25 @@ "properties": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 63 }, "end": { - "line": 5, + "line": 21, "column": 65 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 67 }, "end": { - "line": 5, + "line": 21, "column": 72 } } @@ -640,11 +640,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 55 }, "end": { - "line": 5, + "line": 21, "column": 73 } } @@ -652,11 +652,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 49 }, "end": { - "line": 5, + "line": 21, "column": 73 } } @@ -664,22 +664,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 47 }, "end": { - "line": 5, + "line": 21, "column": 75 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 75 } } @@ -688,11 +688,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 75 } } @@ -708,11 +708,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 5 } } @@ -722,33 +722,33 @@ "value": 12, "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 10 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 10 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 11 } } @@ -764,47 +764,47 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 5 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 13 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 13 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 14 } } @@ -820,11 +820,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 5 } } @@ -834,33 +834,33 @@ "value": false, "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 13 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 13 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 14 } } @@ -884,11 +884,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 7 }, "end": { - "line": 10, + "line": 26, "column": 11 } } @@ -909,11 +909,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 15 }, "end": { - "line": 10, + "line": 26, "column": 19 } } @@ -926,11 +926,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 15 }, "end": { - "line": 10, + "line": 26, "column": 19 } } @@ -940,22 +940,22 @@ "value": 3, "loc": { "start": { - "line": 10, + "line": 26, "column": 22 }, "end": { - "line": 10, + "line": 26, "column": 23 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 15 }, "end": { - "line": 10, + "line": 26, "column": 23 } } @@ -963,11 +963,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 15 }, "end": { - "line": 10, + "line": 26, "column": 23 } } @@ -983,11 +983,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 25 }, "end": { - "line": 10, + "line": 26, "column": 29 } } @@ -1000,11 +1000,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 25 }, "end": { - "line": 10, + "line": 26, "column": 29 } } @@ -1014,22 +1014,22 @@ "value": "", "loc": { "start": { - "line": 10, + "line": 26, "column": 32 }, "end": { - "line": 10, + "line": 26, "column": 34 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 25 }, "end": { - "line": 10, + "line": 26, "column": 34 } } @@ -1037,11 +1037,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 25 }, "end": { - "line": 10, + "line": 26, "column": 34 } } @@ -1049,11 +1049,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 10, + "line": 26, "column": 36 } } @@ -1072,25 +1072,25 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 41 }, "end": { - "line": 10, + "line": 26, "column": 45 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 10, + "line": 26, "column": 47 }, "end": { - "line": 10, + "line": 26, "column": 52 } } @@ -1098,11 +1098,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 41 }, "end": { - "line": 10, + "line": 26, "column": 52 } } @@ -1118,11 +1118,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 54 }, "end": { - "line": 10, + "line": 26, "column": 58 } } @@ -1132,11 +1132,11 @@ "value": true, "loc": { "start": { - "line": 10, + "line": 26, "column": 60 }, "end": { - "line": 10, + "line": 26, "column": 64 } } @@ -1144,11 +1144,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 54 }, "end": { - "line": 10, + "line": 26, "column": 64 } } @@ -1156,22 +1156,22 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 39 }, "end": { - "line": 10, + "line": 26, "column": 66 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 10, + "line": 26, "column": 66 } } @@ -1179,11 +1179,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 7 }, "end": { - "line": 10, + "line": 26, "column": 66 } } @@ -1191,11 +1191,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 68 } } @@ -1214,11 +1214,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 73 }, "end": { - "line": 10, + "line": 26, "column": 77 } } @@ -1237,11 +1237,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 81 }, "end": { - "line": 10, + "line": 26, "column": 85 } } @@ -1251,11 +1251,11 @@ "value": 1, "loc": { "start": { - "line": 10, + "line": 26, "column": 87 }, "end": { - "line": 10, + "line": 26, "column": 88 } } @@ -1263,11 +1263,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 81 }, "end": { - "line": 10, + "line": 26, "column": 88 } } @@ -1283,25 +1283,25 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 90 }, "end": { - "line": 10, + "line": 26, "column": 94 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 10, + "line": 26, "column": 96 }, "end": { - "line": 10, + "line": 26, "column": 101 } } @@ -1309,11 +1309,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 90 }, "end": { - "line": 10, + "line": 26, "column": 101 } } @@ -1321,11 +1321,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 79 }, "end": { - "line": 10, + "line": 26, "column": 103 } } @@ -1333,11 +1333,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 73 }, "end": { - "line": 10, + "line": 26, "column": 103 } } @@ -1345,22 +1345,22 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 71 }, "end": { - "line": 10, + "line": 26, "column": 105 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 105 } } @@ -1369,11 +1369,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 105 } } @@ -1389,11 +1389,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 5 } } @@ -1403,33 +1403,33 @@ "value": 1, "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 9 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 9 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 10 } } @@ -1445,47 +1445,47 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 5 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 12, + "line": 28, "column": 8 }, "end": { - "line": 12, + "line": 28, "column": 13 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 13 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 14 } } @@ -1501,11 +1501,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 5 } } @@ -1515,33 +1515,33 @@ "value": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 13 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 13 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 14 } } @@ -1557,47 +1557,47 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 5 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 13 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 13 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 14 } } @@ -1621,11 +1621,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 7 }, "end": { - "line": 16, + "line": 32, "column": 11 } } @@ -1646,11 +1646,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 15 }, "end": { - "line": 16, + "line": 32, "column": 19 } } @@ -1666,11 +1666,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 22 }, "end": { - "line": 16, + "line": 32, "column": 26 } } @@ -1680,22 +1680,22 @@ "value": 1, "loc": { "start": { - "line": 16, + "line": 32, "column": 29 }, "end": { - "line": 16, + "line": 32, "column": 30 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 22 }, "end": { - "line": 16, + "line": 32, "column": 30 } } @@ -1708,73 +1708,166 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 32 }, "end": { - "line": 16, + "line": 32, "column": 36 } } }, "right": { "type": "ObjectExpression", - "properties": [], + "properties": [ + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 32, + "column": 41 + }, + "end": { + "line": 32, + "column": 42 + } + } + }, + "value": { + "type": "NumberLiteral", + "value": 3, + "loc": { + "start": { + "line": 32, + "column": 44 + }, + "end": { + "line": 32, + "column": 45 + } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 32, + "column": 41 + }, + "end": { + "line": 32, + "column": 45 + } + } + }, + { + "type": "Property", + "method": false, + "shorthand": false, + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 32, + "column": 47 + }, + "end": { + "line": 32, + "column": 48 + } + } + }, + "value": { + "type": "StringLiteral", + "value": "bar", + "loc": { + "start": { + "line": 32, + "column": 50 + }, + "end": { + "line": 32, + "column": 55 + } + } + }, + "kind": "init", + "loc": { + "start": { + "line": 32, + "column": 47 + }, + "end": { + "line": 32, + "column": 55 + } + } + } + ], "loc": { "start": { - "line": 16, + "line": 32, "column": 39 }, "end": { - "line": 16, - "column": 41 + "line": 32, + "column": 57 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 32 }, "end": { - "line": 16, - "column": 41 + "line": 32, + "column": 57 } } } ], "loc": { "start": { - "line": 16, + "line": 32, "column": 21 }, "end": { - "line": 16, - "column": 42 + "line": 32, + "column": 58 } } }, "kind": "init", "loc": { "start": { - "line": 16, + "line": 32, "column": 15 }, "end": { - "line": 16, - "column": 42 + "line": 32, + "column": 58 } } } ], "loc": { "start": { - "line": 16, + "line": 32, "column": 13 }, "end": { - "line": 16, - "column": 44 + "line": 32, + "column": 60 } } }, @@ -1792,12 +1885,12 @@ "decorators": [], "loc": { "start": { - "line": 16, - "column": 49 + "line": 32, + "column": 65 }, "end": { - "line": 16, - "column": 53 + "line": 32, + "column": 69 } } }, @@ -1806,15 +1899,15 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 16, - "column": 56 + "line": 32, + "column": 72 }, "end": { - "line": 16, - "column": 61 + "line": 32, + "column": 77 } } }, @@ -1823,83 +1916,83 @@ "value": true, "loc": { "start": { - "line": 16, - "column": 63 + "line": 32, + "column": 79 }, "end": { - "line": 16, - "column": 67 + "line": 32, + "column": 83 } } } ], "loc": { "start": { - "line": 16, - "column": 55 + "line": 32, + "column": 71 }, "end": { - "line": 16, - "column": 68 + "line": 32, + "column": 84 } } }, "kind": "init", "loc": { "start": { - "line": 16, - "column": 49 + "line": 32, + "column": 65 }, "end": { - "line": 16, - "column": 68 + "line": 32, + "column": 84 } } } ], "loc": { "start": { - "line": 16, - "column": 47 + "line": 32, + "column": 63 }, "end": { - "line": 16, - "column": 70 + "line": 32, + "column": 86 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 13 }, "end": { - "line": 16, - "column": 70 + "line": 32, + "column": 86 } } }, "kind": "init", "loc": { "start": { - "line": 16, + "line": 32, "column": 7 }, "end": { - "line": 16, - "column": 70 + "line": 32, + "column": 86 } } } ], "loc": { "start": { - "line": 16, + "line": 32, "column": 5 }, "end": { - "line": 16, - "column": 72 + "line": 32, + "column": 88 } } }, @@ -1917,12 +2010,12 @@ "decorators": [], "loc": { "start": { - "line": 16, - "column": 77 + "line": 32, + "column": 93 }, "end": { - "line": 16, - "column": 81 + "line": 32, + "column": 97 } } }, @@ -1940,12 +2033,12 @@ "decorators": [], "loc": { "start": { - "line": 16, - "column": 85 + "line": 32, + "column": 101 }, "end": { - "line": 16, - "column": 89 + "line": 32, + "column": 105 } } }, @@ -1957,12 +2050,12 @@ "value": 1, "loc": { "start": { - "line": 16, - "column": 92 + "line": 32, + "column": 108 }, "end": { - "line": 16, - "column": 93 + "line": 32, + "column": 109 } } }, @@ -1971,12 +2064,12 @@ "value": 2, "loc": { "start": { - "line": 16, - "column": 95 + "line": 32, + "column": 111 }, "end": { - "line": 16, - "column": 96 + "line": 32, + "column": 112 } } }, @@ -1985,83 +2078,83 @@ "value": 3, "loc": { "start": { - "line": 16, - "column": 98 + "line": 32, + "column": 114 }, "end": { - "line": 16, - "column": 99 + "line": 32, + "column": 115 } } } ], "loc": { "start": { - "line": 16, - "column": 91 + "line": 32, + "column": 107 }, "end": { - "line": 16, - "column": 100 + "line": 32, + "column": 116 } } }, "kind": "init", "loc": { "start": { - "line": 16, - "column": 85 + "line": 32, + "column": 101 }, "end": { - "line": 16, - "column": 100 + "line": 32, + "column": 116 } } } ], "loc": { "start": { - "line": 16, - "column": 83 + "line": 32, + "column": 99 }, "end": { - "line": 16, - "column": 102 + "line": 32, + "column": 118 } } }, "kind": "init", "loc": { "start": { - "line": 16, - "column": 77 + "line": 32, + "column": 93 }, "end": { - "line": 16, - "column": 102 + "line": 32, + "column": 118 } } } ], "loc": { "start": { - "line": 16, - "column": 75 + "line": 32, + "column": 91 }, "end": { - "line": 16, - "column": 104 + "line": 32, + "column": 120 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 5 }, "end": { - "line": 16, - "column": 104 + "line": 32, + "column": 120 } } } @@ -2069,12 +2162,12 @@ "kind": "var", "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, - "column": 105 + "line": 32, + "column": 121 } } }, @@ -2089,11 +2182,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 5 } } @@ -2104,33 +2197,33 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 12 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 12 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 13 } } @@ -2146,11 +2239,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 5 } } @@ -2160,33 +2253,33 @@ "value": 1, "loc": { "start": { - "line": 18, + "line": 34, "column": 8 }, "end": { - "line": 18, + "line": 34, "column": 9 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 9 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 10 } } @@ -2202,11 +2295,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 5 } } @@ -2225,11 +2318,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 10 }, "end": { - "line": 19, + "line": 35, "column": 11 } } @@ -2239,11 +2332,11 @@ "value": 1, "loc": { "start": { - "line": 19, + "line": 35, "column": 13 }, "end": { - "line": 19, + "line": 35, "column": 14 } } @@ -2251,11 +2344,11 @@ "kind": "init", "loc": { "start": { - "line": 19, + "line": 35, "column": 10 }, "end": { - "line": 19, + "line": 35, "column": 14 } } @@ -2271,25 +2364,25 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 16 }, "end": { - "line": 19, + "line": 35, "column": 17 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 19, + "line": 35, "column": 19 }, "end": { - "line": 19, + "line": 35, "column": 24 } } @@ -2297,11 +2390,11 @@ "kind": "init", "loc": { "start": { - "line": 19, + "line": 35, "column": 16 }, "end": { - "line": 19, + "line": 35, "column": 24 } } @@ -2309,33 +2402,33 @@ ], "loc": { "start": { - "line": 19, + "line": 35, "column": 8 }, "end": { - "line": 19, + "line": 35, "column": 26 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 26 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 27 } } @@ -2351,11 +2444,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 5 } } @@ -2365,33 +2458,33 @@ "value": false, "loc": { "start": { - "line": 20, + "line": 36, "column": 8 }, "end": { - "line": 20, + "line": 36, "column": 13 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 13 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 14 } } @@ -2412,11 +2505,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 5 }, "end": { - "line": 23, + "line": 39, "column": 10 } } @@ -2425,22 +2518,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 23, + "line": 39, "column": 12 }, "end": { - "line": 23, + "line": 39, "column": 18 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 5 }, "end": { - "line": 23, + "line": 39, "column": 19 } } @@ -2456,11 +2549,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 5 }, "end": { - "line": 24, + "line": 40, "column": 6 } } @@ -2469,22 +2562,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 24, + "line": 40, "column": 8 }, "end": { - "line": 24, + "line": 40, "column": 14 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 5 }, "end": { - "line": 24, + "line": 40, "column": 15 } } @@ -2499,11 +2592,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 9 }, "end": { - "line": 25, + "line": 41, "column": 15 } } @@ -2511,11 +2604,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 6 }, "end": { - "line": 25, + "line": 41, "column": 7 } } @@ -2529,22 +2622,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 20 }, "end": { - "line": 25, + "line": 41, "column": 26 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 20 }, "end": { - "line": 25, + "line": 41, "column": 28 } } @@ -2552,11 +2645,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 17 }, "end": { - "line": 25, + "line": 41, "column": 18 } } @@ -2566,22 +2659,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 31 }, "end": { - "line": 25, + "line": 41, "column": 38 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 39 } } @@ -2589,11 +2682,11 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 22 }, "end": { - "line": 26, + "line": 42, "column": 2 } } @@ -2604,11 +2697,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 11 }, "end": { - "line": 22, + "line": 38, "column": 21 } } @@ -2616,11 +2709,11 @@ "extends": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 2 } } @@ -2641,22 +2734,22 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 12 }, "end": { - "line": 28, + "line": 44, "column": 22 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 12 }, "end": { - "line": 28, + "line": 44, "column": 22 } } @@ -2664,11 +2757,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 5 }, "end": { - "line": 28, + "line": 44, "column": 10 } } @@ -2676,11 +2769,11 @@ "init": null, "loc": { "start": { - "line": 28, + "line": 44, "column": 5 }, "end": { - "line": 28, + "line": 44, "column": 10 } } @@ -2689,11 +2782,11 @@ "kind": "var", "loc": { "start": { - "line": 28, + "line": 44, "column": 1 }, "end": { - "line": 28, + "line": 44, "column": 23 } } @@ -2717,11 +2810,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 7 }, "end": { - "line": 29, + "line": 45, "column": 12 } } @@ -2732,11 +2825,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 7 }, "end": { - "line": 29, + "line": 45, "column": 12 } } @@ -2744,11 +2837,11 @@ "kind": "init", "loc": { "start": { - "line": 29, + "line": 45, "column": 7 }, "end": { - "line": 29, + "line": 45, "column": 12 } } @@ -2761,22 +2854,22 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 17 }, "end": { - "line": 29, + "line": 45, "column": 22 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 14 }, "end": { - "line": 29, + "line": 45, "column": 22 } } @@ -2784,11 +2877,11 @@ ], "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 24 } } @@ -2799,22 +2892,22 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 27 }, "end": { - "line": 29, + "line": 45, "column": 32 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 32 } } @@ -2823,11 +2916,11 @@ "kind": "var", "loc": { "start": { - "line": 29, + "line": 45, "column": 1 }, "end": { - "line": 29, + "line": 45, "column": 33 } } @@ -2843,11 +2936,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 6 } } @@ -2857,33 +2950,33 @@ "value": 12, "loc": { "start": { - "line": 30, + "line": 46, "column": 9 }, "end": { - "line": 30, + "line": 46, "column": 11 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 11 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 12 } } @@ -2899,11 +2992,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 1 }, "end": { - "line": 31, + "line": 47, "column": 6 } } @@ -2922,25 +3015,25 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 11 }, "end": { - "line": 31, + "line": 47, "column": 12 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 31, + "line": 47, "column": 14 }, "end": { - "line": 31, + "line": 47, "column": 19 } } @@ -2948,11 +3041,11 @@ "kind": "init", "loc": { "start": { - "line": 31, + "line": 47, "column": 11 }, "end": { - "line": 31, + "line": 47, "column": 19 } } @@ -2960,33 +3053,33 @@ ], "loc": { "start": { - "line": 31, + "line": 47, "column": 9 }, "end": { - "line": 31, + "line": 47, "column": 21 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 1 }, "end": { - "line": 31, + "line": 47, "column": 21 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 1 }, "end": { - "line": 31, + "line": 47, "column": 22 } } @@ -3010,11 +3103,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 7 }, "end": { - "line": 33, + "line": 49, "column": 12 } } @@ -3027,11 +3120,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 7 }, "end": { - "line": 33, + "line": 49, "column": 12 } } @@ -3041,22 +3134,22 @@ "value": 6, "loc": { "start": { - "line": 33, + "line": 49, "column": 15 }, "end": { - "line": 33, + "line": 49, "column": 16 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 7 }, "end": { - "line": 33, + "line": 49, "column": 16 } } @@ -3064,11 +3157,11 @@ "kind": "init", "loc": { "start": { - "line": 33, + "line": 49, "column": 7 }, "end": { - "line": 33, + "line": 49, "column": 16 } } @@ -3084,11 +3177,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 18 }, "end": { - "line": 33, + "line": 49, "column": 23 } } @@ -3101,11 +3194,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 18 }, "end": { - "line": 33, + "line": 49, "column": 23 } } @@ -3115,22 +3208,22 @@ "value": true, "loc": { "start": { - "line": 33, + "line": 49, "column": 26 }, "end": { - "line": 33, + "line": 49, "column": 30 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 18 }, "end": { - "line": 33, + "line": 49, "column": 30 } } @@ -3138,11 +3231,11 @@ "kind": "init", "loc": { "start": { - "line": 33, + "line": 49, "column": 18 }, "end": { - "line": 33, + "line": 49, "column": 30 } } @@ -3162,11 +3255,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 36 }, "end": { - "line": 33, + "line": 49, "column": 41 } } @@ -3178,11 +3271,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 43 }, "end": { - "line": 33, + "line": 49, "column": 49 } } @@ -3191,11 +3284,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 52 }, "end": { - "line": 33, + "line": 49, "column": 58 } } @@ -3203,22 +3296,22 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 43 }, "end": { - "line": 33, + "line": 49, "column": 58 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 36 }, "end": { - "line": 33, + "line": 49, "column": 59 } } @@ -3234,11 +3327,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 60 }, "end": { - "line": 33, + "line": 49, "column": 65 } } @@ -3250,11 +3343,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 67 }, "end": { - "line": 33, + "line": 49, "column": 74 } } @@ -3265,22 +3358,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 77 }, "end": { - "line": 33, + "line": 49, "column": 83 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 77 }, "end": { - "line": 33, + "line": 49, "column": 85 } } @@ -3288,22 +3381,22 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 67 }, "end": { - "line": 33, + "line": 49, "column": 85 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 60 }, "end": { - "line": 33, + "line": 49, "column": 87 } } @@ -3311,22 +3404,22 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 34 }, "end": { - "line": 33, + "line": 49, "column": 87 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, + "line": 49, "column": 32 } } @@ -3345,25 +3438,25 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 92 }, "end": { - "line": 33, + "line": 49, "column": 97 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 33, + "line": 49, "column": 99 }, "end": { - "line": 33, + "line": 49, "column": 104 } } @@ -3371,11 +3464,11 @@ "kind": "init", "loc": { "start": { - "line": 33, + "line": 49, "column": 92 }, "end": { - "line": 33, + "line": 49, "column": 104 } } @@ -3391,11 +3484,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 106 }, "end": { - "line": 33, + "line": 49, "column": 111 } } @@ -3408,11 +3501,11 @@ "value": 1, "loc": { "start": { - "line": 33, + "line": 49, "column": 114 }, "end": { - "line": 33, + "line": 49, "column": 115 } } @@ -3422,11 +3515,11 @@ "value": 2, "loc": { "start": { - "line": 33, + "line": 49, "column": 117 }, "end": { - "line": 33, + "line": 49, "column": 118 } } @@ -3436,11 +3529,11 @@ "value": 3, "loc": { "start": { - "line": 33, + "line": 49, "column": 120 }, "end": { - "line": 33, + "line": 49, "column": 121 } } @@ -3448,11 +3541,11 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 113 }, "end": { - "line": 33, + "line": 49, "column": 122 } } @@ -3460,11 +3553,11 @@ "kind": "init", "loc": { "start": { - "line": 33, + "line": 49, "column": 106 }, "end": { - "line": 33, + "line": 49, "column": 122 } } @@ -3472,22 +3565,22 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 90 }, "end": { - "line": 33, + "line": 49, "column": 124 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, + "line": 49, "column": 124 } } @@ -3496,11 +3589,11 @@ "kind": "var", "loc": { "start": { - "line": 33, + "line": 49, "column": 1 }, "end": { - "line": 33, + "line": 49, "column": 125 } } @@ -3524,11 +3617,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 7 }, "end": { - "line": 34, + "line": 50, "column": 11 } } @@ -3547,11 +3640,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 15 }, "end": { - "line": 34, + "line": 50, "column": 20 } } @@ -3562,11 +3655,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 15 }, "end": { - "line": 34, + "line": 50, "column": 20 } } @@ -3574,11 +3667,11 @@ "kind": "init", "loc": { "start": { - "line": 34, + "line": 50, "column": 15 }, "end": { - "line": 34, + "line": 50, "column": 20 } } @@ -3591,22 +3684,22 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 25 }, "end": { - "line": 34, + "line": 50, "column": 30 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 22 }, "end": { - "line": 34, + "line": 50, "column": 30 } } @@ -3614,11 +3707,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 13 }, "end": { - "line": 34, + "line": 50, "column": 32 } } @@ -3626,11 +3719,11 @@ "kind": "init", "loc": { "start": { - "line": 34, + "line": 50, "column": 7 }, "end": { - "line": 34, + "line": 50, "column": 32 } } @@ -3650,11 +3743,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 38 }, "end": { - "line": 34, + "line": 50, "column": 42 } } @@ -3673,11 +3766,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 46 }, "end": { - "line": 34, + "line": 50, "column": 51 } } @@ -3686,22 +3779,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 53 }, "end": { - "line": 34, + "line": 50, "column": 59 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 46 }, "end": { - "line": 34, + "line": 50, "column": 60 } } @@ -3717,11 +3810,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 61 }, "end": { - "line": 34, + "line": 50, "column": 62 } } @@ -3730,22 +3823,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 64 }, "end": { - "line": 34, + "line": 50, "column": 70 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 61 }, "end": { - "line": 34, + "line": 50, "column": 71 } } @@ -3760,11 +3853,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 72 }, "end": { - "line": 34, + "line": 50, "column": 73 } } @@ -3777,11 +3870,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 77 }, "end": { - "line": 34, + "line": 50, "column": 83 } } @@ -3789,11 +3882,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 74 }, "end": { - "line": 34, + "line": 50, "column": 75 } } @@ -3807,22 +3900,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 88 }, "end": { - "line": 34, + "line": 50, "column": 94 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 88 }, "end": { - "line": 34, + "line": 50, "column": 96 } } @@ -3830,11 +3923,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 85 }, "end": { - "line": 34, + "line": 50, "column": 86 } } @@ -3844,22 +3937,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 99 }, "end": { - "line": 34, + "line": 50, "column": 106 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 72 }, "end": { - "line": 34, + "line": 50, "column": 107 } } @@ -3875,11 +3968,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 108 }, "end": { - "line": 34, + "line": 50, "column": 109 } } @@ -3890,33 +3983,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 111 }, "end": { - "line": 34, + "line": 50, "column": 117 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 111 }, "end": { - "line": 34, + "line": 50, "column": 119 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 108 }, "end": { - "line": 34, + "line": 50, "column": 121 } } @@ -3924,22 +4017,22 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 44 }, "end": { - "line": 34, + "line": 50, "column": 121 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 38 }, "end": { - "line": 34, + "line": 50, "column": 123 } } @@ -3947,22 +4040,22 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 36 }, "end": { - "line": 34, + "line": 50, "column": 123 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 5 }, "end": { - "line": 34, + "line": 50, "column": 34 } } @@ -3981,11 +4074,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 128 }, "end": { - "line": 34, + "line": 50, "column": 132 } } @@ -4004,11 +4097,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 136 }, "end": { - "line": 34, + "line": 50, "column": 141 } } @@ -4018,11 +4111,11 @@ "value": 12, "loc": { "start": { - "line": 34, + "line": 50, "column": 143 }, "end": { - "line": 34, + "line": 50, "column": 145 } } @@ -4030,11 +4123,11 @@ "kind": "init", "loc": { "start": { - "line": 34, + "line": 50, "column": 136 }, "end": { - "line": 34, + "line": 50, "column": 145 } } @@ -4050,25 +4143,25 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 147 }, "end": { - "line": 34, + "line": 50, "column": 148 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 34, + "line": 50, "column": 150 }, "end": { - "line": 34, + "line": 50, "column": 155 } } @@ -4076,11 +4169,11 @@ "kind": "init", "loc": { "start": { - "line": 34, + "line": 50, "column": 147 }, "end": { - "line": 34, + "line": 50, "column": 155 } } @@ -4096,11 +4189,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 157 }, "end": { - "line": 34, + "line": 50, "column": 158 } } @@ -4113,11 +4206,11 @@ "value": 1, "loc": { "start": { - "line": 34, + "line": 50, "column": 161 }, "end": { - "line": 34, + "line": 50, "column": 162 } } @@ -4127,11 +4220,11 @@ "value": 2, "loc": { "start": { - "line": 34, + "line": 50, "column": 164 }, "end": { - "line": 34, + "line": 50, "column": 165 } } @@ -4141,11 +4234,11 @@ "value": 3, "loc": { "start": { - "line": 34, + "line": 50, "column": 167 }, "end": { - "line": 34, + "line": 50, "column": 168 } } @@ -4153,11 +4246,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 160 }, "end": { - "line": 34, + "line": 50, "column": 169 } } @@ -4165,11 +4258,11 @@ "kind": "init", "loc": { "start": { - "line": 34, + "line": 50, "column": 157 }, "end": { - "line": 34, + "line": 50, "column": 169 } } @@ -4185,11 +4278,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 171 }, "end": { - "line": 34, + "line": 50, "column": 172 } } @@ -4210,11 +4303,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 187 }, "end": { - "line": 34, + "line": 50, "column": 193 } } @@ -4222,11 +4315,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 184 }, "end": { - "line": 34, + "line": 50, "column": 185 } } @@ -4240,22 +4333,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 198 }, "end": { - "line": 34, + "line": 50, "column": 204 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 198 }, "end": { - "line": 34, + "line": 50, "column": 206 } } @@ -4263,11 +4356,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 195 }, "end": { - "line": 34, + "line": 50, "column": 196 } } @@ -4277,11 +4370,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 209 }, "end": { - "line": 34, + "line": 50, "column": 216 } } @@ -4296,22 +4389,22 @@ "value": true, "loc": { "start": { - "line": 34, + "line": 50, "column": 226 }, "end": { - "line": 34, + "line": 50, "column": 230 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 219 }, "end": { - "line": 34, + "line": 50, "column": 230 } } @@ -4319,33 +4412,33 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 217 }, "end": { - "line": 34, + "line": 50, "column": 232 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 174 }, "end": { - "line": 34, + "line": 50, "column": 232 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 174 }, "end": { - "line": 34, + "line": 50, "column": 232 } } @@ -4353,11 +4446,11 @@ "kind": "init", "loc": { "start": { - "line": 34, + "line": 50, "column": 171 }, "end": { - "line": 34, + "line": 50, "column": 232 } } @@ -4365,11 +4458,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 134 }, "end": { - "line": 34, + "line": 50, "column": 234 } } @@ -4377,11 +4470,11 @@ "kind": "init", "loc": { "start": { - "line": 34, + "line": 50, "column": 128 }, "end": { - "line": 34, + "line": 50, "column": 234 } } @@ -4389,22 +4482,22 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 126 }, "end": { - "line": 34, + "line": 50, "column": 236 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 5 }, "end": { - "line": 34, + "line": 50, "column": 236 } } @@ -4413,11 +4506,11 @@ "kind": "var", "loc": { "start": { - "line": 34, + "line": 50, "column": 1 }, "end": { - "line": 34, + "line": 50, "column": 237 } } @@ -4438,22 +4531,22 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 10 }, "end": { - "line": 35, + "line": 51, "column": 15 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 7 }, "end": { - "line": 35, + "line": 51, "column": 15 } } @@ -4476,11 +4569,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 21 }, "end": { - "line": 35, + "line": 51, "column": 22 } } @@ -4489,22 +4582,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 24 }, "end": { - "line": 35, + "line": 51, "column": 30 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 21 }, "end": { - "line": 35, + "line": 51, "column": 31 } } @@ -4520,11 +4613,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 32 }, "end": { - "line": 35, + "line": 51, "column": 33 } } @@ -4533,22 +4626,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 35 }, "end": { - "line": 35, + "line": 51, "column": 41 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 32 }, "end": { - "line": 35, + "line": 51, "column": 43 } } @@ -4556,11 +4649,11 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 19 }, "end": { - "line": 35, + "line": 51, "column": 43 } } @@ -4579,11 +4672,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 48 }, "end": { - "line": 35, + "line": 51, "column": 49 } } @@ -4592,22 +4685,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 51 }, "end": { - "line": 35, + "line": 51, "column": 58 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 48 }, "end": { - "line": 35, + "line": 51, "column": 59 } } @@ -4623,11 +4716,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 60 }, "end": { - "line": 35, + "line": 51, "column": 61 } } @@ -4636,22 +4729,22 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 63 }, "end": { - "line": 35, + "line": 51, "column": 67 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 60 }, "end": { - "line": 35, + "line": 51, "column": 69 } } @@ -4659,11 +4752,11 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 46 }, "end": { - "line": 35, + "line": 51, "column": 69 } } @@ -4682,11 +4775,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 74 }, "end": { - "line": 35, + "line": 51, "column": 75 } } @@ -4705,11 +4798,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 79 }, "end": { - "line": 35, + "line": 51, "column": 80 } } @@ -4721,33 +4814,33 @@ "value": true, "loc": { "start": { - "line": 35, + "line": 51, "column": 82 }, "end": { - "line": 35, + "line": 51, "column": 86 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 82 }, "end": { - "line": 35, + "line": 51, "column": 86 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 79 }, "end": { - "line": 35, + "line": 51, "column": 87 } } @@ -4763,11 +4856,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 88 }, "end": { - "line": 35, + "line": 51, "column": 89 } } @@ -4776,36 +4869,36 @@ "type": "TSLiteralType", "literal": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 35, + "line": 51, "column": 91 }, "end": { - "line": 35, + "line": 51, "column": 96 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 91 }, "end": { - "line": 35, + "line": 51, "column": 96 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 88 }, "end": { - "line": 35, + "line": 51, "column": 98 } } @@ -4813,22 +4906,22 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 77 }, "end": { - "line": 35, + "line": 51, "column": 98 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 74 }, "end": { - "line": 35, + "line": 51, "column": 100 } } @@ -4836,11 +4929,11 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 72 }, "end": { - "line": 35, + "line": 51, "column": 100 } } @@ -4848,22 +4941,22 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 19 }, "end": { - "line": 35, + "line": 51, "column": 100 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 17 } } @@ -4882,11 +4975,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 105 }, "end": { - "line": 35, + "line": 51, "column": 106 } } @@ -4896,11 +4989,11 @@ "value": 5, "loc": { "start": { - "line": 35, + "line": 51, "column": 108 }, "end": { - "line": 35, + "line": 51, "column": 109 } } @@ -4908,11 +5001,11 @@ "kind": "init", "loc": { "start": { - "line": 35, + "line": 51, "column": 105 }, "end": { - "line": 35, + "line": 51, "column": 109 } } @@ -4928,25 +5021,25 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 111 }, "end": { - "line": 35, + "line": 51, "column": 112 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 35, + "line": 51, "column": 114 }, "end": { - "line": 35, + "line": 51, "column": 119 } } @@ -4954,11 +5047,11 @@ "kind": "init", "loc": { "start": { - "line": 35, + "line": 51, "column": 111 }, "end": { - "line": 35, + "line": 51, "column": 119 } } @@ -4966,22 +5059,22 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 103 }, "end": { - "line": 35, + "line": 51, "column": 121 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 121 } } @@ -4990,11 +5083,11 @@ "kind": "var", "loc": { "start": { - "line": 35, + "line": 51, "column": 1 }, "end": { - "line": 35, + "line": 51, "column": 122 } } @@ -5011,11 +5104,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 12 }, "end": { - "line": 37, + "line": 53, "column": 18 } } @@ -5023,11 +5116,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 10 } } @@ -5035,11 +5128,11 @@ "init": null, "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 10 } } @@ -5048,11 +5141,11 @@ "kind": "var", "loc": { "start": { - "line": 37, + "line": 53, "column": 1 }, "end": { - "line": 37, + "line": 53, "column": 19 } } @@ -5069,11 +5162,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 38, + "line": 54, "column": 12 }, "end": { - "line": 38, + "line": 54, "column": 19 } } @@ -5081,11 +5174,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 5 }, "end": { - "line": 38, + "line": 54, "column": 10 } } @@ -5093,11 +5186,11 @@ "init": null, "loc": { "start": { - "line": 38, + "line": 54, "column": 5 }, "end": { - "line": 38, + "line": 54, "column": 10 } } @@ -5106,11 +5199,11 @@ "kind": "var", "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 20 } } @@ -5134,11 +5227,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 4 }, "end": { - "line": 40, + "line": 56, "column": 9 } } @@ -5151,11 +5244,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 4 }, "end": { - "line": 40, + "line": 56, "column": 9 } } @@ -5165,22 +5258,22 @@ "value": 0, "loc": { "start": { - "line": 40, + "line": 56, "column": 12 }, "end": { - "line": 40, + "line": 56, "column": 13 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 4 }, "end": { - "line": 40, + "line": 56, "column": 13 } } @@ -5188,11 +5281,11 @@ "kind": "init", "loc": { "start": { - "line": 40, + "line": 56, "column": 4 }, "end": { - "line": 40, + "line": 56, "column": 13 } } @@ -5208,11 +5301,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 15 }, "end": { - "line": 40, + "line": 56, "column": 20 } } @@ -5223,11 +5316,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 15 }, "end": { - "line": 40, + "line": 56, "column": 20 } } @@ -5235,11 +5328,11 @@ "kind": "init", "loc": { "start": { - "line": 40, + "line": 56, "column": 15 }, "end": { - "line": 40, + "line": 56, "column": 20 } } @@ -5247,11 +5340,11 @@ ], "loc": { "start": { - "line": 40, + "line": 56, "column": 2 }, "end": { - "line": 40, + "line": 56, "column": 22 } } @@ -5270,11 +5363,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 27 }, "end": { - "line": 40, + "line": 56, "column": 32 } } @@ -5284,11 +5377,11 @@ "value": 1, "loc": { "start": { - "line": 40, + "line": 56, "column": 34 }, "end": { - "line": 40, + "line": 56, "column": 35 } } @@ -5296,11 +5389,11 @@ "kind": "init", "loc": { "start": { - "line": 40, + "line": 56, "column": 27 }, "end": { - "line": 40, + "line": 56, "column": 35 } } @@ -5316,11 +5409,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 37 }, "end": { - "line": 40, + "line": 56, "column": 42 } } @@ -5330,11 +5423,11 @@ "value": true, "loc": { "start": { - "line": 40, + "line": 56, "column": 44 }, "end": { - "line": 40, + "line": 56, "column": 48 } } @@ -5342,11 +5435,11 @@ "kind": "init", "loc": { "start": { - "line": 40, + "line": 56, "column": 37 }, "end": { - "line": 40, + "line": 56, "column": 48 } } @@ -5354,33 +5447,33 @@ ], "loc": { "start": { - "line": 40, + "line": 56, "column": 25 }, "end": { - "line": 40, + "line": 56, "column": 50 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 51 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 52 } } @@ -5404,11 +5497,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 4 }, "end": { - "line": 41, + "line": 57, "column": 9 } } @@ -5419,11 +5512,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 4 }, "end": { - "line": 41, + "line": 57, "column": 9 } } @@ -5431,11 +5524,11 @@ "kind": "init", "loc": { "start": { - "line": 41, + "line": 57, "column": 4 }, "end": { - "line": 41, + "line": 57, "column": 9 } } @@ -5451,11 +5544,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 11 }, "end": { - "line": 41, + "line": 57, "column": 16 } } @@ -5466,11 +5559,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 11 }, "end": { - "line": 41, + "line": 57, "column": 16 } } @@ -5478,11 +5571,11 @@ "kind": "init", "loc": { "start": { - "line": 41, + "line": 57, "column": 11 }, "end": { - "line": 41, + "line": 57, "column": 16 } } @@ -5490,11 +5583,11 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 2 }, "end": { - "line": 41, + "line": 57, "column": 18 } } @@ -5513,11 +5606,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 23 }, "end": { - "line": 41, + "line": 57, "column": 28 } } @@ -5527,11 +5620,11 @@ "value": false, "loc": { "start": { - "line": 41, + "line": 57, "column": 30 }, "end": { - "line": 41, + "line": 57, "column": 35 } } @@ -5539,11 +5632,11 @@ "kind": "init", "loc": { "start": { - "line": 41, + "line": 57, "column": 23 }, "end": { - "line": 41, + "line": 57, "column": 35 } } @@ -5559,11 +5652,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 37 }, "end": { - "line": 41, + "line": 57, "column": 42 } } @@ -5573,11 +5666,11 @@ "value": 3, "loc": { "start": { - "line": 41, + "line": 57, "column": 44 }, "end": { - "line": 41, + "line": 57, "column": 45 } } @@ -5585,11 +5678,11 @@ "kind": "init", "loc": { "start": { - "line": 41, + "line": 57, "column": 37 }, "end": { - "line": 41, + "line": 57, "column": 45 } } @@ -5597,33 +5690,33 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 21 }, "end": { - "line": 41, + "line": 57, "column": 47 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 48 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 49 } } @@ -5647,11 +5740,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 4 }, "end": { - "line": 42, + "line": 58, "column": 9 } } @@ -5662,11 +5755,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 4 }, "end": { - "line": 42, + "line": 58, "column": 9 } } @@ -5674,11 +5767,11 @@ "kind": "init", "loc": { "start": { - "line": 42, + "line": 58, "column": 4 }, "end": { - "line": 42, + "line": 58, "column": 9 } } @@ -5694,11 +5787,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 11 }, "end": { - "line": 42, + "line": 58, "column": 16 } } @@ -5709,11 +5802,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 11 }, "end": { - "line": 42, + "line": 58, "column": 16 } } @@ -5721,11 +5814,11 @@ "kind": "init", "loc": { "start": { - "line": 42, + "line": 58, "column": 11 }, "end": { - "line": 42, + "line": 58, "column": 16 } } @@ -5733,11 +5826,11 @@ ], "loc": { "start": { - "line": 42, + "line": 58, "column": 2 }, "end": { - "line": 42, + "line": 58, "column": 18 } } @@ -5756,11 +5849,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 23 }, "end": { - "line": 42, + "line": 58, "column": 28 } } @@ -5770,11 +5863,11 @@ "value": 2, "loc": { "start": { - "line": 42, + "line": 58, "column": 30 }, "end": { - "line": 42, + "line": 58, "column": 31 } } @@ -5782,11 +5875,11 @@ "kind": "init", "loc": { "start": { - "line": 42, + "line": 58, "column": 23 }, "end": { - "line": 42, + "line": 58, "column": 31 } } @@ -5794,33 +5887,33 @@ ], "loc": { "start": { - "line": 42, + "line": 58, "column": 21 }, "end": { - "line": 42, + "line": 58, "column": 33 } } }, "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 42, + "line": 58, "column": 34 } } }, "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 42, + "line": 58, "column": 35 } } @@ -5844,11 +5937,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 4 }, "end": { - "line": 43, + "line": 59, "column": 9 } } @@ -5861,11 +5954,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 4 }, "end": { - "line": 43, + "line": 59, "column": 9 } } @@ -5875,22 +5968,22 @@ "value": 4, "loc": { "start": { - "line": 43, + "line": 59, "column": 12 }, "end": { - "line": 43, + "line": 59, "column": 13 } } }, "loc": { "start": { - "line": 43, + "line": 59, "column": 4 }, "end": { - "line": 43, + "line": 59, "column": 13 } } @@ -5898,11 +5991,11 @@ "kind": "init", "loc": { "start": { - "line": 43, + "line": 59, "column": 4 }, "end": { - "line": 43, + "line": 59, "column": 13 } } @@ -5918,11 +6011,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 15 }, "end": { - "line": 43, + "line": 59, "column": 20 } } @@ -5935,11 +6028,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 15 }, "end": { - "line": 43, + "line": 59, "column": 20 } } @@ -5949,22 +6042,22 @@ "value": true, "loc": { "start": { - "line": 43, + "line": 59, "column": 23 }, "end": { - "line": 43, + "line": 59, "column": 27 } } }, "loc": { "start": { - "line": 43, + "line": 59, "column": 15 }, "end": { - "line": 43, + "line": 59, "column": 27 } } @@ -5972,11 +6065,11 @@ "kind": "init", "loc": { "start": { - "line": 43, + "line": 59, "column": 15 }, "end": { - "line": 43, + "line": 59, "column": 27 } } @@ -5984,11 +6077,11 @@ ], "loc": { "start": { - "line": 43, + "line": 59, "column": 2 }, "end": { - "line": 43, + "line": 59, "column": 29 } } @@ -6007,11 +6100,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 34 }, "end": { - "line": 43, + "line": 59, "column": 39 } } @@ -6021,11 +6114,11 @@ "value": false, "loc": { "start": { - "line": 43, + "line": 59, "column": 41 }, "end": { - "line": 43, + "line": 59, "column": 46 } } @@ -6033,11 +6126,11 @@ "kind": "init", "loc": { "start": { - "line": 43, + "line": 59, "column": 34 }, "end": { - "line": 43, + "line": 59, "column": 46 } } @@ -6053,11 +6146,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 48 }, "end": { - "line": 43, + "line": 59, "column": 53 } } @@ -6067,11 +6160,11 @@ "value": 5, "loc": { "start": { - "line": 43, + "line": 59, "column": 55 }, "end": { - "line": 43, + "line": 59, "column": 56 } } @@ -6079,11 +6172,11 @@ "kind": "init", "loc": { "start": { - "line": 43, + "line": 59, "column": 48 }, "end": { - "line": 43, + "line": 59, "column": 56 } } @@ -6091,33 +6184,33 @@ ], "loc": { "start": { - "line": 43, + "line": 59, "column": 32 }, "end": { - "line": 43, + "line": 59, "column": 58 } } }, "loc": { "start": { - "line": 43, + "line": 59, "column": 1 }, "end": { - "line": 43, + "line": 59, "column": 59 } } }, "loc": { "start": { - "line": 43, + "line": 59, "column": 1 }, "end": { - "line": 43, + "line": 59, "column": 60 } } @@ -6133,11 +6226,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 10 } } @@ -6147,22 +6240,22 @@ "properties": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 13 }, "end": { - "line": 45, + "line": 61, "column": 15 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 15 } } @@ -6171,11 +6264,11 @@ "kind": "var", "loc": { "start": { - "line": 45, + "line": 61, "column": 1 }, "end": { - "line": 45, + "line": 61, "column": 16 } } @@ -6199,11 +6292,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 4 }, "end": { - "line": 46, + "line": 62, "column": 9 } } @@ -6214,11 +6307,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 4 }, "end": { - "line": 46, + "line": 62, "column": 9 } } @@ -6226,11 +6319,11 @@ "kind": "init", "loc": { "start": { - "line": 46, + "line": 62, "column": 4 }, "end": { - "line": 46, + "line": 62, "column": 9 } } @@ -6246,11 +6339,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 11 }, "end": { - "line": 46, + "line": 62, "column": 16 } } @@ -6269,11 +6362,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 20 }, "end": { - "line": 46, + "line": 62, "column": 25 } } @@ -6284,11 +6377,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 20 }, "end": { - "line": 46, + "line": 62, "column": 25 } } @@ -6296,11 +6389,11 @@ "kind": "init", "loc": { "start": { - "line": 46, + "line": 62, "column": 20 }, "end": { - "line": 46, + "line": 62, "column": 25 } } @@ -6308,11 +6401,11 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 18 }, "end": { - "line": 46, + "line": 62, "column": 27 } } @@ -6320,11 +6413,11 @@ "kind": "init", "loc": { "start": { - "line": 46, + "line": 62, "column": 11 }, "end": { - "line": 46, + "line": 62, "column": 27 } } @@ -6332,11 +6425,11 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 2 }, "end": { - "line": 46, + "line": 62, "column": 29 } } @@ -6355,11 +6448,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 34 }, "end": { - "line": 46, + "line": 62, "column": 39 } } @@ -6369,11 +6462,11 @@ "value": true, "loc": { "start": { - "line": 46, + "line": 62, "column": 41 }, "end": { - "line": 46, + "line": 62, "column": 45 } } @@ -6381,11 +6474,11 @@ "kind": "init", "loc": { "start": { - "line": 46, + "line": 62, "column": 34 }, "end": { - "line": 46, + "line": 62, "column": 45 } } @@ -6401,11 +6494,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 47 }, "end": { - "line": 46, + "line": 62, "column": 52 } } @@ -6424,11 +6517,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 56 }, "end": { - "line": 46, + "line": 62, "column": 61 } } @@ -6441,11 +6534,11 @@ "value": 5, "loc": { "start": { - "line": 46, + "line": 62, "column": 63 }, "end": { - "line": 46, + "line": 62, "column": 64 } } @@ -6455,22 +6548,22 @@ "value": 6, "loc": { "start": { - "line": 46, + "line": 62, "column": 67 }, "end": { - "line": 46, + "line": 62, "column": 68 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 63 }, "end": { - "line": 46, + "line": 62, "column": 68 } } @@ -6478,11 +6571,11 @@ "kind": "init", "loc": { "start": { - "line": 46, + "line": 62, "column": 56 }, "end": { - "line": 46, + "line": 62, "column": 68 } } @@ -6490,11 +6583,11 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 54 }, "end": { - "line": 46, + "line": 62, "column": 70 } } @@ -6502,11 +6595,11 @@ "kind": "init", "loc": { "start": { - "line": 46, + "line": 62, "column": 47 }, "end": { - "line": 46, + "line": 62, "column": 70 } } @@ -6514,33 +6607,33 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 32 }, "end": { - "line": 46, + "line": 62, "column": 72 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 1 }, "end": { - "line": 46, + "line": 62, "column": 73 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 1 }, "end": { - "line": 46, + "line": 62, "column": 74 } } @@ -6558,11 +6651,11 @@ "members": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 12 }, "end": { - "line": 48, + "line": 64, "column": 14 } } @@ -6570,11 +6663,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 5 }, "end": { - "line": 48, + "line": 64, "column": 10 } } @@ -6582,11 +6675,11 @@ "init": null, "loc": { "start": { - "line": 48, + "line": 64, "column": 5 }, "end": { - "line": 48, + "line": 64, "column": 10 } } @@ -6595,11 +6688,11 @@ "kind": "var", "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 15 } } @@ -6623,11 +6716,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 4 }, "end": { - "line": 50, + "line": 66, "column": 9 } } @@ -6638,11 +6731,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 4 }, "end": { - "line": 50, + "line": 66, "column": 9 } } @@ -6650,11 +6743,11 @@ "kind": "init", "loc": { "start": { - "line": 50, + "line": 66, "column": 4 }, "end": { - "line": 50, + "line": 66, "column": 9 } } @@ -6667,22 +6760,22 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 14 }, "end": { - "line": 50, + "line": 66, "column": 19 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 11 }, "end": { - "line": 50, + "line": 66, "column": 19 } } @@ -6690,11 +6783,11 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 2 }, "end": { - "line": 50, + "line": 66, "column": 21 } } @@ -6713,11 +6806,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 26 }, "end": { - "line": 50, + "line": 66, "column": 31 } } @@ -6727,11 +6820,11 @@ "value": 7, "loc": { "start": { - "line": 50, + "line": 66, "column": 33 }, "end": { - "line": 50, + "line": 66, "column": 34 } } @@ -6739,11 +6832,11 @@ "kind": "init", "loc": { "start": { - "line": 50, + "line": 66, "column": 26 }, "end": { - "line": 50, + "line": 66, "column": 34 } } @@ -6759,11 +6852,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 36 }, "end": { - "line": 50, + "line": 66, "column": 37 } } @@ -6773,11 +6866,11 @@ "value": false, "loc": { "start": { - "line": 50, + "line": 66, "column": 39 }, "end": { - "line": 50, + "line": 66, "column": 44 } } @@ -6785,11 +6878,11 @@ "kind": "init", "loc": { "start": { - "line": 50, + "line": 66, "column": 36 }, "end": { - "line": 50, + "line": 66, "column": 44 } } @@ -6805,11 +6898,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 46 }, "end": { - "line": 50, + "line": 66, "column": 47 } } @@ -6828,25 +6921,25 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 51 }, "end": { - "line": 50, + "line": 66, "column": 52 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 50, + "line": 66, "column": 54 }, "end": { - "line": 50, + "line": 66, "column": 59 } } @@ -6854,11 +6947,11 @@ "kind": "init", "loc": { "start": { - "line": 50, + "line": 66, "column": 51 }, "end": { - "line": 50, + "line": 66, "column": 59 } } @@ -6866,11 +6959,11 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 49 }, "end": { - "line": 50, + "line": 66, "column": 61 } } @@ -6878,11 +6971,11 @@ "kind": "init", "loc": { "start": { - "line": 50, + "line": 66, "column": 46 }, "end": { - "line": 50, + "line": 66, "column": 61 } } @@ -6890,33 +6983,33 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 24 }, "end": { - "line": 50, + "line": 66, "column": 63 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 1 }, "end": { - "line": 50, + "line": 66, "column": 64 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 1 }, "end": { - "line": 50, + "line": 66, "column": 65 } } @@ -6933,11 +7026,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 12 }, "end": { - "line": 52, + "line": 68, "column": 18 } } @@ -6945,11 +7038,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 5 }, "end": { - "line": 52, + "line": 68, "column": 10 } } @@ -6957,11 +7050,11 @@ "init": null, "loc": { "start": { - "line": 52, + "line": 68, "column": 5 }, "end": { - "line": 52, + "line": 68, "column": 10 } } @@ -6970,11 +7063,11 @@ "kind": "var", "loc": { "start": { - "line": 52, + "line": 68, "column": 1 }, "end": { - "line": 52, + "line": 68, "column": 19 } } @@ -6995,22 +7088,22 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 12 }, "end": { - "line": 53, + "line": 69, "column": 22 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 12 }, "end": { - "line": 53, + "line": 69, "column": 22 } } @@ -7018,11 +7111,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 5 }, "end": { - "line": 53, + "line": 69, "column": 10 } } @@ -7030,11 +7123,11 @@ "init": null, "loc": { "start": { - "line": 53, + "line": 69, "column": 5 }, "end": { - "line": 53, + "line": 69, "column": 10 } } @@ -7043,11 +7136,11 @@ "kind": "var", "loc": { "start": { - "line": 53, + "line": 69, "column": 1 }, "end": { - "line": 53, + "line": 69, "column": 23 } } @@ -7068,11 +7161,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 10 } } @@ -7081,22 +7174,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 55, + "line": 71, "column": 12 }, "end": { - "line": 55, + "line": 71, "column": 18 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 5 }, "end": { - "line": 55, + "line": 71, "column": 19 } } @@ -7112,11 +7205,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 5 }, "end": { - "line": 56, + "line": 72, "column": 10 } } @@ -7125,22 +7218,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 56, + "line": 72, "column": 12 }, "end": { - "line": 56, + "line": 72, "column": 18 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 5 }, "end": { - "line": 56, + "line": 72, "column": 19 } } @@ -7148,11 +7241,11 @@ ], "loc": { "start": { - "line": 54, + "line": 70, "column": 22 }, "end": { - "line": 57, + "line": 73, "column": 2 } } @@ -7163,11 +7256,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 11 }, "end": { - "line": 54, + "line": 70, "column": 21 } } @@ -7175,11 +7268,11 @@ "extends": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 2 } } @@ -7203,11 +7296,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 4 }, "end": { - "line": 59, + "line": 75, "column": 9 } } @@ -7218,11 +7311,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 4 }, "end": { - "line": 59, + "line": 75, "column": 9 } } @@ -7230,11 +7323,11 @@ "kind": "init", "loc": { "start": { - "line": 59, + "line": 75, "column": 4 }, "end": { - "line": 59, + "line": 75, "column": 9 } } @@ -7247,22 +7340,22 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 14 }, "end": { - "line": 59, + "line": 75, "column": 19 } } }, "loc": { "start": { - "line": 59, + "line": 75, "column": 11 }, "end": { - "line": 59, + "line": 75, "column": 19 } } @@ -7270,11 +7363,11 @@ ], "loc": { "start": { - "line": 59, + "line": 75, "column": 2 }, "end": { - "line": 59, + "line": 75, "column": 21 } } @@ -7285,33 +7378,33 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 24 }, "end": { - "line": 59, + "line": 75, "column": 29 } } }, "loc": { "start": { - "line": 59, + "line": 75, "column": 1 }, "end": { - "line": 59, + "line": 75, "column": 30 } } }, "loc": { "start": { - "line": 59, + "line": 75, "column": 1 }, "end": { - "line": 59, + "line": 75, "column": 31 } } @@ -7335,11 +7428,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 4 }, "end": { - "line": 60, + "line": 76, "column": 9 } } @@ -7350,11 +7443,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 4 }, "end": { - "line": 60, + "line": 76, "column": 9 } } @@ -7362,11 +7455,11 @@ "kind": "init", "loc": { "start": { - "line": 60, + "line": 76, "column": 4 }, "end": { - "line": 60, + "line": 76, "column": 9 } } @@ -7382,11 +7475,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 11 }, "end": { - "line": 60, + "line": 76, "column": 16 } } @@ -7397,11 +7490,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 11 }, "end": { - "line": 60, + "line": 76, "column": 16 } } @@ -7409,11 +7502,11 @@ "kind": "init", "loc": { "start": { - "line": 60, + "line": 76, "column": 11 }, "end": { - "line": 60, + "line": 76, "column": 16 } } @@ -7421,11 +7514,11 @@ ], "loc": { "start": { - "line": 60, + "line": 76, "column": 2 }, "end": { - "line": 60, + "line": 76, "column": 18 } } @@ -7436,33 +7529,33 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 21 }, "end": { - "line": 60, + "line": 76, "column": 26 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 1 }, "end": { - "line": 60, + "line": 76, "column": 27 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 1 }, "end": { - "line": 60, + "line": 76, "column": 28 } } @@ -7479,11 +7572,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 62, + "line": 78, "column": 12 }, "end": { - "line": 62, + "line": 78, "column": 18 } } @@ -7491,11 +7584,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 5 }, "end": { - "line": 62, + "line": 78, "column": 10 } } @@ -7503,11 +7596,11 @@ "init": null, "loc": { "start": { - "line": 62, + "line": 78, "column": 5 }, "end": { - "line": 62, + "line": 78, "column": 10 } } @@ -7516,11 +7609,11 @@ "kind": "var", "loc": { "start": { - "line": 62, + "line": 78, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 19 } } @@ -7537,11 +7630,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 63, + "line": 79, "column": 12 }, "end": { - "line": 63, + "line": 79, "column": 18 } } @@ -7549,11 +7642,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 10 } } @@ -7561,11 +7654,11 @@ "init": null, "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 10 } } @@ -7574,11 +7667,11 @@ "kind": "var", "loc": { "start": { - "line": 63, + "line": 79, "column": 1 }, "end": { - "line": 63, + "line": 79, "column": 19 } } @@ -7595,11 +7688,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 64, + "line": 80, "column": 12 }, "end": { - "line": 64, + "line": 80, "column": 19 } } @@ -7607,11 +7700,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 5 }, "end": { - "line": 64, + "line": 80, "column": 10 } } @@ -7619,11 +7712,11 @@ "init": null, "loc": { "start": { - "line": 64, + "line": 80, "column": 5 }, "end": { - "line": 64, + "line": 80, "column": 10 } } @@ -7632,11 +7725,11 @@ "kind": "var", "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 64, + "line": 80, "column": 20 } } @@ -7653,11 +7746,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 65, + "line": 81, "column": 12 }, "end": { - "line": 65, + "line": 81, "column": 15 } } @@ -7665,11 +7758,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 5 }, "end": { - "line": 65, + "line": 81, "column": 10 } } @@ -7677,11 +7770,11 @@ "init": null, "loc": { "start": { - "line": 65, + "line": 81, "column": 5 }, "end": { - "line": 65, + "line": 81, "column": 10 } } @@ -7690,11 +7783,11 @@ "kind": "var", "loc": { "start": { - "line": 65, + "line": 81, "column": 1 }, "end": { - "line": 65, + "line": 81, "column": 16 } } @@ -7718,11 +7811,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 4 }, "end": { - "line": 67, + "line": 83, "column": 9 } } @@ -7738,11 +7831,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 12 }, "end": { - "line": 67, + "line": 83, "column": 17 } } @@ -7752,22 +7845,22 @@ "value": true, "loc": { "start": { - "line": 67, + "line": 83, "column": 20 }, "end": { - "line": 67, + "line": 83, "column": 24 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 12 }, "end": { - "line": 67, + "line": 83, "column": 24 } } @@ -7781,11 +7874,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 27 }, "end": { - "line": 67, + "line": 83, "column": 32 } } @@ -7798,11 +7891,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 34 }, "end": { - "line": 67, + "line": 83, "column": 39 } } @@ -7812,22 +7905,22 @@ "value": 8, "loc": { "start": { - "line": 67, + "line": 83, "column": 42 }, "end": { - "line": 67, + "line": 83, "column": 43 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 34 }, "end": { - "line": 67, + "line": 83, "column": 43 } } @@ -7835,11 +7928,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 26 }, "end": { - "line": 67, + "line": 83, "column": 44 } } @@ -7847,11 +7940,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 11 }, "end": { - "line": 67, + "line": 83, "column": 45 } } @@ -7859,11 +7952,11 @@ "kind": "init", "loc": { "start": { - "line": 67, + "line": 83, "column": 4 }, "end": { - "line": 67, + "line": 83, "column": 45 } } @@ -7871,11 +7964,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 2 }, "end": { - "line": 67, + "line": 83, "column": 47 } } @@ -7894,11 +7987,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 52 }, "end": { - "line": 67, + "line": 83, "column": 57 } } @@ -7911,11 +8004,11 @@ "value": false, "loc": { "start": { - "line": 67, + "line": 83, "column": 60 }, "end": { - "line": 67, + "line": 83, "column": 65 } } @@ -7925,14 +8018,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 67, + "line": 83, "column": 68 }, "end": { - "line": 67, + "line": 83, "column": 73 } } @@ -7940,11 +8033,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 67 }, "end": { - "line": 67, + "line": 83, "column": 74 } } @@ -7952,11 +8045,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 59 }, "end": { - "line": 67, + "line": 83, "column": 75 } } @@ -7964,11 +8057,11 @@ "kind": "init", "loc": { "start": { - "line": 67, + "line": 83, "column": 52 }, "end": { - "line": 67, + "line": 83, "column": 75 } } @@ -7976,33 +8069,33 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 50 }, "end": { - "line": 67, + "line": 83, "column": 77 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 1 }, "end": { - "line": 67, + "line": 83, "column": 78 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 1 }, "end": { - "line": 67, + "line": 83, "column": 78 } } @@ -8019,11 +8112,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 69, + "line": 85, "column": 12 }, "end": { - "line": 69, + "line": 85, "column": 18 } } @@ -8031,11 +8124,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 69, + "line": 85, "column": 10 } } @@ -8043,11 +8136,11 @@ "init": null, "loc": { "start": { - "line": 69, + "line": 85, "column": 5 }, "end": { - "line": 69, + "line": 85, "column": 10 } } @@ -8056,11 +8149,11 @@ "kind": "var", "loc": { "start": { - "line": 69, + "line": 85, "column": 1 }, "end": { - "line": 69, + "line": 85, "column": 19 } } @@ -8077,11 +8170,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 70, + "line": 86, "column": 12 }, "end": { - "line": 70, + "line": 86, "column": 18 } } @@ -8089,11 +8182,11 @@ "decorators": [], "loc": { "start": { - "line": 70, + "line": 86, "column": 5 }, "end": { - "line": 70, + "line": 86, "column": 10 } } @@ -8101,11 +8194,11 @@ "init": null, "loc": { "start": { - "line": 70, + "line": 86, "column": 5 }, "end": { - "line": 70, + "line": 86, "column": 10 } } @@ -8114,11 +8207,11 @@ "kind": "var", "loc": { "start": { - "line": 70, + "line": 86, "column": 1 }, "end": { - "line": 70, + "line": 86, "column": 19 } } @@ -8134,11 +8227,11 @@ "decorators": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 5 }, "end": { - "line": 71, + "line": 87, "column": 10 } } @@ -8148,22 +8241,22 @@ "properties": [], "loc": { "start": { - "line": 71, + "line": 87, "column": 13 }, "end": { - "line": 71, + "line": 87, "column": 15 } } }, "loc": { "start": { - "line": 71, + "line": 87, "column": 5 }, "end": { - "line": 71, + "line": 87, "column": 15 } } @@ -8172,11 +8265,11 @@ "kind": "var", "loc": { "start": { - "line": 71, + "line": 87, "column": 1 }, "end": { - "line": 71, + "line": 87, "column": 16 } } @@ -8200,11 +8293,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 4 }, "end": { - "line": 73, + "line": 89, "column": 9 } } @@ -8225,11 +8318,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 13 }, "end": { - "line": 73, + "line": 89, "column": 18 } } @@ -8242,36 +8335,36 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 13 }, "end": { - "line": 73, + "line": 89, "column": 18 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 73, + "line": 89, "column": 21 }, "end": { - "line": 73, + "line": 89, "column": 26 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 13 }, "end": { - "line": 73, + "line": 89, "column": 26 } } @@ -8279,11 +8372,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 13 }, "end": { - "line": 73, + "line": 89, "column": 26 } } @@ -8299,11 +8392,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 28 }, "end": { - "line": 73, + "line": 89, "column": 33 } } @@ -8314,11 +8407,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 28 }, "end": { - "line": 73, + "line": 89, "column": 33 } } @@ -8326,11 +8419,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 28 }, "end": { - "line": 73, + "line": 89, "column": 33 } } @@ -8338,11 +8431,11 @@ ], "loc": { "start": { - "line": 73, + "line": 89, "column": 11 }, "end": { - "line": 73, + "line": 89, "column": 35 } } @@ -8361,11 +8454,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 40 }, "end": { - "line": 73, + "line": 89, "column": 45 } } @@ -8375,11 +8468,11 @@ "value": 9, "loc": { "start": { - "line": 73, + "line": 89, "column": 47 }, "end": { - "line": 73, + "line": 89, "column": 48 } } @@ -8387,11 +8480,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 40 }, "end": { - "line": 73, + "line": 89, "column": 48 } } @@ -8399,22 +8492,22 @@ ], "loc": { "start": { - "line": 73, + "line": 89, "column": 38 }, "end": { - "line": 73, + "line": 89, "column": 50 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 11 }, "end": { - "line": 73, + "line": 89, "column": 50 } } @@ -8422,11 +8515,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 4 }, "end": { - "line": 73, + "line": 89, "column": 50 } } @@ -8434,11 +8527,11 @@ ], "loc": { "start": { - "line": 73, + "line": 89, "column": 2 }, "end": { - "line": 73, + "line": 89, "column": 52 } } @@ -8457,11 +8550,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 57 }, "end": { - "line": 73, + "line": 89, "column": 62 } } @@ -8480,11 +8573,11 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 66 }, "end": { - "line": 73, + "line": 89, "column": 71 } } @@ -8494,11 +8587,11 @@ "value": 10, "loc": { "start": { - "line": 73, + "line": 89, "column": 73 }, "end": { - "line": 73, + "line": 89, "column": 75 } } @@ -8506,11 +8599,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 66 }, "end": { - "line": 73, + "line": 89, "column": 75 } } @@ -8526,25 +8619,25 @@ "decorators": [], "loc": { "start": { - "line": 73, + "line": 89, "column": 77 }, "end": { - "line": 73, + "line": 89, "column": 82 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 73, + "line": 89, "column": 84 }, "end": { - "line": 73, + "line": 89, "column": 89 } } @@ -8552,11 +8645,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 77 }, "end": { - "line": 73, + "line": 89, "column": 89 } } @@ -8564,11 +8657,11 @@ ], "loc": { "start": { - "line": 73, + "line": 89, "column": 64 }, "end": { - "line": 73, + "line": 89, "column": 91 } } @@ -8576,11 +8669,11 @@ "kind": "init", "loc": { "start": { - "line": 73, + "line": 89, "column": 57 }, "end": { - "line": 73, + "line": 89, "column": 91 } } @@ -8588,33 +8681,33 @@ ], "loc": { "start": { - "line": 73, + "line": 89, "column": 55 }, "end": { - "line": 73, + "line": 89, "column": 93 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 1 }, "end": { - "line": 73, + "line": 89, "column": 94 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 1 }, "end": { - "line": 73, + "line": 89, "column": 95 } } @@ -8626,8 +8719,8 @@ "column": 1 }, "end": { - "line": 73, - "column": 95 + "line": 90, + "column": 1 } } } diff --git a/es2panda/test/compiler/ts/objectDestructuring.ts b/es2panda/test/compiler/ts/objectDestructuring.ts index 2bf509ab671f7618d67b72f17b9d1a2d5522faa1..f2ac649a9918526813f8a57390c037ca48e48018 100644 --- a/es2panda/test/compiler/ts/objectDestructuring.ts +++ b/es2panda/test/compiler/ts/objectDestructuring.ts @@ -29,7 +29,7 @@ var6 = "baz"; var7 = false; var7 = "baz"; -var { prop: { prop: [var8 = 1, var9 = {}] } = { prop: ["foo", true] } } = { prop: { prop: [1, 2, 3] } }; +var { prop: { prop: [var8 = 1, var9 = { a: 3, b: "bar" }] } = { prop: ["foo", true] } } = { prop: { prop: [1, 2, 3] } }; var8 = var6; var9 = 1; var9 = { a: 1, b: "foo" }; @@ -86,4 +86,4 @@ var var28: number; var var29: string; var var30 = {}; -({ var30: { var29 = "foo", var28 } = { var28: 9 } } = { var30: { var28: 10, var29: "bar" } }); \ No newline at end of file +({ var30: { var29 = "foo", var28 } = { var28: 9 } } = { var30: { var28: 10, var29: "bar" } }); diff --git a/es2panda/test/compiler/ts/objectDestructuring1-expected.txt b/es2panda/test/compiler/ts/objectDestructuring1-expected.txt index b532c3d276b1bb794aaedb7ac3412ada9788b701..b7d581615d9d4dcada217b0bed90a93f481b5f68 100644 --- a/es2panda/test/compiler/ts/objectDestructuring1-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring1-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -47,11 +47,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -73,22 +73,22 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -97,11 +97,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -113,9 +113,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [objectDestructuring1.ts:1:7] +TypeError: Property a does not exist on type { }. [objectDestructuring1.ts:17:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring10-expected.txt b/es2panda/test/compiler/ts/objectDestructuring10-expected.txt index 3e971c0553d023a8edc4252143b0c52cb139adf6..fc223343ba420e822f44898b6fd34726d805d837 100644 --- a/es2panda/test/compiler/ts/objectDestructuring10-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring10-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -45,11 +45,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -60,11 +60,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -72,11 +72,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -92,11 +92,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -107,11 +107,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -119,11 +119,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -131,11 +131,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -168,11 +168,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -180,11 +180,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -200,11 +200,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -214,11 +214,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -226,11 +226,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -238,22 +238,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 38 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -261,11 +261,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -273,11 +273,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -296,11 +296,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -310,11 +310,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -322,11 +322,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -334,22 +334,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 51 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -358,11 +358,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -374,9 +374,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 51 } } } -TypeError: Property 'a' does not exist on type '{ a: number; b: boolean; } | number [objectDestructuring10.ts:1:12] +TypeError: Property a does not exist on type number | { a: number; b: boolean; }. [objectDestructuring10.ts:17:10] diff --git a/es2panda/test/compiler/ts/objectDestructuring11-expected.txt b/es2panda/test/compiler/ts/objectDestructuring11-expected.txt index e5b07d4bd1b69bdfc11f2d143189822658d356dc..ce4c09828774aebb6b92c82352a659e1df88ddac 100644 --- a/es2panda/test/compiler/ts/objectDestructuring11-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring11-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -45,11 +45,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -60,11 +60,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -72,11 +72,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -92,11 +92,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -107,11 +107,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -119,11 +119,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -131,11 +131,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -154,25 +154,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -180,11 +180,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -192,22 +192,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -215,11 +215,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -227,11 +227,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -250,11 +250,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -273,11 +273,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -287,11 +287,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -299,11 +299,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -311,11 +311,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -323,11 +323,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -335,22 +335,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 56 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -359,11 +359,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -375,9 +375,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 57 } } } -TypeError: Property 'a' does not exist on type '{ b: string; } | { b: boolean; } [objectDestructuring11.ts:1:12] +TypeError: Property a does not exist on type { b: boolean; } | { b: string; }. [objectDestructuring11.ts:17:10] diff --git a/es2panda/test/compiler/ts/objectDestructuring12-expected.txt b/es2panda/test/compiler/ts/objectDestructuring12-expected.txt index e4ce952594bc15ff23d9b5366dda7361ee7b7148..670601464853ba303ef5cea0ec2c6ef68f6f3164 100644 --- a/es2panda/test/compiler/ts/objectDestructuring12-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring12-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -45,11 +45,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -62,37 +62,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } }, "right": { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 18 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -100,11 +99,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -120,11 +119,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -135,11 +134,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -147,11 +146,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -159,11 +158,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -182,25 +181,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -208,11 +207,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -220,22 +219,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 38 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -243,11 +242,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -255,11 +254,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -278,11 +277,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -301,11 +300,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 50 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -315,11 +314,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -327,11 +326,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 50 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -347,11 +346,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -361,11 +360,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -373,11 +372,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -385,11 +384,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -397,11 +396,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -409,22 +408,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 67 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -433,11 +432,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -453,11 +452,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -467,33 +466,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -505,9 +504,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'number | bigint'. [objectDestructuring12.ts:2:1] +TypeError: Type '{ }' is not assignable to type 'number | bigint'. [objectDestructuring12.ts:18:1] diff --git a/es2panda/test/compiler/ts/objectDestructuring13-expected.txt b/es2panda/test/compiler/ts/objectDestructuring13-expected.txt index 025754ba136bd0aa73a97f4837895b0698f25f11..eb40248267cdd1bb71e03030460e0571d45346c0 100644 --- a/es2panda/test/compiler/ts/objectDestructuring13-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring13-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -47,11 +47,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -64,22 +64,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -87,11 +87,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -110,11 +110,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -124,11 +124,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -136,11 +136,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -156,26 +156,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "value": { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -183,11 +182,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -203,11 +202,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -226,11 +225,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -240,11 +239,11 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -252,11 +251,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -272,11 +271,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -286,11 +285,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -298,11 +297,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -310,11 +309,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -322,11 +321,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -334,22 +333,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 57 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -358,11 +357,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -378,11 +377,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -392,33 +391,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -430,9 +429,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type '{ b: bigint; c: { a: { }; b: boolean; }; }'. [objectDestructuring13.ts:2:1] +TypeError: Type '{ }' is not assignable to type '{ b: bigint; c: { a: { }; b: boolean; }; }'. [objectDestructuring13.ts:18:1] diff --git a/es2panda/test/compiler/ts/objectDestructuring14-expected.txt b/es2panda/test/compiler/ts/objectDestructuring14-expected.txt index 0fe59e893e872c476b317b51d4a26c6ef9020056..55d49295e52c1bcaf4d24c134f1b7a1d47b5044f 100644 --- a/es2panda/test/compiler/ts/objectDestructuring14-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring14-expected.txt @@ -13,11 +13,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -75,22 +75,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -98,11 +98,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -112,22 +112,22 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -171,33 +171,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -209,9 +209,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type 'void' is not assignable to type '{ }'. [objectDestructuring14.ts:3:1] +TypeError: Type 'void' is not assignable to type '{ }'. [objectDestructuring14.ts:19:1] diff --git a/es2panda/test/compiler/ts/objectDestructuring15-expected.txt b/es2panda/test/compiler/ts/objectDestructuring15-expected.txt index f4c2d9a4e54eba0517a90f32dff61a963e052434..ead23ae28836b7808fdd4409bfe9639d4f3d4aad 100644 --- a/es2panda/test/compiler/ts/objectDestructuring15-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring15-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -37,36 +37,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -74,11 +74,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -94,11 +94,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -109,11 +109,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -121,11 +121,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -145,11 +145,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -158,22 +158,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -181,22 +181,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -215,11 +215,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -229,11 +229,11 @@ "value": 12, "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -241,11 +241,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -253,22 +253,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 48 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -277,11 +277,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -293,9 +293,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 49 } } } -TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring15.ts:1:7] +TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring15.ts:17:7] diff --git a/es2panda/test/compiler/ts/objectDestructuring16-expected.txt b/es2panda/test/compiler/ts/objectDestructuring16-expected.txt index a98420ec877fa945b9df7623d8276b01877d11a7..0686bd76bb286d70b8c4e865fcee64361310a236 100644 --- a/es2panda/test/compiler/ts/objectDestructuring16-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring16-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -37,36 +37,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -74,11 +74,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -94,11 +94,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -109,11 +109,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -121,11 +121,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -145,11 +145,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -161,11 +161,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -174,11 +174,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -186,22 +186,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -217,11 +217,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -230,22 +230,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 54 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -253,22 +253,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 56 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -287,11 +287,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -301,11 +301,11 @@ "value": 12, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -313,11 +313,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -325,22 +325,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 68 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -349,11 +349,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 69 } } @@ -365,9 +365,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 69 } } } -TypeError: Type '{ a: number; }' is not assignable to type '{ a: number | string; b: number; }'. [objectDestructuring16.ts:1:5] +TypeError: Type '{ a: 12; }' is not assignable to type '{ a: number | string; b: number; }'. [objectDestructuring16.ts:17:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring17-expected.txt b/es2panda/test/compiler/ts/objectDestructuring17-expected.txt index 3cbed746605e26df580db93227c916499d051567..9213ee5384aa29ede81d3c1eb4f2ab194e5a7e45 100644 --- a/es2panda/test/compiler/ts/objectDestructuring17-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring17-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -37,36 +37,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -74,11 +74,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -94,11 +94,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -109,11 +109,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -121,11 +121,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -145,11 +145,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -161,11 +161,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -174,11 +174,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -186,22 +186,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -217,11 +217,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -230,22 +230,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 54 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -253,22 +253,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 56 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -287,11 +287,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -301,11 +301,11 @@ "value": 12, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -313,11 +313,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 68 }, "end": { - "line": 1, + "line": 17, "column": 69 } } @@ -347,11 +347,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 71 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -359,11 +359,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 68 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -371,22 +371,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 77 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -395,11 +395,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -411,9 +411,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 78 } } } -TypeError: Type 'boolean' is not assignable to type 'number'. [objectDestructuring17.ts:1:68] +TypeError: Type 'boolean' is not assignable to type 'number'. [objectDestructuring17.ts:17:68] diff --git a/es2panda/test/compiler/ts/objectDestructuring18-expected.txt b/es2panda/test/compiler/ts/objectDestructuring18-expected.txt index 647af818cf712acd5b5e03083d6bdf05464113b3..3558befac6744e5c4d51fe14ae7a0b4ccada598d 100644 --- a/es2panda/test/compiler/ts/objectDestructuring18-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring18-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -47,11 +47,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -94,11 +94,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -121,11 +121,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -134,22 +134,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -165,11 +165,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -178,22 +178,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -201,11 +201,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -237,22 +237,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 53 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -260,11 +260,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -272,22 +272,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 55 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -306,25 +306,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 61 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 63 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -332,11 +332,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -344,22 +344,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 58 }, "end": { - "line": 1, + "line": 17, "column": 70 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -368,11 +368,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -384,9 +384,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 71 } } } -TypeError: Property 'b' does not exist on type '{ a: number; b: string; } | { a: string; } [objectDestructuring18.ts:1:10] +TypeError: Property b does not exist on type { a: number; b: string; } | { a: string; }. [objectDestructuring18.ts:17:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring19-expected.txt b/es2panda/test/compiler/ts/objectDestructuring19-expected.txt index 21d791f98874d5750a4f494052edb43ede189ab7..7fbc7811ff53314cf9cd8df722f9d62d414049c0 100644 --- a/es2panda/test/compiler/ts/objectDestructuring19-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring19-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -47,11 +47,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -74,11 +74,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -87,22 +87,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -110,11 +110,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -133,11 +133,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -146,22 +146,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 39 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -177,11 +177,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -190,22 +190,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -221,11 +221,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -244,11 +244,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 57 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -257,22 +257,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 66 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 57 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -288,11 +288,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 68 }, "end": { - "line": 1, + "line": 17, "column": 69 } } @@ -301,22 +301,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 71 }, "end": { - "line": 1, + "line": 17, "column": 78 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 68 }, "end": { - "line": 1, + "line": 17, "column": 80 } } @@ -324,22 +324,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 55 }, "end": { - "line": 1, + "line": 17, "column": 80 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -347,11 +347,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -360,11 +360,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 85 }, "end": { - "line": 1, + "line": 17, "column": 91 } } @@ -372,22 +372,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 91 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -406,11 +406,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 96 }, "end": { - "line": 1, + "line": 17, "column": 97 } } @@ -420,11 +420,11 @@ "value": 12, "loc": { "start": { - "line": 1, + "line": 17, "column": 99 }, "end": { - "line": 1, + "line": 17, "column": 101 } } @@ -432,11 +432,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 96 }, "end": { - "line": 1, + "line": 17, "column": 101 } } @@ -444,22 +444,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 94 }, "end": { - "line": 1, + "line": 17, "column": 103 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 103 } } @@ -468,11 +468,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 104 } } @@ -484,9 +484,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 104 } } } -TypeError: Property 'a' does not exist on type '{ a: number; } | { a: number; b: string; c: { a: number; b: boolean; }; } | number [objectDestructuring19.ts:1:7] +TypeError: Property a does not exist on type { a: number; } | { a: number; b: string; c: { a: number; b: boolean; }; } | number. [objectDestructuring19.ts:17:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring2-expected.txt b/es2panda/test/compiler/ts/objectDestructuring2-expected.txt index 3afeb1705435cf564c0e9aa58e033de6db13e663..15376188fa602a5e6b993ee5345cbaf336238e93 100644 --- a/es2panda/test/compiler/ts/objectDestructuring2-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring2-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -47,11 +47,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -82,25 +82,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -108,11 +108,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -142,11 +142,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -154,11 +154,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -166,22 +166,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 31 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -190,11 +190,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -206,9 +206,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 32 } } } -TypeError: Object literal may only specify known properties, and 'b' does not exist in type '{ a: any; }'. [objectDestructuring2.ts:1:25] +TypeError: Object literal may only specify known properties, and property 'b' does not exist in the pattern. [objectDestructuring2.ts:17:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring20-expected.txt b/es2panda/test/compiler/ts/objectDestructuring20-expected.txt index f491b5db81903fc5e665c89821f07cb347e3f7f6..5d925d7af2c6a79c5cb1ce93973ff720963a5bce 100644 --- a/es2panda/test/compiler/ts/objectDestructuring20-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring20-expected.txt @@ -13,11 +13,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -78,11 +78,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -93,11 +93,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -105,11 +105,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -122,22 +122,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -160,11 +160,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -173,22 +173,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -196,11 +196,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -219,11 +219,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 36 }, "end": { - "line": 2, + "line": 18, "column": 37 } } @@ -232,22 +232,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 39 }, "end": { - "line": 2, + "line": 18, "column": 45 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 36 }, "end": { - "line": 2, + "line": 18, "column": 46 } } @@ -263,11 +263,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 47 }, "end": { - "line": 2, + "line": 18, "column": 48 } } @@ -276,22 +276,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 50 }, "end": { - "line": 2, + "line": 18, "column": 56 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 47 }, "end": { - "line": 2, + "line": 18, "column": 57 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 58 }, "end": { - "line": 2, + "line": 18, "column": 59 } } @@ -330,11 +330,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 63 }, "end": { - "line": 2, + "line": 18, "column": 64 } } @@ -343,22 +343,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 66 }, "end": { - "line": 2, + "line": 18, "column": 72 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 63 }, "end": { - "line": 2, + "line": 18, "column": 73 } } @@ -374,11 +374,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 74 }, "end": { - "line": 2, + "line": 18, "column": 75 } } @@ -387,22 +387,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 77 }, "end": { - "line": 2, + "line": 18, "column": 84 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 74 }, "end": { - "line": 2, + "line": 18, "column": 86 } } @@ -410,22 +410,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 61 }, "end": { - "line": 2, + "line": 18, "column": 86 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 58 }, "end": { - "line": 2, + "line": 18, "column": 88 } } @@ -433,11 +433,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 34 }, "end": { - "line": 2, + "line": 18, "column": 88 } } @@ -456,11 +456,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 93 }, "end": { - "line": 2, + "line": 18, "column": 94 } } @@ -469,22 +469,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 96 }, "end": { - "line": 2, + "line": 18, "column": 102 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 93 }, "end": { - "line": 2, + "line": 18, "column": 103 } } @@ -500,11 +500,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 104 }, "end": { - "line": 2, + "line": 18, "column": 105 } } @@ -513,22 +513,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 107 }, "end": { - "line": 2, + "line": 18, "column": 114 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 104 }, "end": { - "line": 2, + "line": 18, "column": 116 } } @@ -536,11 +536,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 91 }, "end": { - "line": 2, + "line": 18, "column": 116 } } @@ -548,22 +548,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 116 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -582,11 +582,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 121 }, "end": { - "line": 2, + "line": 18, "column": 122 } } @@ -596,11 +596,11 @@ "value": 12, "loc": { "start": { - "line": 2, + "line": 18, "column": 124 }, "end": { - "line": 2, + "line": 18, "column": 126 } } @@ -608,11 +608,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 121 }, "end": { - "line": 2, + "line": 18, "column": 126 } } @@ -620,22 +620,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 119 }, "end": { - "line": 2, + "line": 18, "column": 128 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 128 } } @@ -644,11 +644,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 129 } } @@ -664,11 +664,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -679,33 +679,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -717,9 +717,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type 'void' is not assignable to type '{ } | { b: string; c: { a: number; b: boolean; }; } | { r: boolean; }'. [objectDestructuring20.ts:3:1] +TypeError: Type 'void' is not assignable to type '{ } | { b: string; c: { a: number; b: boolean; }; } | { r: boolean; }'. [objectDestructuring20.ts:19:1] diff --git a/es2panda/test/compiler/ts/objectDestructuring21-expected.txt b/es2panda/test/compiler/ts/objectDestructuring21-expected.txt index ea6f164050fcd98c7920b4b1685f1139246ac33e..02ef413ddad723fa2d1a5381e3dc04d2efeaf990 100644 --- a/es2panda/test/compiler/ts/objectDestructuring21-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring21-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -80,22 +80,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -103,11 +103,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -115,11 +115,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -127,11 +127,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -140,11 +140,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -183,11 +183,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -195,11 +195,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -207,11 +207,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -222,22 +222,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -246,11 +246,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -266,11 +266,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -280,33 +280,33 @@ "properties": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -318,9 +318,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'string'. [objectDestructuring21.ts:3:1] +TypeError: Type '{ }' is not assignable to type 'string'. [objectDestructuring21.ts:19:1] diff --git a/es2panda/test/compiler/ts/objectDestructuring22-expected.txt b/es2panda/test/compiler/ts/objectDestructuring22-expected.txt index cf30baf97d351d08739d10f297ccfa20bb6f183b..a772451dee4f5392a20871c44203f896d5de4f60 100644 --- a/es2panda/test/compiler/ts/objectDestructuring22-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring22-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -49,11 +49,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -62,22 +62,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -93,11 +93,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -106,22 +106,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -129,22 +129,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -152,11 +152,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -165,11 +165,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -177,11 +177,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -189,11 +189,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -201,11 +201,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -214,11 +214,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -242,11 +242,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -265,11 +265,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -280,11 +280,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -292,11 +292,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -312,11 +312,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -327,11 +327,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -339,11 +339,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -351,11 +351,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -363,11 +363,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -375,11 +375,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -390,22 +390,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -414,11 +414,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -430,9 +430,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 25 } } } -TypeError: Property 'a' does not exist on type '{ a: { b: string; c: number; }; } | number [objectDestructuring22.ts:2:7] +TypeError: Property a does not exist on type { a: { b: string; c: number; }; } | number. [objectDestructuring22.ts:18:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring23-expected.txt b/es2panda/test/compiler/ts/objectDestructuring23-expected.txt index 554707d24ecbf339872b7cd84f350d273a3baf77..571f0454aa6c7dbd9d0a4cb66508091ce056f0d8 100644 --- a/es2panda/test/compiler/ts/objectDestructuring23-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring23-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -46,11 +46,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -62,11 +62,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -75,11 +75,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -87,22 +87,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 34 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -110,22 +110,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -133,11 +133,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -145,11 +145,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -157,11 +157,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -170,11 +170,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -198,11 +198,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -221,11 +221,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -239,11 +239,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -254,11 +254,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -266,11 +266,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -278,11 +278,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -290,11 +290,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -302,11 +302,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -314,11 +314,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -329,22 +329,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -353,11 +353,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -369,9 +369,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '{ b: { c: [number, number]; }; }', but here has type 'number'. [objectDestructuring23.ts:2:16] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '{ b: { c: [number, number]; }; }', but here has type 'number'. [objectDestructuring23.ts:18:16] diff --git a/es2panda/test/compiler/ts/objectDestructuring24-expected.txt b/es2panda/test/compiler/ts/objectDestructuring24-expected.txt index 8b473e13622db264af707b78425c1aaabc3fbbee..927c614e6857825bdc5bd78c0c989ef46c45a18d 100644 --- a/es2panda/test/compiler/ts/objectDestructuring24-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring24-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -90,11 +90,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -109,11 +109,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -122,11 +122,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -134,11 +134,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -149,22 +149,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 54 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -172,22 +172,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 57 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -195,22 +195,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -218,11 +218,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -230,11 +230,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -242,11 +242,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -255,11 +255,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -283,11 +283,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -298,11 +298,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -310,11 +310,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -330,11 +330,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -353,11 +353,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -371,11 +371,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -386,11 +386,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -398,11 +398,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -410,11 +410,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -422,11 +422,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -434,11 +434,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -446,11 +446,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -461,22 +461,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 32 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -485,11 +485,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -505,11 +505,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -519,33 +519,33 @@ "properties": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -557,9 +557,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'string | number'. [objectDestructuring24.ts:3:1] +TypeError: Type '{ }' is not assignable to type 'string | number'. [objectDestructuring24.ts:19:1] diff --git a/es2panda/test/compiler/ts/objectDestructuring25-expected.txt b/es2panda/test/compiler/ts/objectDestructuring25-expected.txt index fa77347379dd5eb07e1fbfbbe8c62cbef49346a0..6d2874ba302342d728736f74901b0b4939c1739a 100644 --- a/es2panda/test/compiler/ts/objectDestructuring25-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring25-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -33,22 +33,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -56,11 +56,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -80,11 +80,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -93,22 +93,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -124,11 +124,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -140,11 +140,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 50 } } @@ -153,11 +153,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -165,22 +165,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 58 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 60 } } @@ -188,11 +188,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 60 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -230,11 +230,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -242,11 +242,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -262,11 +262,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -279,25 +279,25 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 25 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 27 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -305,11 +305,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -317,11 +317,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -329,22 +329,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 35 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 36 } } @@ -352,33 +352,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -402,11 +402,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -419,36 +419,36 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 16 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 16 } } @@ -456,11 +456,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 16 } } @@ -476,11 +476,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 5, + "line": 21, "column": 19 } } @@ -494,11 +494,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 22 }, "end": { - "line": 5, + "line": 21, "column": 23 } } @@ -509,11 +509,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 25 }, "end": { - "line": 5, + "line": 21, "column": 26 } } @@ -521,11 +521,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 21 }, "end": { - "line": 5, + "line": 21, "column": 27 } } @@ -533,11 +533,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 5, + "line": 21, "column": 27 } } @@ -545,11 +545,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 29 } } @@ -562,11 +562,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 32 }, "end": { - "line": 5, + "line": 21, "column": 33 } } @@ -580,11 +580,11 @@ "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 35 }, "end": { - "line": 5, + "line": 21, "column": 36 } } @@ -594,11 +594,11 @@ "value": 2, "loc": { "start": { - "line": 5, + "line": 21, "column": 38 }, "end": { - "line": 5, + "line": 21, "column": 39 } } @@ -608,11 +608,11 @@ "value": 3, "loc": { "start": { - "line": 5, + "line": 21, "column": 41 }, "end": { - "line": 5, + "line": 21, "column": 42 } } @@ -620,11 +620,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 34 }, "end": { - "line": 5, + "line": 21, "column": 43 } } @@ -633,22 +633,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 32 }, "end": { - "line": 5, + "line": 21, "column": 44 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 44 } } @@ -657,11 +657,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 45 } } @@ -677,11 +677,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -691,33 +691,33 @@ "properties": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 7 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 7 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 8 } } @@ -729,9 +729,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'string'. [objectDestructuring25.ts:6:1] +TypeError: Type '{ }' is not assignable to type 'string'. [objectDestructuring25.ts:22:1] diff --git a/es2panda/test/compiler/ts/objectDestructuring26-expected.txt b/es2panda/test/compiler/ts/objectDestructuring26-expected.txt index 2e76ae613500a7bf9cb0d86e1063e018e8a6447c..e3a1c5de45115f1d6bff10936c17e09e4dc83271 100644 --- a/es2panda/test/compiler/ts/objectDestructuring26-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring26-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -45,11 +45,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -75,11 +75,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -90,11 +90,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -102,11 +102,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -122,11 +122,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -137,11 +137,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -149,11 +149,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -161,11 +161,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -198,11 +198,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -210,11 +210,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -222,22 +222,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -245,11 +245,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -259,14 +259,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -276,11 +276,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -288,22 +288,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 53 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -311,11 +311,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -323,11 +323,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -346,11 +346,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -360,11 +360,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 63 }, "end": { - "line": 1, + "line": 17, "column": 64 } } @@ -372,11 +372,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 64 } } @@ -392,11 +392,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 66 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -409,25 +409,25 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 71 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 73 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -435,11 +435,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 69 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -447,11 +447,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 66 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -459,22 +459,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 58 }, "end": { - "line": 1, + "line": 17, "column": 81 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 81 } } @@ -482,11 +482,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 81 } } @@ -494,11 +494,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 83 } } @@ -517,11 +517,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 88 }, "end": { - "line": 1, + "line": 17, "column": 89 } } @@ -540,11 +540,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 93 }, "end": { - "line": 1, + "line": 17, "column": 94 } } @@ -554,11 +554,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 96 }, "end": { - "line": 1, + "line": 17, "column": 97 } } @@ -566,11 +566,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 93 }, "end": { - "line": 1, + "line": 17, "column": 97 } } @@ -586,11 +586,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 99 }, "end": { - "line": 1, + "line": 17, "column": 100 } } @@ -603,26 +603,25 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 103 }, "end": { - "line": 1, + "line": 17, "column": 107 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "2n", "loc": { "start": { - "line": 1, + "line": 17, "column": 109 }, "end": { - "line": 1, + "line": 17, "column": 111 } } @@ -630,11 +629,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 102 }, "end": { - "line": 1, + "line": 17, "column": 112 } } @@ -642,11 +641,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 99 }, "end": { - "line": 1, + "line": 17, "column": 112 } } @@ -654,11 +653,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 91 }, "end": { - "line": 1, + "line": 17, "column": 114 } } @@ -666,11 +665,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 88 }, "end": { - "line": 1, + "line": 17, "column": 114 } } @@ -686,11 +685,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 116 }, "end": { - "line": 1, + "line": 17, "column": 117 } } @@ -700,11 +699,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 119 }, "end": { - "line": 1, + "line": 17, "column": 120 } } @@ -712,11 +711,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 116 }, "end": { - "line": 1, + "line": 17, "column": 120 } } @@ -724,22 +723,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 86 }, "end": { - "line": 1, + "line": 17, "column": 122 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 122 } } @@ -748,11 +747,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 123 } } @@ -764,9 +763,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 1 } } } -TypeError: Object literal may only specify known properties, and 'er' does not exist in type '{ r: any; k: any; }'. [objectDestructuring26.ts:1:29] +TypeError: Object literal may only specify known properties, and property 'k' does not exist in the pattern. [objectDestructuring26.ts:17:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring27-expected.txt b/es2panda/test/compiler/ts/objectDestructuring27-expected.txt index 8ddfa449998fdad162d2485be084687abba02f3b..c530fc83277b77071a9569b5b62c740347d09941 100644 --- a/es2panda/test/compiler/ts/objectDestructuring27-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring27-expected.txt @@ -13,11 +13,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 12 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 13 } } @@ -78,11 +78,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 7 }, "end": { - "line": 4, + "line": 18, "column": 8 } } @@ -103,11 +103,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 12 }, "end": { - "line": 4, + "line": 18, "column": 13 } } @@ -125,11 +125,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 16 }, "end": { - "line": 4, + "line": 18, "column": 17 } } @@ -139,22 +139,22 @@ "value": 2, "loc": { "start": { - "line": 4, + "line": 18, "column": 20 }, "end": { - "line": 4, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 16 }, "end": { - "line": 4, + "line": 18, "column": 21 } } @@ -165,11 +165,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 23 }, "end": { - "line": 4, + "line": 18, "column": 24 } } @@ -177,11 +177,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 15 }, "end": { - "line": 4, + "line": 18, "column": 25 } } @@ -191,14 +191,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 18, "column": 29 }, "end": { - "line": 4, + "line": 18, "column": 34 } } @@ -208,11 +208,11 @@ "value": true, "loc": { "start": { - "line": 4, + "line": 18, "column": 36 }, "end": { - "line": 4, + "line": 18, "column": 40 } } @@ -220,22 +220,22 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 28 }, "end": { - "line": 4, + "line": 18, "column": 41 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 15 }, "end": { - "line": 4, + "line": 18, "column": 41 } } @@ -243,11 +243,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 12 }, "end": { - "line": 4, + "line": 18, "column": 41 } } @@ -255,11 +255,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 10 }, "end": { - "line": 4, + "line": 18, "column": 43 } } @@ -278,11 +278,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 48 }, "end": { - "line": 4, + "line": 18, "column": 49 } } @@ -295,25 +295,25 @@ "value": 2, "loc": { "start": { - "line": 4, + "line": 18, "column": 52 }, "end": { - "line": 4, + "line": 18, "column": 53 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 18, "column": 55 }, "end": { - "line": 4, + "line": 18, "column": 60 } } @@ -321,11 +321,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 51 }, "end": { - "line": 4, + "line": 18, "column": 61 } } @@ -333,11 +333,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 48 }, "end": { - "line": 4, + "line": 18, "column": 61 } } @@ -345,22 +345,22 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 46 }, "end": { - "line": 4, + "line": 18, "column": 63 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 10 }, "end": { - "line": 4, + "line": 18, "column": 63 } } @@ -368,11 +368,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 7 }, "end": { - "line": 4, + "line": 18, "column": 63 } } @@ -380,11 +380,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 5 }, "end": { - "line": 4, + "line": 18, "column": 65 } } @@ -403,11 +403,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 70 }, "end": { - "line": 4, + "line": 18, "column": 71 } } @@ -426,11 +426,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 75 }, "end": { - "line": 4, + "line": 18, "column": 76 } } @@ -440,11 +440,11 @@ "value": 2, "loc": { "start": { - "line": 4, + "line": 18, "column": 78 }, "end": { - "line": 4, + "line": 18, "column": 79 } } @@ -452,11 +452,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 75 }, "end": { - "line": 4, + "line": 18, "column": 79 } } @@ -472,11 +472,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 81 }, "end": { - "line": 4, + "line": 18, "column": 82 } } @@ -489,26 +489,25 @@ "value": true, "loc": { "start": { - "line": 4, + "line": 18, "column": 85 }, "end": { - "line": 4, + "line": 18, "column": 89 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "2n", "loc": { "start": { - "line": 4, + "line": 18, "column": 91 }, "end": { - "line": 4, + "line": 18, "column": 93 } } @@ -516,11 +515,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 84 }, "end": { - "line": 4, + "line": 18, "column": 94 } } @@ -528,11 +527,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 81 }, "end": { - "line": 4, + "line": 18, "column": 94 } } @@ -540,11 +539,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 73 }, "end": { - "line": 4, + "line": 18, "column": 96 } } @@ -552,11 +551,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 70 }, "end": { - "line": 4, + "line": 18, "column": 96 } } @@ -572,11 +571,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 98 }, "end": { - "line": 4, + "line": 18, "column": 99 } } @@ -586,11 +585,11 @@ "value": 6, "loc": { "start": { - "line": 4, + "line": 18, "column": 101 }, "end": { - "line": 4, + "line": 18, "column": 102 } } @@ -598,11 +597,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 98 }, "end": { - "line": 4, + "line": 18, "column": 102 } } @@ -610,22 +609,22 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 68 }, "end": { - "line": 4, + "line": 18, "column": 104 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 5 }, "end": { - "line": 4, + "line": 18, "column": 104 } } @@ -634,11 +633,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 105 } } @@ -650,9 +649,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 1 } } } -TypeError: Object literal may only specify known properties, and 't' does not exist in type '{ a?: { b: [number, string]; }; }'. [objectDestructuring27.ts:4:98] +TypeError: Object literal may only specify known properties, and property 't' does not exist in the pattern. [objectDestructuring27.ts:18:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring28-expected.txt b/es2panda/test/compiler/ts/objectDestructuring28-expected.txt index 7116f9a2187a9f6c910f40a798a3573d75fea83a..3549775a4f228dacdbb10546715ceb94c87a3043 100644 --- a/es2panda/test/compiler/ts/objectDestructuring28-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring28-expected.txt @@ -13,11 +13,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 12 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 13 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 10 }, "end": { - "line": 3, + "line": 17, "column": 11 } } @@ -94,22 +94,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 10 }, "end": { - "line": 3, + "line": 17, "column": 20 } } @@ -125,11 +125,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 21 }, "end": { - "line": 3, + "line": 17, "column": 22 } } @@ -138,22 +138,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 24 }, "end": { - "line": 3, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 21 }, "end": { - "line": 3, + "line": 17, "column": 32 } } @@ -161,11 +161,11 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 32 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -185,11 +185,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -198,11 +198,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 33 } } @@ -226,11 +226,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 7 }, "end": { - "line": 4, + "line": 18, "column": 8 } } @@ -251,11 +251,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 12 }, "end": { - "line": 4, + "line": 18, "column": 13 } } @@ -273,11 +273,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 16 }, "end": { - "line": 4, + "line": 18, "column": 17 } } @@ -288,22 +288,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 20 }, "end": { - "line": 4, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 16 }, "end": { - "line": 4, + "line": 18, "column": 21 } } @@ -314,11 +314,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 23 }, "end": { - "line": 4, + "line": 18, "column": 24 } } @@ -326,11 +326,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 15 }, "end": { - "line": 4, + "line": 18, "column": 25 } } @@ -343,11 +343,11 @@ "value": 1, "loc": { "start": { - "line": 4, + "line": 18, "column": 29 }, "end": { - "line": 4, + "line": 18, "column": 30 } } @@ -357,11 +357,11 @@ "value": true, "loc": { "start": { - "line": 4, + "line": 18, "column": 32 }, "end": { - "line": 4, + "line": 18, "column": 36 } } @@ -369,22 +369,22 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 28 }, "end": { - "line": 4, + "line": 18, "column": 37 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 15 }, "end": { - "line": 4, + "line": 18, "column": 37 } } @@ -392,11 +392,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 12 }, "end": { - "line": 4, + "line": 18, "column": 37 } } @@ -404,11 +404,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 10 }, "end": { - "line": 4, + "line": 18, "column": 39 } } @@ -427,11 +427,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 44 }, "end": { - "line": 4, + "line": 18, "column": 45 } } @@ -441,15 +441,14 @@ "elements": [ { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "2n", "loc": { "start": { - "line": 4, + "line": 18, "column": 48 }, "end": { - "line": 4, + "line": 18, "column": 50 } } @@ -457,11 +456,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 47 }, "end": { - "line": 4, + "line": 18, "column": 51 } } @@ -469,11 +468,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 44 }, "end": { - "line": 4, + "line": 18, "column": 51 } } @@ -481,22 +480,22 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 42 }, "end": { - "line": 4, + "line": 18, "column": 53 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 10 }, "end": { - "line": 4, + "line": 18, "column": 53 } } @@ -504,11 +503,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 7 }, "end": { - "line": 4, + "line": 18, "column": 53 } } @@ -516,11 +515,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 5 }, "end": { - "line": 4, + "line": 18, "column": 55 } } @@ -539,11 +538,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 60 }, "end": { - "line": 4, + "line": 18, "column": 61 } } @@ -562,11 +561,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 65 }, "end": { - "line": 4, + "line": 18, "column": 66 } } @@ -576,11 +575,11 @@ "value": 2, "loc": { "start": { - "line": 4, + "line": 18, "column": 68 }, "end": { - "line": 4, + "line": 18, "column": 69 } } @@ -588,11 +587,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 65 }, "end": { - "line": 4, + "line": 18, "column": 69 } } @@ -608,11 +607,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 71 }, "end": { - "line": 4, + "line": 18, "column": 72 } } @@ -622,29 +621,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 18, "column": 75 }, "end": { - "line": 4, + "line": 18, "column": 80 } } }, { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "2n", "loc": { "start": { - "line": 4, + "line": 18, "column": 82 }, "end": { - "line": 4, + "line": 18, "column": 84 } } @@ -652,11 +650,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 74 }, "end": { - "line": 4, + "line": 18, "column": 85 } } @@ -664,11 +662,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 71 }, "end": { - "line": 4, + "line": 18, "column": 85 } } @@ -676,11 +674,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 63 }, "end": { - "line": 4, + "line": 18, "column": 87 } } @@ -688,11 +686,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 60 }, "end": { - "line": 4, + "line": 18, "column": 87 } } @@ -700,22 +698,22 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 58 }, "end": { - "line": 4, + "line": 18, "column": 89 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 5 }, "end": { - "line": 4, + "line": 18, "column": 89 } } @@ -724,11 +722,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 90 } } @@ -744,11 +742,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 2 } } @@ -759,33 +757,33 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 5 }, "end": { - "line": 5, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 7 } } @@ -797,9 +795,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 1 } } } -TypeError: Type 'void' is not assignable to type 'bigint | string | number | { a: number; b: string; }'. [objectDestructuring28.ts:5:1] +TypeError: Type 'void' is not assignable to type 'string | bigint | number | { a: number; b: string; }'. [objectDestructuring28.ts:19:1] diff --git a/es2panda/test/compiler/ts/objectDestructuring29-expected.txt b/es2panda/test/compiler/ts/objectDestructuring29-expected.txt index ee9ecfe383ca19b379959a4cc14c1f952621c363..a891a14c13f4b9f0cefd699b800cc62e1bcf90cf 100644 --- a/es2panda/test/compiler/ts/objectDestructuring29-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring29-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 15 } } @@ -78,11 +78,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 4 } } @@ -93,11 +93,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 4 } } @@ -105,11 +105,11 @@ "kind": "init", "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 4 } } @@ -117,47 +117,47 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 2 }, "end": { - "line": 3, + "line": 17, "column": 5 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 13 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 14 } } @@ -169,9 +169,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 1 } } } -TypeError: Property 'a' does not exist on type 'string [objectDestructuring29.ts:3:3] +TypeError: Property a does not exist on type "foo". [objectDestructuring29.ts:17:2] diff --git a/es2panda/test/compiler/ts/objectDestructuring3-expected.txt b/es2panda/test/compiler/ts/objectDestructuring3-expected.txt index 8a859ffbbb9116d97037006c2e6efe096cfb734e..9fbe7310dca33298949048ec30e4a1636b1bb652 100644 --- a/es2panda/test/compiler/ts/objectDestructuring3-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring3-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -37,11 +37,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -51,22 +51,22 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -74,11 +74,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -94,11 +94,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -109,11 +109,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -121,11 +121,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -133,11 +133,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -170,11 +170,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -182,11 +182,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -194,22 +194,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -218,11 +218,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -234,9 +234,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 36 } } } -TypeError: Object literal may only specify known properties, and 'foo' does not exist in type '{ a?: number; b: any; }'. [objectDestructuring3.ts:1:27] +TypeError: Object literal may only specify known properties, and property 'foo' does not exist in the pattern. [objectDestructuring3.ts:17:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring30-expected.txt b/es2panda/test/compiler/ts/objectDestructuring30-expected.txt index 21cd88b453420f979f29ca5e4b569e6e8de5a915..1379bc61feaf99f9aa7e78fde7a0c20325f10eb9 100644 --- a/es2panda/test/compiler/ts/objectDestructuring30-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring30-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 15 } } @@ -78,11 +78,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 4 } } @@ -93,11 +93,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 4 } } @@ -105,11 +105,11 @@ "kind": "init", "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 4 } } @@ -117,11 +117,11 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 2 }, "end": { - "line": 3, + "line": 17, "column": 5 } } @@ -140,25 +140,25 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 9 }, "end": { - "line": 3, + "line": 17, "column": 10 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 17, "column": 18 } } @@ -166,11 +166,11 @@ "kind": "init", "loc": { "start": { - "line": 3, + "line": 17, "column": 9 }, "end": { - "line": 3, + "line": 17, "column": 18 } } @@ -178,33 +178,33 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 20 } } @@ -216,9 +216,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring30.ts:3:3] +TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring30.ts:17:3] diff --git a/es2panda/test/compiler/ts/objectDestructuring31-expected.txt b/es2panda/test/compiler/ts/objectDestructuring31-expected.txt index 13ff8e08c3f3941126b5fb72a46ec85fe88dc2db..4623c4ef9c0dec8518431188c9b0a957773886ec 100644 --- a/es2panda/test/compiler/ts/objectDestructuring31-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring31-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 15 } } @@ -78,11 +78,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 4 } } @@ -95,36 +95,36 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 4 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 3, + "line": 17, "column": 7 }, "end": { - "line": 3, + "line": 17, "column": 12 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 12 } } @@ -132,11 +132,11 @@ "kind": "init", "loc": { "start": { - "line": 3, + "line": 17, "column": 3 }, "end": { - "line": 3, + "line": 17, "column": 12 } } @@ -144,11 +144,11 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 2 }, "end": { - "line": 3, + "line": 17, "column": 13 } } @@ -167,11 +167,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 17 }, "end": { - "line": 3, + "line": 17, "column": 18 } } @@ -181,11 +181,11 @@ "value": 3, "loc": { "start": { - "line": 3, + "line": 17, "column": 21 }, "end": { - "line": 3, + "line": 17, "column": 22 } } @@ -193,11 +193,11 @@ "kind": "init", "loc": { "start": { - "line": 3, + "line": 17, "column": 17 }, "end": { - "line": 3, + "line": 17, "column": 22 } } @@ -205,33 +205,33 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 16 }, "end": { - "line": 3, + "line": 17, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 24 } } @@ -243,9 +243,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring31.ts:3:3] +TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring31.ts:17:3] diff --git a/es2panda/test/compiler/ts/objectDestructuring32-expected.txt b/es2panda/test/compiler/ts/objectDestructuring32-expected.txt index 40655b488fb9909e8546b9c099eedb55136f1715..f671e7dcef630c45ed9df32dc3a7f9d08f2db66d 100644 --- a/es2panda/test/compiler/ts/objectDestructuring32-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring32-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 3 }, "end": { - "line": 2, + "line": 16, "column": 4 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 3 }, "end": { - "line": 2, + "line": 16, "column": 4 } } @@ -47,11 +47,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 16, "column": 3 }, "end": { - "line": 2, + "line": 16, "column": 4 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 2 }, "end": { - "line": 2, + "line": 16, "column": 5 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 9 }, "end": { - "line": 2, + "line": 16, "column": 10 } } @@ -96,11 +96,11 @@ "value": 3, "loc": { "start": { - "line": 2, + "line": 16, "column": 13 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -108,11 +108,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 16, "column": 9 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -120,33 +120,33 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 16 } } @@ -158,9 +158,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 1 } } } -TypeError: No value exists in scope for the shorthand property 'a'. Either declare one or provide an initializer. [objectDestructuring32.ts:2:3] +TypeError: Cannot find name 'a'. [objectDestructuring32.ts:16:3] diff --git a/es2panda/test/compiler/ts/objectDestructuring33-expected.txt b/es2panda/test/compiler/ts/objectDestructuring33-expected.txt index ef95a67e382a4c0212e55e900f79ac0b1caa0946..ec8ddfe410cc6f75786dde1f93b57183f61479be 100644 --- a/es2panda/test/compiler/ts/objectDestructuring33-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring33-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 15 } } @@ -78,12 +78,12 @@ "decorators": [], "loc": { "start": { - "line": 3, - "column": 3 + "line": 17, + "column": 4 }, "end": { - "line": 3, - "column": 4 + "line": 17, + "column": 5 } } }, @@ -93,36 +93,36 @@ "decorators": [], "loc": { "start": { - "line": 3, - "column": 3 + "line": 17, + "column": 4 }, "end": { - "line": 3, - "column": 4 + "line": 17, + "column": 5 } } }, "kind": "init", "loc": { "start": { - "line": 3, - "column": 3 + "line": 17, + "column": 4 }, "end": { - "line": 3, - "column": 4 + "line": 17, + "column": 5 } } } ], "loc": { "start": { - "line": 3, + "line": 17, "column": 2 }, "end": { - "line": 3, - "column": 5 + "line": 17, + "column": 7 } } }, @@ -140,12 +140,12 @@ "decorators": [], "loc": { "start": { - "line": 3, - "column": 9 + "line": 17, + "column": 12 }, "end": { - "line": 3, - "column": 10 + "line": 17, + "column": 13 } } }, @@ -154,24 +154,24 @@ "value": 3, "loc": { "start": { - "line": 3, - "column": 13 + "line": 17, + "column": 15 }, "end": { - "line": 3, - "column": 14 + "line": 17, + "column": 16 } } }, "kind": "init", "loc": { "start": { - "line": 3, - "column": 9 + "line": 17, + "column": 12 }, "end": { - "line": 3, - "column": 14 + "line": 17, + "column": 16 } } }, @@ -182,16 +182,16 @@ "computed": false, "key": { "type": "Identifier", - "name": "a", + "name": "b", "decorators": [], "loc": { "start": { - "line": 3, - "column": 16 + "line": 17, + "column": 18 }, "end": { - "line": 3, - "column": 17 + "line": 17, + "column": 19 } } }, @@ -200,58 +200,58 @@ "value": 4, "loc": { "start": { - "line": 3, - "column": 20 + "line": 17, + "column": 21 }, "end": { - "line": 3, - "column": 21 + "line": 17, + "column": 22 } } }, "kind": "init", "loc": { "start": { - "line": 3, - "column": 16 + "line": 17, + "column": 18 }, "end": { - "line": 3, - "column": 21 + "line": 17, + "column": 22 } } } ], "loc": { "start": { - "line": 3, - "column": 8 + "line": 17, + "column": 10 }, "end": { - "line": 3, - "column": 22 + "line": 17, + "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, - "column": 23 + "line": 17, + "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, - "column": 23 + "line": 17, + "column": 25 } } } @@ -262,9 +262,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 1 } } } -TypeError: Duplicate identifier 'a'. [objectDestructuring33.ts:3:16] +TypeError: Object literal may only specify known properties, and property 'b' does not exist in the pattern. [objectDestructuring33.ts:17:2] diff --git a/es2panda/test/compiler/ts/objectDestructuring33.ts b/es2panda/test/compiler/ts/objectDestructuring33.ts index da0ed59ec7c123c3962ebf12169023b2aafac5fa..afbda252310de79d5d60839801aa677804189603 100644 --- a/es2panda/test/compiler/ts/objectDestructuring33.ts +++ b/es2panda/test/compiler/ts/objectDestructuring33.ts @@ -14,5 +14,5 @@ */ var a: number; -({a} = {a : 3, a : 4}) +({ a } = { a: 3, b: 4 }) diff --git a/es2panda/test/compiler/ts/objectDestructuring34-expected.txt b/es2panda/test/compiler/ts/objectDestructuring34-expected.txt index dc8845ba0b6f0ff6cf761f2eb413bbb69fa65ad6..f7213455cd1729454eefcc2a2b07da567eb9d1fa 100644 --- a/es2panda/test/compiler/ts/objectDestructuring34-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring34-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 15 } } @@ -136,11 +136,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -151,11 +151,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -163,11 +163,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -175,11 +175,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 2 }, "end": { - "line": 4, + "line": 18, "column": 5 } } @@ -190,33 +190,33 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 8 }, "end": { - "line": 4, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 10 } } @@ -228,9 +228,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 20, "column": 1 } } } -TypeError: Property 'a' does not exist on type 'string [objectDestructuring34.ts:4:3] +TypeError: Property a does not exist on type string. [objectDestructuring34.ts:18:2] diff --git a/es2panda/test/compiler/ts/objectDestructuring35-expected.txt b/es2panda/test/compiler/ts/objectDestructuring35-expected.txt index c3b02d32844c347620a8c090c700dfb3dafc8ab1..90f619a566769f89b236afbe93c4d75c51149afd 100644 --- a/es2panda/test/compiler/ts/objectDestructuring35-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring35-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 15 } } @@ -136,11 +136,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -151,11 +151,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -163,11 +163,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -175,11 +175,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 2 }, "end": { - "line": 4, + "line": 18, "column": 5 } } @@ -198,11 +198,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 9 }, "end": { - "line": 4, + "line": 18, "column": 10 } } @@ -213,11 +213,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 13 }, "end": { - "line": 4, + "line": 18, "column": 14 } } @@ -225,11 +225,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 9 }, "end": { - "line": 4, + "line": 18, "column": 14 } } @@ -237,33 +237,33 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 8 }, "end": { - "line": 4, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 16 } } @@ -275,9 +275,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 20, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring35.ts:4:3] +TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring35.ts:18:3] diff --git a/es2panda/test/compiler/ts/objectDestructuring36-expected.txt b/es2panda/test/compiler/ts/objectDestructuring36-expected.txt index ecfeae29bdd41c58eec44eba0a39ef7687a21775..0fb922acee58e0c54b16c0954a638123ce3a6cd4 100644 --- a/es2panda/test/compiler/ts/objectDestructuring36-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring36-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -26,22 +26,22 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 9 }, "end": { - "line": 2, + "line": 16, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 11 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 15 } } @@ -129,11 +129,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 18, "column": 8 }, "end": { - "line": 4, + "line": 18, "column": 14 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 5 }, "end": { - "line": 4, + "line": 18, "column": 6 } } @@ -153,11 +153,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 18, "column": 5 }, "end": { - "line": 4, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 15 } } @@ -194,11 +194,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 3 }, "end": { - "line": 5, + "line": 19, "column": 4 } } @@ -217,11 +217,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 8 }, "end": { - "line": 5, + "line": 19, "column": 9 } } @@ -232,11 +232,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 8 }, "end": { - "line": 5, + "line": 19, "column": 9 } } @@ -244,11 +244,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 19, "column": 8 }, "end": { - "line": 5, + "line": 19, "column": 9 } } @@ -256,11 +256,11 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 7 }, "end": { - "line": 5, + "line": 19, "column": 10 } } @@ -268,11 +268,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 19, "column": 3 }, "end": { - "line": 5, + "line": 19, "column": 10 } } @@ -280,11 +280,11 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 2 }, "end": { - "line": 5, + "line": 19, "column": 11 } } @@ -303,25 +303,25 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 15 }, "end": { - "line": 5, + "line": 19, "column": 16 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 19, "column": 19 }, "end": { - "line": 5, + "line": 19, "column": 24 } } @@ -329,11 +329,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 19, "column": 15 }, "end": { - "line": 5, + "line": 19, "column": 24 } } @@ -341,33 +341,33 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 14 }, "end": { - "line": 5, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 26 } } }, "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 26 } } @@ -379,9 +379,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 1 } } } -TypeError: Property 'c' does not exist on type 'string [objectDestructuring36.ts:5:8] +TypeError: Property c does not exist on type string. [objectDestructuring36.ts:19:7] diff --git a/es2panda/test/compiler/ts/objectDestructuring37-expected.txt b/es2panda/test/compiler/ts/objectDestructuring37-expected.txt index 158d14756027a5c61661f5fc9141947f6ee0778e..fe79b196409df3fd753492c149cb7ef47c493e10 100644 --- a/es2panda/test/compiler/ts/objectDestructuring37-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring37-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -26,22 +26,22 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 9 }, "end": { - "line": 2, + "line": 16, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 11 } } @@ -50,73 +50,15 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 12 } } }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, { "type": "VariableDeclaration", "declarations": [ @@ -129,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 17, "column": 8 }, "end": { - "line": 4, + "line": 17, "column": 14 } } @@ -141,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 17, "column": 5 }, "end": { - "line": 4, + "line": 17, "column": 6 } } @@ -153,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 17, "column": 5 }, "end": { - "line": 4, + "line": 17, "column": 6 } } @@ -166,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 17, "column": 15 } } @@ -194,12 +136,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 3 + "line": 18, + "column": 4 }, "end": { - "line": 5, - "column": 4 + "line": 18, + "column": 5 } } }, @@ -217,12 +159,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 8 + "line": 18, + "column": 9 }, "end": { - "line": 5, - "column": 9 + "line": 18, + "column": 10 } } }, @@ -232,60 +174,60 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 8 + "line": 18, + "column": 9 }, "end": { - "line": 5, - "column": 9 + "line": 18, + "column": 10 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 8 + "line": 18, + "column": 9 }, "end": { - "line": 5, - "column": 9 + "line": 18, + "column": 10 } } } ], "loc": { "start": { - "line": 5, + "line": 18, "column": 7 }, "end": { - "line": 5, - "column": 10 + "line": 18, + "column": 12 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 3 + "line": 18, + "column": 4 }, "end": { - "line": 5, - "column": 10 + "line": 18, + "column": 12 } } } ], "loc": { "start": { - "line": 5, + "line": 18, "column": 2 }, "end": { - "line": 5, - "column": 11 + "line": 18, + "column": 14 } } }, @@ -303,12 +245,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 15 + "line": 18, + "column": 19 }, "end": { - "line": 5, - "column": 16 + "line": 18, + "column": 20 } } }, @@ -326,12 +268,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 20 + "line": 18, + "column": 24 }, "end": { - "line": 5, - "column": 21 + "line": 18, + "column": 25 } } }, @@ -341,82 +283,82 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 20 + "line": 18, + "column": 24 }, "end": { - "line": 5, - "column": 21 + "line": 18, + "column": 25 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 20 + "line": 18, + "column": 24 }, "end": { - "line": 5, - "column": 21 + "line": 18, + "column": 25 } } } ], "loc": { "start": { - "line": 5, - "column": 19 + "line": 18, + "column": 22 }, "end": { - "line": 5, - "column": 22 + "line": 18, + "column": 27 } } }, "kind": "init", "loc": { "start": { - "line": 5, - "column": 15 + "line": 18, + "column": 19 }, "end": { - "line": 5, - "column": 22 + "line": 18, + "column": 27 } } } ], "loc": { "start": { - "line": 5, - "column": 14 + "line": 18, + "column": 17 }, "end": { - "line": 5, - "column": 23 + "line": 18, + "column": 29 } } }, "loc": { "start": { - "line": 5, + "line": 18, "column": 1 }, "end": { - "line": 5, - "column": 24 + "line": 18, + "column": 30 } } }, "loc": { "start": { - "line": 5, + "line": 18, "column": 1 }, "end": { - "line": 5, - "column": 24 + "line": 18, + "column": 30 } } } @@ -427,9 +369,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 20, "column": 1 } } } -TypeError: Object literal may only specify known properties, and 'b' does not exist in type '{ c: string; }'. [objectDestructuring37.ts:5:20] +TypeError: Cannot find name b [objectDestructuring37.ts:18:24] diff --git a/es2panda/test/compiler/ts/objectDestructuring37.ts b/es2panda/test/compiler/ts/objectDestructuring37.ts index 23889716fe288f694646aba1c7c224117b55c4af..a3e91f97950bf513bab9b6d6b8475af24ae04797 100644 --- a/es2panda/test/compiler/ts/objectDestructuring37.ts +++ b/es2panda/test/compiler/ts/objectDestructuring37.ts @@ -14,7 +14,6 @@ */ var a = {}; -var b: number; var c: string; -({a : {c}} = {a : {b}}) +({ a: { c } } = { a: { b } }) diff --git a/es2panda/test/compiler/ts/objectDestructuring38-expected.txt b/es2panda/test/compiler/ts/objectDestructuring38-expected.txt index c47b53586e0d5a3f53a757c4da0d533ab0b43fd6..50a2d02956da05e5d5f2f44bcefd203f772d1773 100644 --- a/es2panda/test/compiler/ts/objectDestructuring38-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring38-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -26,22 +26,22 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 9 }, "end": { - "line": 2, + "line": 16, "column": 11 } } }, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 11 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 12 } } @@ -71,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 15 } } @@ -129,11 +129,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 18, "column": 8 }, "end": { - "line": 4, + "line": 18, "column": 14 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 5 }, "end": { - "line": 4, + "line": 18, "column": 6 } } @@ -153,11 +153,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 18, "column": 5 }, "end": { - "line": 4, + "line": 18, "column": 6 } } @@ -166,11 +166,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 15 } } @@ -194,11 +194,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 3 }, "end": { - "line": 5, + "line": 19, "column": 4 } } @@ -217,11 +217,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 8 }, "end": { - "line": 5, + "line": 19, "column": 9 } } @@ -232,11 +232,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 8 }, "end": { - "line": 5, + "line": 19, "column": 9 } } @@ -244,11 +244,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 19, "column": 8 }, "end": { - "line": 5, + "line": 19, "column": 9 } } @@ -256,11 +256,11 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 7 }, "end": { - "line": 5, + "line": 19, "column": 10 } } @@ -268,11 +268,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 19, "column": 3 }, "end": { - "line": 5, + "line": 19, "column": 10 } } @@ -280,11 +280,11 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 2 }, "end": { - "line": 5, + "line": 19, "column": 11 } } @@ -303,11 +303,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 15 }, "end": { - "line": 5, + "line": 19, "column": 16 } } @@ -326,11 +326,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 20 }, "end": { - "line": 5, + "line": 19, "column": 21 } } @@ -341,11 +341,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 24 }, "end": { - "line": 5, + "line": 19, "column": 25 } } @@ -353,11 +353,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 19, "column": 20 }, "end": { - "line": 5, + "line": 19, "column": 25 } } @@ -365,11 +365,11 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 19 }, "end": { - "line": 5, + "line": 19, "column": 26 } } @@ -377,11 +377,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 19, "column": 15 }, "end": { - "line": 5, + "line": 19, "column": 26 } } @@ -389,33 +389,33 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 14 }, "end": { - "line": 5, + "line": 19, "column": 27 } } }, "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 28 } } }, "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 19, "column": 28 } } @@ -427,9 +427,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 1 } } } -TypeError: Type 'number' is not assignable to type 'string'. [objectDestructuring38.ts:5:8] +TypeError: Type 'number' is not assignable to type 'string'. [objectDestructuring38.ts:19:8] diff --git a/es2panda/test/compiler/ts/objectDestructuring39-expected.txt b/es2panda/test/compiler/ts/objectDestructuring39-expected.txt index 34bb082ab7cdc891a3e0dfdc372da71d3ffe1b15..60a5e35ed3e789915347c935cefe958c600468ba 100644 --- a/es2panda/test/compiler/ts/objectDestructuring39-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring39-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 15 } } @@ -136,11 +136,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -151,11 +151,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -163,11 +163,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -175,11 +175,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 2 }, "end": { - "line": 4, + "line": 18, "column": 5 } } @@ -198,11 +198,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 9 }, "end": { - "line": 4, + "line": 18, "column": 10 } } @@ -212,11 +212,11 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 18, "column": 13 }, "end": { - "line": 4, + "line": 18, "column": 14 } } @@ -224,11 +224,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 9 }, "end": { - "line": 4, + "line": 18, "column": 14 } } @@ -244,25 +244,25 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 16 }, "end": { - "line": 4, + "line": 18, "column": 17 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 18, "column": 20 }, "end": { - "line": 4, + "line": 18, "column": 25 } } @@ -270,11 +270,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 16 }, "end": { - "line": 4, + "line": 18, "column": 25 } } @@ -282,33 +282,33 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 8 }, "end": { - "line": 4, + "line": 18, "column": 26 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 27 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 27 } } @@ -320,9 +320,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 20, "column": 1 } } } -TypeError: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }'. [objectDestructuring39.ts:4:16] +TypeError: Object literal may only specify known properties, and property 'b' does not exist in the pattern. [objectDestructuring39.ts:18:2] diff --git a/es2panda/test/compiler/ts/objectDestructuring4-expected.txt b/es2panda/test/compiler/ts/objectDestructuring4-expected.txt index 1f8cb0a86681020a47a1c5e8c7fce26c75ace5f9..36150b9e40cd5d66fc05d4577f21277e715be39b 100644 --- a/es2panda/test/compiler/ts/objectDestructuring4-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring4-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -40,11 +40,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -54,22 +54,22 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -80,11 +80,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -92,11 +92,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -104,11 +104,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -116,11 +116,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -139,11 +139,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -153,11 +153,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -165,11 +165,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -177,22 +177,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -201,11 +201,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -217,9 +217,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 34 } } } -TypeError: Type 'number' must have a '[Symbol.iterator]()' method that returns an interator [objectDestructuring4.ts:1:10] +TypeError: Type number must have a '[Symbol.iterator]()' method that returns an iterator. [objectDestructuring4.ts:17:10] diff --git a/es2panda/test/compiler/ts/objectDestructuring40-expected.txt b/es2panda/test/compiler/ts/objectDestructuring40-expected.txt index 01e2c6d73310f038df024da90577f9c6c3a9d806..2c8279b7d22a65788844240233be4a614240d5dc 100644 --- a/es2panda/test/compiler/ts/objectDestructuring40-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring40-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 15 } } @@ -136,11 +136,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -151,11 +151,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -163,11 +163,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 3 }, "end": { - "line": 4, + "line": 18, "column": 4 } } @@ -183,11 +183,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 6 }, "end": { - "line": 4, + "line": 18, "column": 7 } } @@ -198,11 +198,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 6 }, "end": { - "line": 4, + "line": 18, "column": 7 } } @@ -210,11 +210,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 6 }, "end": { - "line": 4, + "line": 18, "column": 7 } } @@ -222,11 +222,11 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 2 }, "end": { - "line": 4, + "line": 18, "column": 8 } } @@ -245,11 +245,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 18, "column": 12 }, "end": { - "line": 4, + "line": 18, "column": 13 } } @@ -259,11 +259,11 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 18, "column": 16 }, "end": { - "line": 4, + "line": 18, "column": 17 } } @@ -271,11 +271,11 @@ "kind": "init", "loc": { "start": { - "line": 4, + "line": 18, "column": 12 }, "end": { - "line": 4, + "line": 18, "column": 17 } } @@ -283,33 +283,33 @@ ], "loc": { "start": { - "line": 4, + "line": 18, "column": 11 }, "end": { - "line": 4, + "line": 18, "column": 18 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 4, + "line": 18, "column": 1 }, "end": { - "line": 4, + "line": 18, "column": 19 } } @@ -321,9 +321,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 20, "column": 1 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [objectDestructuring40.ts:4:6] +TypeError: Property b does not exist on type { a: number; }. [objectDestructuring40.ts:18:2] diff --git a/es2panda/test/compiler/ts/objectDestructuring41-expected.txt b/es2panda/test/compiler/ts/objectDestructuring41-expected.txt index 015ad7fc4b9fa664fedce57616b372d64209f4c0..f8038ece7a02277b02b4036b79433d74a06741c7 100644 --- a/es2panda/test/compiler/ts/objectDestructuring41-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring41-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -142,22 +142,22 @@ "properties": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -166,11 +166,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -194,11 +194,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 3 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -219,11 +219,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -234,11 +234,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -246,11 +246,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -266,11 +266,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -281,11 +281,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -293,11 +293,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -305,11 +305,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -328,25 +328,25 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 17 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 5, + "line": 21, "column": 19 }, "end": { - "line": 5, + "line": 21, "column": 24 } } @@ -354,11 +354,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 24 } } @@ -366,22 +366,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 15 }, "end": { - "line": 5, + "line": 21, "column": 25 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -389,11 +389,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 3 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -401,11 +401,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 2 }, "end": { - "line": 5, + "line": 21, "column": 26 } } @@ -424,11 +424,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 30 }, "end": { - "line": 5, + "line": 21, "column": 31 } } @@ -447,11 +447,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 35 }, "end": { - "line": 5, + "line": 21, "column": 36 } } @@ -461,11 +461,11 @@ "value": 10, "loc": { "start": { - "line": 5, + "line": 21, "column": 38 }, "end": { - "line": 5, + "line": 21, "column": 40 } } @@ -473,11 +473,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 35 }, "end": { - "line": 5, + "line": 21, "column": 40 } } @@ -493,25 +493,25 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 42 }, "end": { - "line": 5, + "line": 21, "column": 43 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 5, + "line": 21, "column": 45 }, "end": { - "line": 5, + "line": 21, "column": 50 } } @@ -519,11 +519,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 42 }, "end": { - "line": 5, + "line": 21, "column": 50 } } @@ -531,11 +531,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 34 }, "end": { - "line": 5, + "line": 21, "column": 51 } } @@ -543,11 +543,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 30 }, "end": { - "line": 5, + "line": 21, "column": 51 } } @@ -555,33 +555,33 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 29 }, "end": { - "line": 5, + "line": 21, "column": 52 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 53 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 54 } } @@ -593,9 +593,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 54 } } } -TypeError: Initializer provides no value for this binding element and the binding element has no default value [objectDestructuring41.ts:5:7] +TypeError: Property b does not exist on type { a: number; b: string; } | { a: string; }. [objectDestructuring41.ts:21:6] diff --git a/es2panda/test/compiler/ts/objectDestructuring5-expected.txt b/es2panda/test/compiler/ts/objectDestructuring5-expected.txt index a63cbba62b755469b09d74c933c737268f67741c..1abb82a18c44a360882a7e7417d520ceba3ae17c 100644 --- a/es2panda/test/compiler/ts/objectDestructuring5-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring5-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -40,36 +40,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -80,11 +80,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -92,11 +92,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -104,11 +104,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -116,11 +116,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -139,25 +139,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -165,11 +165,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -177,22 +177,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -201,11 +201,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -217,9 +217,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 42 } } } -TypeError: Object literal may only specify known properties, and 'b' does not exist in type '{ a: [string?, any]; }'. [objectDestructuring5.ts:1:31] +TypeError: Object literal may only specify known properties, and property 'b' does not exist in the pattern. [objectDestructuring5.ts:17:5] diff --git a/es2panda/test/compiler/ts/objectDestructuring6-expected.txt b/es2panda/test/compiler/ts/objectDestructuring6-expected.txt index 85232e6d523c93be13a90f275f07203e5554a392..2c84da609cdff23028eab261eebf9c818c00f570 100644 --- a/es2panda/test/compiler/ts/objectDestructuring6-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring6-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -47,11 +47,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -119,11 +119,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -131,11 +131,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -151,11 +151,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -165,11 +165,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -177,11 +177,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -189,11 +189,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -201,11 +201,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -213,22 +213,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -237,11 +237,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 4 } } @@ -280,25 +280,25 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -306,11 +306,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -326,11 +326,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -340,11 +340,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 27 } } @@ -352,11 +352,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 27 } } @@ -364,33 +364,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -402,9 +402,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } } -TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring6.ts:2:9] +TypeError: Type 'string' is not assignable to type 'number'. [objectDestructuring6.ts:18:9] diff --git a/es2panda/test/compiler/ts/objectDestructuring7-expected.txt b/es2panda/test/compiler/ts/objectDestructuring7-expected.txt index 68ce229dcc0a148a8ae48693065e5f9dd04ebfe5..a3b321c2702483fb0a0a4e14422ad4c8212b27bc 100644 --- a/es2panda/test/compiler/ts/objectDestructuring7-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring7-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -37,11 +37,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -60,11 +60,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -74,11 +74,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -86,11 +86,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -106,11 +106,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -120,11 +120,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -132,11 +132,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -144,22 +144,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 28 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -167,11 +167,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -179,11 +179,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -202,26 +202,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "value": { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "3n", "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -229,11 +228,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -241,22 +240,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -265,11 +264,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -285,11 +284,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -308,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -322,11 +321,11 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -334,11 +333,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 7 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -354,11 +353,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -368,11 +367,11 @@ "value": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -380,11 +379,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -400,11 +399,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -414,11 +413,11 @@ "value": 6, "loc": { "start": { - "line": 2, + "line": 18, "column": 26 }, "end": { - "line": 2, + "line": 18, "column": 27 } } @@ -426,11 +425,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 27 } } @@ -438,33 +437,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 29 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -476,9 +475,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 30 } } } -TypeError: Object literal may only specify known properties, and 'c' does not exist in type '{ a: number; b: boolean; } | bigint' [objectDestructuring7.ts:2:23] +TypeError: Object literal may only specify known properties, and "c" does not exist in type 'bigint | { a: number; b: boolean; }'. [objectDestructuring7.ts:18:23] diff --git a/es2panda/test/compiler/ts/objectDestructuring8-expected.txt b/es2panda/test/compiler/ts/objectDestructuring8-expected.txt index d0f5241d622596638282231f473ebfbfe0ffdbdb..7f307eac5b1236a1dee3eb51704813373ea013e5 100644 --- a/es2panda/test/compiler/ts/objectDestructuring8-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring8-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -45,11 +45,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -62,36 +62,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -99,11 +99,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -119,11 +119,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -134,11 +134,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -146,11 +146,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -158,11 +158,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -181,11 +181,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -195,11 +195,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -207,11 +207,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -227,11 +227,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -241,11 +241,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -253,11 +253,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -273,11 +273,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -287,11 +287,11 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -299,11 +299,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -311,22 +311,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 53 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -334,11 +334,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -346,11 +346,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -369,11 +369,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -392,26 +392,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 66 } } }, "value": { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 1, + "line": 17, "column": 68 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -419,11 +418,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 65 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -439,25 +438,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 72 }, "end": { - "line": 1, + "line": 17, "column": 73 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 75 }, "end": { - "line": 1, + "line": 17, "column": 80 } } @@ -465,11 +464,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 72 }, "end": { - "line": 1, + "line": 17, "column": 80 } } @@ -477,11 +476,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 63 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -489,11 +488,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -501,22 +500,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 58 }, "end": { - "line": 1, + "line": 17, "column": 84 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 84 } } @@ -525,11 +524,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 84 } } @@ -541,9 +540,9 @@ "column": 1 }, "end": { - "line": 1, - "column": 84 + "line": 18, + "column": 1 } } } -TypeError: Object literal may only specify known properties, and 'c' does not exist in type '{ a?: string; b: any; }'. [objectDestructuring8.ts:1:46] +TypeError: Object literal may only specify known properties, and property 'c' does not exist in the pattern. [objectDestructuring8.ts:17:10] diff --git a/es2panda/test/compiler/ts/objectDestructuring8.ts b/es2panda/test/compiler/ts/objectDestructuring8.ts index 9f3a5d485d73225b7bcb3fe804d4381004d02e9b..cf9c72d524446dfbed54424bbd15c117fa1cf920 100644 --- a/es2panda/test/compiler/ts/objectDestructuring8.ts +++ b/es2panda/test/compiler/ts/objectDestructuring8.ts @@ -14,4 +14,4 @@ */ -var { a: { a = "bar", b } = { a: 1, b: true, c: {} } } = { a: { a: 5n, b: "foo" } } \ No newline at end of file +var { a: { a = "bar", b } = { a: 1, b: true, c: {} } } = { a: { a: 5n, b: "foo" } } diff --git a/es2panda/test/compiler/ts/objectDestructuring9-expected.txt b/es2panda/test/compiler/ts/objectDestructuring9-expected.txt index c0d3eaba09bb3f3afdf523d3ecf4e904d9c63916..b1b388d2b54ba827c933db015248d1b997166645 100644 --- a/es2panda/test/compiler/ts/objectDestructuring9-expected.txt +++ b/es2panda/test/compiler/ts/objectDestructuring9-expected.txt @@ -20,11 +20,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 8 } } @@ -45,11 +45,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -60,11 +60,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -72,11 +72,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -92,11 +92,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -107,11 +107,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -119,11 +119,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -131,11 +131,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -168,11 +168,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -180,11 +180,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -200,11 +200,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -214,11 +214,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -226,11 +226,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -238,22 +238,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 38 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -261,11 +261,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -273,11 +273,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -287,22 +287,22 @@ "properties": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -311,11 +311,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -331,11 +331,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } @@ -345,33 +345,33 @@ "properties": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 7 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -383,9 +383,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 8 } } } -TypeError: Type '{ }' is not assignable to type 'number'. [objectDestructuring9.ts:2:1] +TypeError: Type '{ }' is not assignable to type 'number'. [objectDestructuring9.ts:18:1] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability-expected.txt index fc4f5b1a0b4485c45fe128e9c8d58972fe1de828..9d55aed3b35b78648c053fb470fcf2dd021ae471 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -83,11 +83,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -96,11 +96,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -130,11 +130,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -143,22 +143,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -174,11 +174,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -187,22 +187,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 27 }, "end": { - "line": 2, + "line": 18, "column": 33 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -210,11 +210,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -233,35 +233,35 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 40 }, "end": { - "line": 2, + "line": 18, "column": 41 } } }, "typeAnnotation": { - "type": "TSStringKeyword", + "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 43 }, "end": { - "line": 2, + "line": 18, "column": 49 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 40 }, "end": { - "line": 2, + "line": 18, "column": 50 } } @@ -277,11 +277,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 51 }, "end": { - "line": 2, + "line": 18, "column": 52 } } @@ -290,22 +290,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 54 }, "end": { - "line": 2, + "line": 18, "column": 60 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 51 }, "end": { - "line": 2, + "line": 18, "column": 61 } } @@ -321,35 +321,35 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 62 }, "end": { - "line": 2, + "line": 18, "column": 63 } } }, "typeAnnotation": { - "type": "TSStringKeyword", + "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 65 }, "end": { - "line": 2, + "line": 18, "column": 71 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 62 }, "end": { - "line": 2, + "line": 18, "column": 73 } } @@ -357,11 +357,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 38 }, "end": { - "line": 2, + "line": 18, "column": 73 } } @@ -369,11 +369,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 73 } } @@ -381,11 +381,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -404,11 +404,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 78 }, "end": { - "line": 2, + "line": 18, "column": 79 } } @@ -418,11 +418,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 81 }, "end": { - "line": 2, + "line": 18, "column": 82 } } @@ -430,11 +430,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 78 }, "end": { - "line": 2, + "line": 18, "column": 82 } } @@ -450,25 +450,25 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 84 }, "end": { - "line": 2, + "line": 18, "column": 85 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 87 }, "end": { - "line": 2, + "line": 18, "column": 92 } } @@ -476,11 +476,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 84 }, "end": { - "line": 2, + "line": 18, "column": 92 } } @@ -493,22 +493,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 97 }, "end": { - "line": 2, + "line": 18, "column": 101 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 94 }, "end": { - "line": 2, + "line": 18, "column": 101 } } @@ -516,22 +516,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 76 }, "end": { - "line": 2, + "line": 18, "column": 103 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 103 } } @@ -540,11 +540,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 104 } } @@ -560,11 +560,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } @@ -583,38 +583,38 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "value": { - "type": "StringLiteral", - "value": "", + "type": "NumberLiteral", + "value": 2, "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, - "column": 18 + "line": 19, + "column": 14 } } }, "kind": "init", "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, - "column": 18 + "line": 19, + "column": 14 } } }, @@ -629,38 +629,38 @@ "decorators": [], "loc": { "start": { - "line": 3, - "column": 20 + "line": 19, + "column": 16 }, "end": { - "line": 3, - "column": 21 + "line": 19, + "column": 17 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 3, - "column": 23 + "line": 19, + "column": 19 }, "end": { - "line": 3, - "column": 28 + "line": 19, + "column": 24 } } }, "kind": "init", "loc": { "start": { - "line": 3, - "column": 20 + "line": 19, + "column": 16 }, "end": { - "line": 3, - "column": 28 + "line": 19, + "column": 24 } } }, @@ -675,72 +675,72 @@ "decorators": [], "loc": { "start": { - "line": 3, - "column": 30 + "line": 19, + "column": 26 }, "end": { - "line": 3, - "column": 31 + "line": 19, + "column": 27 } } }, "value": { - "type": "StringLiteral", - "value": "", + "type": "NumberLiteral", + "value": 3, "loc": { "start": { - "line": 3, - "column": 33 + "line": 19, + "column": 29 }, "end": { - "line": 3, - "column": 38 + "line": 19, + "column": 30 } } }, "kind": "init", "loc": { "start": { - "line": 3, - "column": 30 + "line": 19, + "column": 26 }, "end": { - "line": 3, - "column": 38 + "line": 19, + "column": 30 } } } ], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, - "column": 40 + "line": 19, + "column": 32 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, - "column": 40 + "line": 19, + "column": 32 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, - "column": 41 + "line": 19, + "column": 33 } } }, @@ -757,11 +757,11 @@ "members": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 13 } } @@ -769,11 +769,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -783,22 +783,22 @@ "properties": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 18 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -807,11 +807,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 19 } } @@ -838,11 +838,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 13 }, "end": { - "line": 6, + "line": 22, "column": 14 } } @@ -855,33 +855,33 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 27 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 16 }, "end": { - "line": 6, + "line": 22, "column": 27 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 13 }, "end": { - "line": 6, + "line": 22, "column": 28 } } @@ -897,11 +897,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 29 }, "end": { - "line": 6, + "line": 22, "column": 30 } } @@ -920,11 +920,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 35 }, "end": { - "line": 6, + "line": 22, "column": 36 } } @@ -933,22 +933,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 38 }, "end": { - "line": 6, + "line": 22, "column": 44 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 35 }, "end": { - "line": 6, + "line": 22, "column": 45 } } @@ -964,11 +964,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 46 }, "end": { - "line": 6, + "line": 22, "column": 47 } } @@ -977,22 +977,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 50 }, "end": { - "line": 6, + "line": 22, "column": 56 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 46 }, "end": { - "line": 6, + "line": 22, "column": 58 } } @@ -1000,22 +1000,22 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 33 }, "end": { - "line": 6, + "line": 22, "column": 58 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 29 }, "end": { - "line": 6, + "line": 22, "column": 60 } } @@ -1023,11 +1023,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 60 } } @@ -1035,11 +1035,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 9 } } @@ -1058,11 +1058,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 65 }, "end": { - "line": 6, + "line": 22, "column": 66 } } @@ -1072,11 +1072,11 @@ "properties": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 68 }, "end": { - "line": 6, + "line": 22, "column": 70 } } @@ -1084,11 +1084,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 65 }, "end": { - "line": 6, + "line": 22, "column": 70 } } @@ -1104,11 +1104,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 72 }, "end": { - "line": 6, + "line": 22, "column": 73 } } @@ -1127,11 +1127,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 77 }, "end": { - "line": 6, + "line": 22, "column": 78 } } @@ -1141,11 +1141,11 @@ "value": 5, "loc": { "start": { - "line": 6, + "line": 22, "column": 80 }, "end": { - "line": 6, + "line": 22, "column": 81 } } @@ -1153,11 +1153,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 77 }, "end": { - "line": 6, + "line": 22, "column": 81 } } @@ -1165,11 +1165,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 75 }, "end": { - "line": 6, + "line": 22, "column": 83 } } @@ -1177,11 +1177,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 72 }, "end": { - "line": 6, + "line": 22, "column": 83 } } @@ -1189,22 +1189,22 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 63 }, "end": { - "line": 6, + "line": 22, "column": 85 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 85 } } @@ -1213,11 +1213,11 @@ "kind": "var", "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 86 } } @@ -1233,11 +1233,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 5 } } @@ -1256,11 +1256,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 10 }, "end": { - "line": 7, + "line": 23, "column": 11 } } @@ -1270,11 +1270,11 @@ "properties": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 13 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -1282,11 +1282,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 10 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -1302,11 +1302,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -1325,11 +1325,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 22 }, "end": { - "line": 7, + "line": 23, "column": 23 } } @@ -1339,11 +1339,11 @@ "value": 5, "loc": { "start": { - "line": 7, + "line": 23, "column": 25 }, "end": { - "line": 7, + "line": 23, "column": 26 } } @@ -1351,11 +1351,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 22 }, "end": { - "line": 7, + "line": 23, "column": 26 } } @@ -1371,25 +1371,25 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 28 }, "end": { - "line": 7, + "line": 23, "column": 29 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 7, + "line": 23, "column": 31 }, "end": { - "line": 7, + "line": 23, "column": 36 } } @@ -1397,11 +1397,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 28 }, "end": { - "line": 7, + "line": 23, "column": 36 } } @@ -1409,11 +1409,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 20 }, "end": { - "line": 7, + "line": 23, "column": 38 } } @@ -1421,11 +1421,11 @@ "kind": "init", "loc": { "start": { - "line": 7, + "line": 23, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 38 } } @@ -1433,33 +1433,33 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 40 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 40 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 41 } } @@ -1475,11 +1475,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 5 } } @@ -1498,11 +1498,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 10 }, "end": { - "line": 8, + "line": 24, "column": 11 } } @@ -1512,11 +1512,11 @@ "properties": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 13 }, "end": { - "line": 8, + "line": 24, "column": 15 } } @@ -1524,11 +1524,11 @@ "kind": "init", "loc": { "start": { - "line": 8, + "line": 24, "column": 10 }, "end": { - "line": 8, + "line": 24, "column": 15 } } @@ -1536,33 +1536,33 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 17 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 17 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 18 } } @@ -1589,11 +1589,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 10, + "line": 26, "column": 14 } } @@ -1612,11 +1612,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 18 }, "end": { - "line": 10, + "line": 26, "column": 19 } } @@ -1625,22 +1625,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 21 }, "end": { - "line": 10, + "line": 26, "column": 27 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 18 }, "end": { - "line": 10, + "line": 26, "column": 28 } } @@ -1656,11 +1656,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 29 }, "end": { - "line": 10, + "line": 26, "column": 30 } } @@ -1669,22 +1669,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 32 }, "end": { - "line": 10, + "line": 26, "column": 38 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 29 }, "end": { - "line": 10, + "line": 26, "column": 40 } } @@ -1692,22 +1692,22 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 16 }, "end": { - "line": 10, + "line": 26, "column": 40 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 10, + "line": 26, "column": 41 } } @@ -1723,11 +1723,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 42 }, "end": { - "line": 10, + "line": 26, "column": 43 } } @@ -1746,11 +1746,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 47 }, "end": { - "line": 10, + "line": 26, "column": 48 } } @@ -1759,22 +1759,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 50 }, "end": { - "line": 10, + "line": 26, "column": 57 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 47 }, "end": { - "line": 10, + "line": 26, "column": 59 } } @@ -1782,22 +1782,22 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 45 }, "end": { - "line": 10, + "line": 26, "column": 59 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 42 }, "end": { - "line": 10, + "line": 26, "column": 61 } } @@ -1805,11 +1805,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 11 }, "end": { - "line": 10, + "line": 26, "column": 61 } } @@ -1817,11 +1817,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -1840,11 +1840,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 66 }, "end": { - "line": 10, + "line": 26, "column": 67 } } @@ -1863,11 +1863,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 71 }, "end": { - "line": 10, + "line": 26, "column": 72 } } @@ -1877,11 +1877,11 @@ "value": 5, "loc": { "start": { - "line": 10, + "line": 26, "column": 74 }, "end": { - "line": 10, + "line": 26, "column": 75 } } @@ -1889,11 +1889,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 71 }, "end": { - "line": 10, + "line": 26, "column": 75 } } @@ -1909,25 +1909,25 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 77 }, "end": { - "line": 10, + "line": 26, "column": 78 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 10, + "line": 26, "column": 80 }, "end": { - "line": 10, + "line": 26, "column": 85 } } @@ -1935,11 +1935,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 77 }, "end": { - "line": 10, + "line": 26, "column": 85 } } @@ -1947,11 +1947,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 69 }, "end": { - "line": 10, + "line": 26, "column": 87 } } @@ -1959,11 +1959,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 66 }, "end": { - "line": 10, + "line": 26, "column": 87 } } @@ -1979,11 +1979,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 89 }, "end": { - "line": 10, + "line": 26, "column": 90 } } @@ -2002,11 +2002,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 94 }, "end": { - "line": 10, + "line": 26, "column": 95 } } @@ -2016,11 +2016,11 @@ "value": true, "loc": { "start": { - "line": 10, + "line": 26, "column": 97 }, "end": { - "line": 10, + "line": 26, "column": 101 } } @@ -2028,11 +2028,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 94 }, "end": { - "line": 10, + "line": 26, "column": 101 } } @@ -2040,11 +2040,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 92 }, "end": { - "line": 10, + "line": 26, "column": 103 } } @@ -2052,11 +2052,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 89 }, "end": { - "line": 10, + "line": 26, "column": 103 } } @@ -2064,22 +2064,22 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 64 }, "end": { - "line": 10, + "line": 26, "column": 105 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 105 } } @@ -2088,11 +2088,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 106 } } @@ -2118,11 +2118,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 13 }, "end": { - "line": 11, + "line": 27, "column": 14 } } @@ -2135,11 +2135,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 18 }, "end": { - "line": 11, + "line": 27, "column": 24 } } @@ -2147,11 +2147,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 15 }, "end": { - "line": 11, + "line": 27, "column": 16 } } @@ -2163,11 +2163,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 29 }, "end": { - "line": 11, + "line": 27, "column": 35 } } @@ -2175,11 +2175,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 26 }, "end": { - "line": 11, + "line": 27, "column": 27 } } @@ -2189,22 +2189,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 38 }, "end": { - "line": 11, + "line": 27, "column": 44 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 13 }, "end": { - "line": 11, + "line": 27, "column": 45 } } @@ -2219,11 +2219,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 46 }, "end": { - "line": 11, + "line": 27, "column": 47 } } @@ -2233,22 +2233,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 51 }, "end": { - "line": 11, + "line": 27, "column": 58 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 46 }, "end": { - "line": 11, + "line": 27, "column": 60 } } @@ -2256,11 +2256,11 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 11 }, "end": { - "line": 11, + "line": 27, "column": 60 } } @@ -2268,11 +2268,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 9 } } @@ -2280,11 +2280,11 @@ "init": null, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 9 } } @@ -2293,11 +2293,11 @@ "kind": "var", "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 61 } } @@ -2313,11 +2313,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 5 } } @@ -2336,11 +2336,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 10 }, "end": { - "line": 12, + "line": 28, "column": 11 } } @@ -2361,11 +2361,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 26 }, "end": { - "line": 12, + "line": 28, "column": 32 } } @@ -2373,11 +2373,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 23 }, "end": { - "line": 12, + "line": 28, "column": 24 } } @@ -2389,11 +2389,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 37 }, "end": { - "line": 12, + "line": 28, "column": 43 } } @@ -2401,11 +2401,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 34 }, "end": { - "line": 12, + "line": 28, "column": 35 } } @@ -2415,11 +2415,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 46 }, "end": { - "line": 12, + "line": 28, "column": 52 } } @@ -2434,22 +2434,22 @@ "value": 12, "loc": { "start": { - "line": 12, + "line": 28, "column": 62 }, "end": { - "line": 12, + "line": 28, "column": 64 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 55 }, "end": { - "line": 12, + "line": 28, "column": 65 } } @@ -2457,33 +2457,33 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 53 }, "end": { - "line": 12, + "line": 28, "column": 67 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 13 }, "end": { - "line": 12, + "line": 28, "column": 67 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 13 }, "end": { - "line": 12, + "line": 28, "column": 67 } } @@ -2491,11 +2491,11 @@ "kind": "init", "loc": { "start": { - "line": 12, + "line": 28, "column": 10 }, "end": { - "line": 12, + "line": 28, "column": 67 } } @@ -2511,11 +2511,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 69 }, "end": { - "line": 12, + "line": 28, "column": 70 } } @@ -2539,22 +2539,22 @@ "value": true, "loc": { "start": { - "line": 12, + "line": 28, "column": 93 }, "end": { - "line": 12, + "line": 28, "column": 97 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 86 }, "end": { - "line": 12, + "line": 28, "column": 97 } } @@ -2562,33 +2562,33 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 84 }, "end": { - "line": 12, + "line": 28, "column": 99 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 72 }, "end": { - "line": 12, + "line": 28, "column": 99 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 72 }, "end": { - "line": 12, + "line": 28, "column": 99 } } @@ -2596,11 +2596,11 @@ "kind": "init", "loc": { "start": { - "line": 12, + "line": 28, "column": 69 }, "end": { - "line": 12, + "line": 28, "column": 99 } } @@ -2608,33 +2608,33 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 8 }, "end": { - "line": 12, + "line": 28, "column": 101 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 101 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 102 } } @@ -2655,11 +2655,11 @@ "members": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 13 } } @@ -2678,11 +2678,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 18 }, "end": { - "line": 14, + "line": 30, "column": 19 } } @@ -2691,22 +2691,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 21 }, "end": { - "line": 14, + "line": 30, "column": 27 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 18 }, "end": { - "line": 14, + "line": 30, "column": 29 } } @@ -2714,11 +2714,11 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 16 }, "end": { - "line": 14, + "line": 30, "column": 29 } } @@ -2737,11 +2737,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 34 }, "end": { - "line": 14, + "line": 30, "column": 35 } } @@ -2750,22 +2750,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 37 }, "end": { - "line": 14, + "line": 30, "column": 43 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 34 }, "end": { - "line": 14, + "line": 30, "column": 44 } } @@ -2781,11 +2781,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 45 }, "end": { - "line": 14, + "line": 30, "column": 46 } } @@ -2794,22 +2794,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 48 }, "end": { - "line": 14, + "line": 30, "column": 54 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 45 }, "end": { - "line": 14, + "line": 30, "column": 56 } } @@ -2817,11 +2817,11 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 32 }, "end": { - "line": 14, + "line": 30, "column": 56 } } @@ -2840,11 +2840,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 61 }, "end": { - "line": 14, + "line": 30, "column": 62 } } @@ -2853,22 +2853,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 64 }, "end": { - "line": 14, + "line": 30, "column": 71 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 61 }, "end": { - "line": 14, + "line": 30, "column": 72 } } @@ -2884,11 +2884,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 73 }, "end": { - "line": 14, + "line": 30, "column": 74 } } @@ -2897,22 +2897,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 76 }, "end": { - "line": 14, + "line": 30, "column": 82 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 73 }, "end": { - "line": 14, + "line": 30, "column": 83 } } @@ -2928,11 +2928,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 84 }, "end": { - "line": 14, + "line": 30, "column": 85 } } @@ -2941,22 +2941,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 87 }, "end": { - "line": 14, + "line": 30, "column": 93 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 84 }, "end": { - "line": 14, + "line": 30, "column": 95 } } @@ -2964,11 +2964,11 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 59 }, "end": { - "line": 14, + "line": 30, "column": 95 } } @@ -2976,11 +2976,11 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 95 } } @@ -2988,11 +2988,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 9 } } @@ -3000,11 +3000,11 @@ "init": null, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 9 } } @@ -3013,11 +3013,11 @@ "kind": "var", "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 96 } } @@ -3033,11 +3033,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 5 } } @@ -3047,33 +3047,33 @@ "properties": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 8 }, "end": { - "line": 15, + "line": 31, "column": 10 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 10 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 11 } } @@ -3089,11 +3089,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 5 } } @@ -3112,11 +3112,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 10 }, "end": { - "line": 16, + "line": 32, "column": 11 } } @@ -3126,11 +3126,11 @@ "value": 5, "loc": { "start": { - "line": 16, + "line": 32, "column": 13 }, "end": { - "line": 16, + "line": 32, "column": 14 } } @@ -3138,11 +3138,11 @@ "kind": "init", "loc": { "start": { - "line": 16, + "line": 32, "column": 10 }, "end": { - "line": 16, + "line": 32, "column": 14 } } @@ -3150,33 +3150,33 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 8 }, "end": { - "line": 16, + "line": 32, "column": 16 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 16 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 17 } } @@ -3192,11 +3192,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 5 } } @@ -3215,25 +3215,25 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 10 }, "end": { - "line": 17, + "line": 33, "column": 11 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 17, + "line": 33, "column": 13 }, "end": { - "line": 17, + "line": 33, "column": 18 } } @@ -3241,11 +3241,11 @@ "kind": "init", "loc": { "start": { - "line": 17, + "line": 33, "column": 10 }, "end": { - "line": 17, + "line": 33, "column": 18 } } @@ -3261,11 +3261,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 20 }, "end": { - "line": 17, + "line": 33, "column": 21 } } @@ -3275,11 +3275,11 @@ "value": 5, "loc": { "start": { - "line": 17, + "line": 33, "column": 23 }, "end": { - "line": 17, + "line": 33, "column": 24 } } @@ -3287,11 +3287,11 @@ "kind": "init", "loc": { "start": { - "line": 17, + "line": 33, "column": 20 }, "end": { - "line": 17, + "line": 33, "column": 24 } } @@ -3299,33 +3299,33 @@ ], "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 26 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 26 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 27 } } @@ -3341,11 +3341,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 5 } } @@ -3364,11 +3364,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 10 }, "end": { - "line": 18, + "line": 34, "column": 11 } } @@ -3378,11 +3378,11 @@ "value": true, "loc": { "start": { - "line": 18, + "line": 34, "column": 13 }, "end": { - "line": 18, + "line": 34, "column": 17 } } @@ -3390,11 +3390,11 @@ "kind": "init", "loc": { "start": { - "line": 18, + "line": 34, "column": 10 }, "end": { - "line": 18, + "line": 34, "column": 17 } } @@ -3410,25 +3410,25 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 19 }, "end": { - "line": 18, + "line": 34, "column": 20 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 18, + "line": 34, "column": 22 }, "end": { - "line": 18, + "line": 34, "column": 27 } } @@ -3436,11 +3436,11 @@ "kind": "init", "loc": { "start": { - "line": 18, + "line": 34, "column": 19 }, "end": { - "line": 18, + "line": 34, "column": 27 } } @@ -3456,11 +3456,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 29 }, "end": { - "line": 18, + "line": 34, "column": 30 } } @@ -3470,11 +3470,11 @@ "value": 5, "loc": { "start": { - "line": 18, + "line": 34, "column": 32 }, "end": { - "line": 18, + "line": 34, "column": 33 } } @@ -3482,11 +3482,11 @@ "kind": "init", "loc": { "start": { - "line": 18, + "line": 34, "column": 29 }, "end": { - "line": 18, + "line": 34, "column": 33 } } @@ -3494,33 +3494,33 @@ ], "loc": { "start": { - "line": 18, + "line": 34, "column": 8 }, "end": { - "line": 18, + "line": 34, "column": 35 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 35 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 36 } } @@ -3536,11 +3536,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 9 } } @@ -3556,22 +3556,22 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 17 }, "end": { - "line": 20, + "line": 36, "column": 21 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 14 }, "end": { - "line": 20, + "line": 36, "column": 21 } } @@ -3579,22 +3579,22 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 12 }, "end": { - "line": 20, + "line": 36, "column": 23 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 23 } } @@ -3603,11 +3603,11 @@ "kind": "var", "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 24 } } @@ -3623,11 +3623,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 5 } } @@ -3638,33 +3638,33 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 8 }, "end": { - "line": 21, + "line": 37, "column": 12 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 12 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 13 } } @@ -3680,11 +3680,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 5 } } @@ -3703,11 +3703,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 10 }, "end": { - "line": 22, + "line": 38, "column": 11 } } @@ -3728,11 +3728,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 26 }, "end": { - "line": 22, + "line": 38, "column": 32 } } @@ -3740,11 +3740,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 23 }, "end": { - "line": 22, + "line": 38, "column": 24 } } @@ -3756,11 +3756,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 37 }, "end": { - "line": 22, + "line": 38, "column": 43 } } @@ -3768,11 +3768,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 34 }, "end": { - "line": 22, + "line": 38, "column": 35 } } @@ -3782,11 +3782,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 46 }, "end": { - "line": 22, + "line": 38, "column": 52 } } @@ -3801,22 +3801,22 @@ "value": 12, "loc": { "start": { - "line": 22, + "line": 38, "column": 62 }, "end": { - "line": 22, + "line": 38, "column": 64 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 55 }, "end": { - "line": 22, + "line": 38, "column": 65 } } @@ -3824,33 +3824,33 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 53 }, "end": { - "line": 22, + "line": 38, "column": 67 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 13 }, "end": { - "line": 22, + "line": 38, "column": 67 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 13 }, "end": { - "line": 22, + "line": 38, "column": 67 } } @@ -3858,11 +3858,11 @@ "kind": "init", "loc": { "start": { - "line": 22, + "line": 38, "column": 10 }, "end": { - "line": 22, + "line": 38, "column": 67 } } @@ -3878,11 +3878,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 69 }, "end": { - "line": 22, + "line": 38, "column": 70 } } @@ -3906,22 +3906,22 @@ "value": true, "loc": { "start": { - "line": 22, + "line": 38, "column": 93 }, "end": { - "line": 22, + "line": 38, "column": 97 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 86 }, "end": { - "line": 22, + "line": 38, "column": 97 } } @@ -3929,33 +3929,33 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 84 }, "end": { - "line": 22, + "line": 38, "column": 99 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 72 }, "end": { - "line": 22, + "line": 38, "column": 99 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 72 }, "end": { - "line": 22, + "line": 38, "column": 99 } } @@ -3963,11 +3963,11 @@ "kind": "init", "loc": { "start": { - "line": 22, + "line": 38, "column": 69 }, "end": { - "line": 22, + "line": 38, "column": 99 } } @@ -3975,181 +3975,37 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 8 }, "end": { - "line": 22, + "line": 38, "column": 101 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 101 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 102 } } }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSLiteralType", - "literal": { - "type": "NumberLiteral", - "value": 5, - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 9 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 24, - "column": 10 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "typeAnnotation": { - "type": "TSLiteralType", - "literal": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "decorators": [], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "init": null, - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 6 - } - } - } - ], - "kind": "var", - "loc": { - "start": { - "line": 25, - "column": 1 - }, - "end": { - "line": 25, - "column": 14 - } - } - }, { "type": "VariableDeclaration", "declarations": [ @@ -4163,21 +4019,20 @@ "members": [ { "type": "TSPropertySignature", - "computed": true, + "computed": false, "optional": false, "readonly": false, "key": { - "type": "Identifier", - "name": "a", - "decorators": [], + "type": "NumberLiteral", + "value": 5, "loc": { "start": { - "line": 26, - "column": 14 + "line": 40, + "column": 13 }, "end": { - "line": 26, - "column": 15 + "line": 40, + "column": 14 } } }, @@ -4185,43 +4040,42 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 26, - "column": 18 + "line": 40, + "column": 16 }, "end": { - "line": 26, - "column": 24 + "line": 40, + "column": 22 } } }, "loc": { "start": { - "line": 26, + "line": 40, "column": 13 }, "end": { - "line": 26, - "column": 25 + "line": 40, + "column": 23 } } }, { "type": "TSPropertySignature", - "computed": true, + "computed": false, "optional": false, "readonly": false, "key": { - "type": "Identifier", - "name": "b", - "decorators": [], + "type": "StringLiteral", + "value": "foo", "loc": { "start": { - "line": 26, - "column": 27 + "line": 40, + "column": 24 }, "end": { - "line": 26, - "column": 28 + "line": 40, + "column": 29 } } }, @@ -4229,22 +4083,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 26, + "line": 40, "column": 31 }, "end": { - "line": 26, + "line": 40, "column": 37 } } }, "loc": { "start": { - "line": 26, - "column": 26 + "line": 40, + "column": 24 }, "end": { - "line": 26, + "line": 40, "column": 39 } } @@ -4252,11 +4106,11 @@ ], "loc": { "start": { - "line": 26, + "line": 40, "column": 11 }, "end": { - "line": 26, + "line": 40, "column": 39 } } @@ -4264,11 +4118,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 40, "column": 5 }, "end": { - "line": 26, + "line": 40, "column": 9 } } @@ -4286,11 +4140,11 @@ "value": 5, "loc": { "start": { - "line": 26, + "line": 40, "column": 44 }, "end": { - "line": 26, + "line": 40, "column": 45 } } @@ -4300,11 +4154,11 @@ "value": 5, "loc": { "start": { - "line": 26, + "line": 40, "column": 47 }, "end": { - "line": 26, + "line": 40, "column": 48 } } @@ -4312,11 +4166,11 @@ "kind": "init", "loc": { "start": { - "line": 26, + "line": 40, "column": 44 }, "end": { - "line": 26, + "line": 40, "column": 48 } } @@ -4328,28 +4182,28 @@ "computed": false, "key": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 26, + "line": 40, "column": 50 }, "end": { - "line": 26, + "line": 40, "column": 55 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 26, + "line": 40, "column": 57 }, "end": { - "line": 26, + "line": 40, "column": 62 } } @@ -4357,11 +4211,11 @@ "kind": "init", "loc": { "start": { - "line": 26, + "line": 40, "column": 50 }, "end": { - "line": 26, + "line": 40, "column": 62 } } @@ -4369,22 +4223,22 @@ ], "loc": { "start": { - "line": 26, + "line": 40, "column": 42 }, "end": { - "line": 26, + "line": 40, "column": 64 } } }, "loc": { "start": { - "line": 26, + "line": 40, "column": 5 }, "end": { - "line": 26, + "line": 40, "column": 64 } } @@ -4393,11 +4247,11 @@ "kind": "var", "loc": { "start": { - "line": 26, + "line": 40, "column": 1 }, "end": { - "line": 26, + "line": 40, "column": 65 } } @@ -4414,11 +4268,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 28, + "line": 42, "column": 8 }, "end": { - "line": 28, + "line": 42, "column": 14 } } @@ -4426,11 +4280,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 42, "column": 5 }, "end": { - "line": 28, + "line": 42, "column": 6 } } @@ -4438,11 +4292,11 @@ "init": null, "loc": { "start": { - "line": 28, + "line": 42, "column": 5 }, "end": { - "line": 28, + "line": 42, "column": 6 } } @@ -4451,11 +4305,11 @@ "kind": "var", "loc": { "start": { - "line": 28, + "line": 42, "column": 1 }, "end": { - "line": 28, + "line": 42, "column": 15 } } @@ -4472,11 +4326,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 29, + "line": 43, "column": 8 }, "end": { - "line": 29, + "line": 43, "column": 14 } } @@ -4484,11 +4338,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 43, "column": 5 }, "end": { - "line": 29, + "line": 43, "column": 6 } } @@ -4496,11 +4350,11 @@ "init": null, "loc": { "start": { - "line": 29, + "line": 43, "column": 5 }, "end": { - "line": 29, + "line": 43, "column": 6 } } @@ -4509,11 +4363,11 @@ "kind": "var", "loc": { "start": { - "line": 29, + "line": 43, "column": 1 }, "end": { - "line": 29, + "line": 43, "column": 15 } } @@ -4538,11 +4392,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 30, + "line": 44, "column": 18 }, "end": { - "line": 30, + "line": 44, "column": 24 } } @@ -4550,11 +4404,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 44, "column": 15 }, "end": { - "line": 30, + "line": 44, "column": 16 } } @@ -4563,11 +4417,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 30, + "line": 44, "column": 27 }, "end": { - "line": 30, + "line": 44, "column": 33 } } @@ -4575,11 +4429,11 @@ "readonly": false, "loc": { "start": { - "line": 30, + "line": 44, "column": 14 }, "end": { - "line": 30, + "line": 44, "column": 34 } } @@ -4593,11 +4447,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 30, + "line": 44, "column": 39 }, "end": { - "line": 30, + "line": 44, "column": 45 } } @@ -4605,11 +4459,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 44, "column": 36 }, "end": { - "line": 30, + "line": 44, "column": 37 } } @@ -4618,11 +4472,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 30, + "line": 44, "column": 48 }, "end": { - "line": 30, + "line": 44, "column": 54 } } @@ -4630,11 +4484,11 @@ "readonly": false, "loc": { "start": { - "line": 30, + "line": 44, "column": 35 }, "end": { - "line": 30, + "line": 44, "column": 56 } } @@ -4642,11 +4496,11 @@ ], "loc": { "start": { - "line": 30, + "line": 44, "column": 12 }, "end": { - "line": 30, + "line": 44, "column": 56 } } @@ -4654,11 +4508,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 44, "column": 5 }, "end": { - "line": 30, + "line": 44, "column": 10 } } @@ -4677,11 +4531,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 44, "column": 62 }, "end": { - "line": 30, + "line": 44, "column": 63 } } @@ -4691,11 +4545,11 @@ "value": 1, "loc": { "start": { - "line": 30, + "line": 44, "column": 66 }, "end": { - "line": 30, + "line": 44, "column": 67 } } @@ -4703,11 +4557,11 @@ "kind": "init", "loc": { "start": { - "line": 30, + "line": 44, "column": 61 }, "end": { - "line": 30, + "line": 44, "column": 67 } } @@ -4723,11 +4577,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 44, "column": 70 }, "end": { - "line": 30, + "line": 44, "column": 71 } } @@ -4737,11 +4591,11 @@ "value": 2, "loc": { "start": { - "line": 30, + "line": 44, "column": 74 }, "end": { - "line": 30, + "line": 44, "column": 75 } } @@ -4749,11 +4603,11 @@ "kind": "init", "loc": { "start": { - "line": 30, + "line": 44, "column": 69 }, "end": { - "line": 30, + "line": 44, "column": 75 } } @@ -4761,22 +4615,22 @@ ], "loc": { "start": { - "line": 30, + "line": 44, "column": 59 }, "end": { - "line": 30, + "line": 44, "column": 77 } } }, "loc": { "start": { - "line": 30, + "line": 44, "column": 5 }, "end": { - "line": 30, + "line": 44, "column": 77 } } @@ -4785,11 +4639,11 @@ "kind": "var", "loc": { "start": { - "line": 30, + "line": 44, "column": 1 }, "end": { - "line": 30, + "line": 44, "column": 78 } } @@ -4805,11 +4659,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 46, "column": 5 }, "end": { - "line": 32, + "line": 46, "column": 10 } } @@ -4827,11 +4681,11 @@ "value": 5, "loc": { "start": { - "line": 32, + "line": 46, "column": 19 }, "end": { - "line": 32, + "line": 46, "column": 20 } } @@ -4855,22 +4709,22 @@ "value": 5, "loc": { "start": { - "line": 32, + "line": 46, "column": 32 }, "end": { - "line": 32, + "line": 46, "column": 33 } } }, "loc": { "start": { - "line": 32, + "line": 46, "column": 25 }, "end": { - "line": 32, + "line": 46, "column": 34 } } @@ -4878,33 +4732,33 @@ ], "loc": { "start": { - "line": 32, + "line": 46, "column": 23 }, "end": { - "line": 32, + "line": 46, "column": 36 } } }, "loc": { "start": { - "line": 32, + "line": 46, "column": 20 }, "end": { - "line": 32, + "line": 46, "column": 36 } } }, "loc": { "start": { - "line": 32, + "line": 46, "column": 20 }, "end": { - "line": 32, + "line": 46, "column": 36 } } @@ -4912,11 +4766,11 @@ "kind": "get", "loc": { "start": { - "line": 32, + "line": 46, "column": 15 }, "end": { - "line": 32, + "line": 46, "column": 36 } } @@ -4928,14 +4782,14 @@ "computed": false, "key": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 32, + "line": 46, "column": 42 }, "end": { - "line": 32, + "line": 46, "column": 47 } } @@ -4952,14 +4806,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 46, + "column": 51 + }, + "end": { + "line": 46, + "column": 54 + } + } + }, "decorators": [], "loc": { "start": { - "line": 32, + "line": 46, "column": 48 }, "end": { - "line": 32, + "line": 46, "column": 49 } } @@ -4970,69 +4837,69 @@ "statements": [], "loc": { "start": { - "line": 32, - "column": 51 + "line": 46, + "column": 56 }, "end": { - "line": 32, - "column": 54 + "line": 46, + "column": 59 } } }, "loc": { "start": { - "line": 32, + "line": 46, "column": 47 }, "end": { - "line": 32, - "column": 54 + "line": 46, + "column": 59 } } }, "loc": { "start": { - "line": 32, + "line": 46, "column": 47 }, "end": { - "line": 32, - "column": 54 + "line": 46, + "column": 59 } } }, "kind": "set", "loc": { "start": { - "line": 32, + "line": 46, "column": 38 }, "end": { - "line": 32, - "column": 54 + "line": 46, + "column": 59 } } } ], "loc": { "start": { - "line": 32, + "line": 46, "column": 13 }, "end": { - "line": 32, - "column": 56 + "line": 46, + "column": 61 } } }, "loc": { "start": { - "line": 32, + "line": 46, "column": 5 }, "end": { - "line": 32, - "column": 56 + "line": 46, + "column": 61 } } } @@ -5040,12 +4907,12 @@ "kind": "var", "loc": { "start": { - "line": 32, + "line": 46, "column": 1 }, "end": { - "line": 32, - "column": 57 + "line": 46, + "column": 62 } } }, @@ -5060,11 +4927,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 47, "column": 1 }, "end": { - "line": 33, + "line": 47, "column": 5 } } @@ -5075,33 +4942,33 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 47, "column": 8 }, "end": { - "line": 33, + "line": 47, "column": 13 } } }, "loc": { "start": { - "line": 33, + "line": 47, "column": 1 }, "end": { - "line": 33, + "line": 47, "column": 13 } } }, "loc": { "start": { - "line": 33, + "line": 47, "column": 1 }, "end": { - "line": 33, + "line": 47, "column": 14 } } @@ -5128,11 +4995,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 49, "column": 14 }, "end": { - "line": 35, + "line": 49, "column": 15 } } @@ -5141,22 +5008,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 35, + "line": 49, "column": 18 }, "end": { - "line": 35, + "line": 49, "column": 24 } } }, "loc": { "start": { - "line": 35, + "line": 49, "column": 14 }, "end": { - "line": 35, + "line": 49, "column": 25 } } @@ -5172,11 +5039,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 49, "column": 26 }, "end": { - "line": 35, + "line": 49, "column": 27 } } @@ -5185,22 +5052,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 35, + "line": 49, "column": 30 }, "end": { - "line": 35, + "line": 49, "column": 36 } } }, "loc": { "start": { - "line": 35, + "line": 49, "column": 26 }, "end": { - "line": 35, + "line": 49, "column": 37 } } @@ -5216,11 +5083,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 49, "column": 38 }, "end": { - "line": 35, + "line": 49, "column": 39 } } @@ -5229,22 +5096,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 35, + "line": 49, "column": 42 }, "end": { - "line": 35, + "line": 49, "column": 49 } } }, "loc": { "start": { - "line": 35, + "line": 49, "column": 38 }, "end": { - "line": 35, + "line": 49, "column": 51 } } @@ -5252,11 +5119,11 @@ ], "loc": { "start": { - "line": 35, + "line": 49, "column": 12 }, "end": { - "line": 35, + "line": 49, "column": 51 } } @@ -5264,11 +5131,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 49, "column": 5 }, "end": { - "line": 35, + "line": 49, "column": 10 } } @@ -5276,11 +5143,11 @@ "init": null, "loc": { "start": { - "line": 35, + "line": 49, "column": 5 }, "end": { - "line": 35, + "line": 49, "column": 10 } } @@ -5289,11 +5156,11 @@ "kind": "var", "loc": { "start": { - "line": 35, + "line": 49, "column": 1 }, "end": { - "line": 35, + "line": 49, "column": 52 } } @@ -5309,11 +5176,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 50, "column": 1 }, "end": { - "line": 36, + "line": 50, "column": 6 } } @@ -5323,33 +5190,33 @@ "properties": [], "loc": { "start": { - "line": 36, + "line": 50, "column": 9 }, "end": { - "line": 36, + "line": 50, "column": 11 } } }, "loc": { "start": { - "line": 36, + "line": 50, "column": 1 }, "end": { - "line": 36, + "line": 50, "column": 11 } } }, "loc": { "start": { - "line": 36, + "line": 50, "column": 1 }, "end": { - "line": 36, + "line": 50, "column": 12 } } @@ -5365,11 +5232,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 51, "column": 1 }, "end": { - "line": 37, + "line": 51, "column": 6 } } @@ -5388,11 +5255,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 51, "column": 11 }, "end": { - "line": 37, + "line": 51, "column": 12 } } @@ -5402,11 +5269,11 @@ "value": 5, "loc": { "start": { - "line": 37, + "line": 51, "column": 14 }, "end": { - "line": 37, + "line": 51, "column": 15 } } @@ -5414,11 +5281,11 @@ "kind": "init", "loc": { "start": { - "line": 37, + "line": 51, "column": 11 }, "end": { - "line": 37, + "line": 51, "column": 15 } } @@ -5426,33 +5293,33 @@ ], "loc": { "start": { - "line": 37, + "line": 51, "column": 9 }, "end": { - "line": 37, + "line": 51, "column": 17 } } }, "loc": { "start": { - "line": 37, + "line": 51, "column": 1 }, "end": { - "line": 37, + "line": 51, "column": 17 } } }, "loc": { "start": { - "line": 37, + "line": 51, "column": 1 }, "end": { - "line": 37, + "line": 51, "column": 18 } } @@ -5468,11 +5335,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 52, "column": 1 }, "end": { - "line": 38, + "line": 52, "column": 6 } } @@ -5491,11 +5358,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 52, "column": 11 }, "end": { - "line": 38, + "line": 52, "column": 12 } } @@ -5505,11 +5372,11 @@ "value": 5, "loc": { "start": { - "line": 38, + "line": 52, "column": 14 }, "end": { - "line": 38, + "line": 52, "column": 15 } } @@ -5517,11 +5384,11 @@ "kind": "init", "loc": { "start": { - "line": 38, + "line": 52, "column": 11 }, "end": { - "line": 38, + "line": 52, "column": 15 } } @@ -5537,25 +5404,25 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 52, "column": 17 }, "end": { - "line": 38, + "line": 52, "column": 18 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 38, + "line": 52, "column": 20 }, "end": { - "line": 38, + "line": 52, "column": 25 } } @@ -5563,11 +5430,11 @@ "kind": "init", "loc": { "start": { - "line": 38, + "line": 52, "column": 17 }, "end": { - "line": 38, + "line": 52, "column": 25 } } @@ -5575,33 +5442,33 @@ ], "loc": { "start": { - "line": 38, + "line": 52, "column": 9 }, "end": { - "line": 38, + "line": 52, "column": 27 } } }, "loc": { "start": { - "line": 38, + "line": 52, "column": 1 }, "end": { - "line": 38, + "line": 52, "column": 27 } } }, "loc": { "start": { - "line": 38, + "line": 52, "column": 1 }, "end": { - "line": 38, + "line": 52, "column": 28 } } @@ -5617,11 +5484,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 53, "column": 1 }, "end": { - "line": 39, + "line": 53, "column": 6 } } @@ -5640,25 +5507,25 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 53, "column": 11 }, "end": { - "line": 39, + "line": 53, "column": 12 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 39, + "line": 53, "column": 14 }, "end": { - "line": 39, + "line": 53, "column": 19 } } @@ -5666,11 +5533,11 @@ "kind": "init", "loc": { "start": { - "line": 39, + "line": 53, "column": 11 }, "end": { - "line": 39, + "line": 53, "column": 19 } } @@ -5678,33 +5545,33 @@ ], "loc": { "start": { - "line": 39, + "line": 53, "column": 9 }, "end": { - "line": 39, + "line": 53, "column": 21 } } }, "loc": { "start": { - "line": 39, + "line": 53, "column": 1 }, "end": { - "line": 39, + "line": 53, "column": 21 } } }, "loc": { "start": { - "line": 39, + "line": 53, "column": 1 }, "end": { - "line": 39, + "line": 53, "column": 22 } } @@ -5720,11 +5587,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 54, "column": 1 }, "end": { - "line": 40, + "line": 54, "column": 6 } } @@ -5743,25 +5610,25 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 54, "column": 11 }, "end": { - "line": 40, + "line": 54, "column": 12 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 40, + "line": 54, "column": 14 }, "end": { - "line": 40, + "line": 54, "column": 19 } } @@ -5769,11 +5636,11 @@ "kind": "init", "loc": { "start": { - "line": 40, + "line": 54, "column": 11 }, "end": { - "line": 40, + "line": 54, "column": 19 } } @@ -5789,11 +5656,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 54, "column": 21 }, "end": { - "line": 40, + "line": 54, "column": 22 } } @@ -5803,11 +5670,11 @@ "value": 5, "loc": { "start": { - "line": 40, + "line": 54, "column": 24 }, "end": { - "line": 40, + "line": 54, "column": 25 } } @@ -5815,11 +5682,11 @@ "kind": "init", "loc": { "start": { - "line": 40, + "line": 54, "column": 21 }, "end": { - "line": 40, + "line": 54, "column": 25 } } @@ -5827,33 +5694,33 @@ ], "loc": { "start": { - "line": 40, + "line": 54, "column": 9 }, "end": { - "line": 40, + "line": 54, "column": 27 } } }, "loc": { "start": { - "line": 40, + "line": 54, "column": 1 }, "end": { - "line": 40, + "line": 54, "column": 27 } } }, "loc": { "start": { - "line": 40, + "line": 54, "column": 1 }, "end": { - "line": 40, + "line": 54, "column": 28 } } @@ -5869,11 +5736,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 55, "column": 1 }, "end": { - "line": 41, + "line": 55, "column": 6 } } @@ -5892,11 +5759,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 55, "column": 11 }, "end": { - "line": 41, + "line": 55, "column": 12 } } @@ -5906,11 +5773,11 @@ "value": 5, "loc": { "start": { - "line": 41, + "line": 55, "column": 14 }, "end": { - "line": 41, + "line": 55, "column": 15 } } @@ -5918,11 +5785,11 @@ "kind": "init", "loc": { "start": { - "line": 41, + "line": 55, "column": 11 }, "end": { - "line": 41, + "line": 55, "column": 15 } } @@ -5938,11 +5805,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 55, "column": 17 }, "end": { - "line": 41, + "line": 55, "column": 18 } } @@ -5952,11 +5819,11 @@ "value": true, "loc": { "start": { - "line": 41, + "line": 55, "column": 20 }, "end": { - "line": 41, + "line": 55, "column": 24 } } @@ -5964,11 +5831,11 @@ "kind": "init", "loc": { "start": { - "line": 41, + "line": 55, "column": 17 }, "end": { - "line": 41, + "line": 55, "column": 24 } } @@ -5976,33 +5843,33 @@ ], "loc": { "start": { - "line": 41, + "line": 55, "column": 9 }, "end": { - "line": 41, + "line": 55, "column": 26 } } }, "loc": { "start": { - "line": 41, + "line": 55, "column": 1 }, "end": { - "line": 41, + "line": 55, "column": 26 } } }, "loc": { "start": { - "line": 41, + "line": 55, "column": 1 }, "end": { - "line": 41, + "line": 55, "column": 27 } } @@ -6018,11 +5885,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 56, "column": 1 }, "end": { - "line": 42, + "line": 56, "column": 6 } } @@ -6041,11 +5908,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 56, "column": 11 }, "end": { - "line": 42, + "line": 56, "column": 12 } } @@ -6055,11 +5922,11 @@ "value": false, "loc": { "start": { - "line": 42, + "line": 56, "column": 14 }, "end": { - "line": 42, + "line": 56, "column": 19 } } @@ -6067,11 +5934,11 @@ "kind": "init", "loc": { "start": { - "line": 42, + "line": 56, "column": 11 }, "end": { - "line": 42, + "line": 56, "column": 19 } } @@ -6087,25 +5954,25 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 56, "column": 21 }, "end": { - "line": 42, + "line": 56, "column": 22 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 42, + "line": 56, "column": 24 }, "end": { - "line": 42, + "line": 56, "column": 29 } } @@ -6113,11 +5980,11 @@ "kind": "init", "loc": { "start": { - "line": 42, + "line": 56, "column": 21 }, "end": { - "line": 42, + "line": 56, "column": 29 } } @@ -6125,33 +5992,33 @@ ], "loc": { "start": { - "line": 42, + "line": 56, "column": 9 }, "end": { - "line": 42, + "line": 56, "column": 31 } } }, "loc": { "start": { - "line": 42, + "line": 56, "column": 1 }, "end": { - "line": 42, + "line": 56, "column": 31 } } }, "loc": { "start": { - "line": 42, + "line": 56, "column": 1 }, "end": { - "line": 42, + "line": 56, "column": 32 } } @@ -6172,11 +6039,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 59, "column": 5 }, "end": { - "line": 45, + "line": 59, "column": 6 } } @@ -6185,22 +6052,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 45, + "line": 59, "column": 8 }, "end": { - "line": 45, + "line": 59, "column": 14 } } }, "loc": { "start": { - "line": 45, + "line": 59, "column": 5 }, "end": { - "line": 45, + "line": 59, "column": 15 } } @@ -6216,11 +6083,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 60, "column": 5 }, "end": { - "line": 46, + "line": 60, "column": 6 } } @@ -6229,22 +6096,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 46, + "line": 60, "column": 8 }, "end": { - "line": 46, + "line": 60, "column": 14 } } }, "loc": { "start": { - "line": 46, + "line": 60, "column": 5 }, "end": { - "line": 46, + "line": 60, "column": 15 } } @@ -6260,11 +6127,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 61, "column": 5 }, "end": { - "line": 47, + "line": 61, "column": 6 } } @@ -6273,22 +6140,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 47, + "line": 61, "column": 8 }, "end": { - "line": 47, + "line": 61, "column": 14 } } }, "loc": { "start": { - "line": 47, + "line": 61, "column": 5 }, "end": { - "line": 47, + "line": 61, "column": 15 } } @@ -6296,11 +6163,11 @@ ], "loc": { "start": { - "line": 44, + "line": 58, "column": 22 }, "end": { - "line": 48, + "line": 62, "column": 2 } } @@ -6311,11 +6178,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 58, "column": 11 }, "end": { - "line": 44, + "line": 58, "column": 21 } } @@ -6323,11 +6190,11 @@ "extends": [], "loc": { "start": { - "line": 44, + "line": 58, "column": 1 }, "end": { - "line": 48, + "line": 62, "column": 2 } } @@ -6348,11 +6215,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 65, "column": 5 }, "end": { - "line": 51, + "line": 65, "column": 6 } } @@ -6361,22 +6228,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 51, + "line": 65, "column": 8 }, "end": { - "line": 51, + "line": 65, "column": 14 } } }, "loc": { "start": { - "line": 51, + "line": 65, "column": 5 }, "end": { - "line": 52, + "line": 66, "column": 2 } } @@ -6384,11 +6251,11 @@ ], "loc": { "start": { - "line": 50, + "line": 64, "column": 41 }, "end": { - "line": 52, + "line": 66, "column": 2 } } @@ -6399,11 +6266,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 64, "column": 11 }, "end": { - "line": 50, + "line": 64, "column": 21 } } @@ -6412,27 +6279,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "interface1", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "interface1", + "decorators": [], + "loc": { + "start": { + "line": 64, + "column": 30 + }, + "end": { + "line": 64, + "column": 40 + } + } + }, "loc": { "start": { - "line": 50, - "column": 30 + "line": 64, + "column": 41 }, "end": { - "line": 50, + "line": 64, "column": 40 } } }, "loc": { "start": { - "line": 50, + "line": 64, "column": 41 }, "end": { - "line": 50, + "line": 64, "column": 40 } } @@ -6440,11 +6320,11 @@ ], "loc": { "start": { - "line": 50, + "line": 64, "column": 1 }, "end": { - "line": 52, + "line": 66, "column": 2 } } @@ -6465,22 +6345,22 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 68, "column": 12 }, "end": { - "line": 54, + "line": 68, "column": 22 } } }, "loc": { "start": { - "line": 54, + "line": 68, "column": 12 }, "end": { - "line": 54, + "line": 68, "column": 22 } } @@ -6488,11 +6368,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 68, "column": 5 }, "end": { - "line": 54, + "line": 68, "column": 10 } } @@ -6511,11 +6391,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 68, "column": 27 }, "end": { - "line": 54, + "line": 68, "column": 28 } } @@ -6525,11 +6405,11 @@ "value": 5, "loc": { "start": { - "line": 54, + "line": 68, "column": 30 }, "end": { - "line": 54, + "line": 68, "column": 31 } } @@ -6537,11 +6417,11 @@ "kind": "init", "loc": { "start": { - "line": 54, + "line": 68, "column": 27 }, "end": { - "line": 54, + "line": 68, "column": 31 } } @@ -6557,25 +6437,25 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 68, "column": 33 }, "end": { - "line": 54, + "line": 68, "column": 34 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 54, + "line": 68, "column": 36 }, "end": { - "line": 54, + "line": 68, "column": 41 } } @@ -6583,11 +6463,11 @@ "kind": "init", "loc": { "start": { - "line": 54, + "line": 68, "column": 33 }, "end": { - "line": 54, + "line": 68, "column": 41 } } @@ -6603,11 +6483,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 68, "column": 43 }, "end": { - "line": 54, + "line": 68, "column": 44 } } @@ -6617,11 +6497,11 @@ "value": 5, "loc": { "start": { - "line": 54, + "line": 68, "column": 46 }, "end": { - "line": 54, + "line": 68, "column": 47 } } @@ -6629,11 +6509,11 @@ "kind": "init", "loc": { "start": { - "line": 54, + "line": 68, "column": 43 }, "end": { - "line": 54, + "line": 68, "column": 47 } } @@ -6649,11 +6529,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 68, "column": 49 }, "end": { - "line": 54, + "line": 68, "column": 50 } } @@ -6663,11 +6543,11 @@ "value": 5, "loc": { "start": { - "line": 54, + "line": 68, "column": 52 }, "end": { - "line": 54, + "line": 68, "column": 53 } } @@ -6675,11 +6555,11 @@ "kind": "init", "loc": { "start": { - "line": 54, + "line": 68, "column": 49 }, "end": { - "line": 54, + "line": 68, "column": 53 } } @@ -6687,22 +6567,22 @@ ], "loc": { "start": { - "line": 54, + "line": 68, "column": 25 }, "end": { - "line": 54, + "line": 68, "column": 55 } } }, "loc": { "start": { - "line": 54, + "line": 68, "column": 5 }, "end": { - "line": 54, + "line": 68, "column": 55 } } @@ -6711,11 +6591,11 @@ "kind": "var", "loc": { "start": { - "line": 54, + "line": 68, "column": 1 }, "end": { - "line": 54, + "line": 68, "column": 56 } } @@ -6745,11 +6625,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 69, "column": 14 }, "end": { - "line": 55, + "line": 69, "column": 15 } } @@ -6763,22 +6643,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 55, + "line": 69, "column": 17 }, "end": { - "line": 55, + "line": 69, "column": 23 } } }, "loc": { "start": { - "line": 55, + "line": 69, "column": 17 }, "end": { - "line": 55, + "line": 69, "column": 25 } } @@ -6790,11 +6670,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 55, + "line": 69, "column": 29 }, "end": { - "line": 55, + "line": 69, "column": 36 } } @@ -6803,11 +6683,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 55, + "line": 69, "column": 37 }, "end": { - "line": 55, + "line": 69, "column": 44 } } @@ -6816,11 +6696,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 55, + "line": 69, "column": 45 }, "end": { - "line": 55, + "line": 69, "column": 52 } } @@ -6828,11 +6708,11 @@ ], "loc": { "start": { - "line": 55, + "line": 69, "column": 28 }, "end": { - "line": 55, + "line": 69, "column": 52 } } @@ -6840,22 +6720,22 @@ ], "loc": { "start": { - "line": 55, + "line": 69, "column": 17 }, "end": { - "line": 55, + "line": 69, "column": 52 } } }, "loc": { "start": { - "line": 55, + "line": 69, "column": 14 }, "end": { - "line": 55, + "line": 69, "column": 53 } } @@ -6870,11 +6750,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 69, "column": 54 }, "end": { - "line": 55, + "line": 69, "column": 55 } } @@ -6889,22 +6769,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 55, + "line": 69, "column": 60 }, "end": { - "line": 55, + "line": 69, "column": 66 } } }, "loc": { "start": { - "line": 55, + "line": 69, "column": 60 }, "end": { - "line": 55, + "line": 69, "column": 68 } } @@ -6912,11 +6792,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 69, "column": 57 }, "end": { - "line": 55, + "line": 69, "column": 58 } } @@ -6928,33 +6808,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 55, + "line": 69, "column": 71 }, "end": { - "line": 55, + "line": 69, "column": 77 } } }, "loc": { "start": { - "line": 55, + "line": 69, "column": 71 }, "end": { - "line": 55, + "line": 69, "column": 79 } } }, "loc": { "start": { - "line": 55, + "line": 69, "column": 54 }, "end": { - "line": 55, + "line": 69, "column": 81 } } @@ -6962,11 +6842,11 @@ ], "loc": { "start": { - "line": 55, + "line": 69, "column": 12 }, "end": { - "line": 55, + "line": 69, "column": 81 } } @@ -6979,22 +6859,22 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 69, "column": 84 }, "end": { - "line": 55, + "line": 69, "column": 94 } } }, "loc": { "start": { - "line": 55, + "line": 69, "column": 84 }, "end": { - "line": 55, + "line": 69, "column": 94 } } @@ -7002,11 +6882,11 @@ ], "loc": { "start": { - "line": 55, + "line": 69, "column": 12 }, "end": { - "line": 55, + "line": 69, "column": 94 } } @@ -7014,11 +6894,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 69, "column": 5 }, "end": { - "line": 55, + "line": 69, "column": 10 } } @@ -7026,11 +6906,11 @@ "init": null, "loc": { "start": { - "line": 55, + "line": 69, "column": 5 }, "end": { - "line": 55, + "line": 69, "column": 10 } } @@ -7039,11 +6919,11 @@ "kind": "var", "loc": { "start": { - "line": 55, + "line": 69, "column": 1 }, "end": { - "line": 55, + "line": 69, "column": 95 } } @@ -7059,11 +6939,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 70, "column": 1 }, "end": { - "line": 56, + "line": 70, "column": 6 } } @@ -7074,33 +6954,33 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 70, "column": 9 }, "end": { - "line": 56, + "line": 70, "column": 14 } } }, "loc": { "start": { - "line": 56, + "line": 70, "column": 1 }, "end": { - "line": 56, + "line": 70, "column": 14 } } }, "loc": { "start": { - "line": 56, + "line": 70, "column": 1 }, "end": { - "line": 56, + "line": 70, "column": 15 } } @@ -7116,11 +6996,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 71, "column": 1 }, "end": { - "line": 57, + "line": 71, "column": 6 } } @@ -7139,11 +7019,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 71, "column": 11 }, "end": { - "line": 57, + "line": 71, "column": 12 } } @@ -7153,11 +7033,11 @@ "value": 5, "loc": { "start": { - "line": 57, + "line": 71, "column": 14 }, "end": { - "line": 57, + "line": 71, "column": 15 } } @@ -7165,11 +7045,11 @@ "kind": "init", "loc": { "start": { - "line": 57, + "line": 71, "column": 11 }, "end": { - "line": 57, + "line": 71, "column": 15 } } @@ -7185,25 +7065,25 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 71, "column": 17 }, "end": { - "line": 57, + "line": 71, "column": 18 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 57, + "line": 71, "column": 20 }, "end": { - "line": 57, + "line": 71, "column": 25 } } @@ -7211,11 +7091,11 @@ "kind": "init", "loc": { "start": { - "line": 57, + "line": 71, "column": 17 }, "end": { - "line": 57, + "line": 71, "column": 25 } } @@ -7231,11 +7111,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 71, "column": 27 }, "end": { - "line": 57, + "line": 71, "column": 28 } } @@ -7245,11 +7125,11 @@ "value": 5, "loc": { "start": { - "line": 57, + "line": 71, "column": 30 }, "end": { - "line": 57, + "line": 71, "column": 31 } } @@ -7257,11 +7137,11 @@ "kind": "init", "loc": { "start": { - "line": 57, + "line": 71, "column": 27 }, "end": { - "line": 57, + "line": 71, "column": 31 } } @@ -7277,11 +7157,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 71, "column": 33 }, "end": { - "line": 57, + "line": 71, "column": 34 } } @@ -7291,11 +7171,11 @@ "value": 5, "loc": { "start": { - "line": 57, + "line": 71, "column": 36 }, "end": { - "line": 57, + "line": 71, "column": 37 } } @@ -7303,11 +7183,11 @@ "kind": "init", "loc": { "start": { - "line": 57, + "line": 71, "column": 33 }, "end": { - "line": 57, + "line": 71, "column": 37 } } @@ -7315,33 +7195,33 @@ ], "loc": { "start": { - "line": 57, + "line": 71, "column": 9 }, "end": { - "line": 57, + "line": 71, "column": 39 } } }, "loc": { "start": { - "line": 57, + "line": 71, "column": 1 }, "end": { - "line": 57, + "line": 71, "column": 39 } } }, "loc": { "start": { - "line": 57, + "line": 71, "column": 1 }, "end": { - "line": 57, + "line": 71, "column": 40 } } @@ -7357,11 +7237,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 72, "column": 1 }, "end": { - "line": 58, + "line": 72, "column": 6 } } @@ -7380,11 +7260,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 72, "column": 11 }, "end": { - "line": 58, + "line": 72, "column": 12 } } @@ -7397,11 +7277,11 @@ "value": 1, "loc": { "start": { - "line": 58, + "line": 72, "column": 15 }, "end": { - "line": 58, + "line": 72, "column": 16 } } @@ -7411,11 +7291,11 @@ "value": 2, "loc": { "start": { - "line": 58, + "line": 72, "column": 18 }, "end": { - "line": 58, + "line": 72, "column": 19 } } @@ -7425,11 +7305,11 @@ "value": 3, "loc": { "start": { - "line": 58, + "line": 72, "column": 21 }, "end": { - "line": 58, + "line": 72, "column": 22 } } @@ -7437,11 +7317,11 @@ ], "loc": { "start": { - "line": 58, + "line": 72, "column": 14 }, "end": { - "line": 58, + "line": 72, "column": 23 } } @@ -7449,11 +7329,11 @@ "kind": "init", "loc": { "start": { - "line": 58, + "line": 72, "column": 11 }, "end": { - "line": 58, + "line": 72, "column": 23 } } @@ -7461,33 +7341,33 @@ ], "loc": { "start": { - "line": 58, + "line": 72, "column": 9 }, "end": { - "line": 58, + "line": 72, "column": 25 } } }, "loc": { "start": { - "line": 58, + "line": 72, "column": 1 }, "end": { - "line": 58, + "line": 72, "column": 25 } } }, "loc": { "start": { - "line": 58, + "line": 72, "column": 1 }, "end": { - "line": 58, + "line": 72, "column": 26 } } @@ -7503,11 +7383,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 73, "column": 1 }, "end": { - "line": 59, + "line": 73, "column": 6 } } @@ -7526,11 +7406,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 73, "column": 11 }, "end": { - "line": 59, + "line": 73, "column": 12 } } @@ -7540,42 +7420,42 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 59, + "line": 73, "column": 15 }, "end": { - "line": 59, + "line": 73, "column": 20 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 59, + "line": 73, "column": 22 }, "end": { - "line": 59, + "line": 73, "column": 27 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 59, + "line": 73, "column": 29 }, "end": { - "line": 59, + "line": 73, "column": 34 } } @@ -7583,11 +7463,11 @@ ], "loc": { "start": { - "line": 59, + "line": 73, "column": 14 }, "end": { - "line": 59, + "line": 73, "column": 35 } } @@ -7595,11 +7475,11 @@ "kind": "init", "loc": { "start": { - "line": 59, + "line": 73, "column": 11 }, "end": { - "line": 59, + "line": 73, "column": 35 } } @@ -7607,33 +7487,33 @@ ], "loc": { "start": { - "line": 59, + "line": 73, "column": 9 }, "end": { - "line": 59, + "line": 73, "column": 37 } } }, "loc": { "start": { - "line": 59, + "line": 73, "column": 1 }, "end": { - "line": 59, + "line": 73, "column": 37 } } }, "loc": { "start": { - "line": 59, + "line": 73, "column": 1 }, "end": { - "line": 59, + "line": 73, "column": 38 } } @@ -7649,11 +7529,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 74, "column": 1 }, "end": { - "line": 60, + "line": 74, "column": 6 } } @@ -7672,11 +7552,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 74, "column": 11 }, "end": { - "line": 60, + "line": 74, "column": 12 } } @@ -7686,42 +7566,42 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 60, + "line": 74, "column": 15 }, "end": { - "line": 60, + "line": 74, "column": 20 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 60, + "line": 74, "column": 22 }, "end": { - "line": 60, + "line": 74, "column": 27 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 60, + "line": 74, "column": 29 }, "end": { - "line": 60, + "line": 74, "column": 34 } } @@ -7729,11 +7609,11 @@ ], "loc": { "start": { - "line": 60, + "line": 74, "column": 14 }, "end": { - "line": 60, + "line": 74, "column": 35 } } @@ -7741,11 +7621,11 @@ "kind": "init", "loc": { "start": { - "line": 60, + "line": 74, "column": 11 }, "end": { - "line": 60, + "line": 74, "column": 35 } } @@ -7761,11 +7641,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 74, "column": 37 }, "end": { - "line": 60, + "line": 74, "column": 38 } } @@ -7790,33 +7670,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 60, + "line": 74, "column": 54 }, "end": { - "line": 60, + "line": 74, "column": 60 } } }, "loc": { "start": { - "line": 60, + "line": 74, "column": 54 }, "end": { - "line": 60, + "line": 74, "column": 62 } } }, "loc": { "start": { - "line": 60, + "line": 74, "column": 53 }, "end": { - "line": 60, + "line": 74, "column": 63 } } @@ -7824,11 +7704,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 74, "column": 50 }, "end": { - "line": 60, + "line": 74, "column": 51 } } @@ -7844,42 +7724,42 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 60, + "line": 74, "column": 75 }, "end": { - "line": 60, + "line": 74, "column": 80 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 60, + "line": 74, "column": 82 }, "end": { - "line": 60, + "line": 74, "column": 87 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 60, + "line": 74, "column": 89 }, "end": { - "line": 60, + "line": 74, "column": 94 } } @@ -7887,22 +7767,22 @@ ], "loc": { "start": { - "line": 60, + "line": 74, "column": 74 }, "end": { - "line": 60, + "line": 74, "column": 95 } } }, "loc": { "start": { - "line": 60, + "line": 74, "column": 67 }, "end": { - "line": 60, + "line": 74, "column": 95 } } @@ -7910,33 +7790,33 @@ ], "loc": { "start": { - "line": 60, + "line": 74, "column": 65 }, "end": { - "line": 60, + "line": 74, "column": 97 } } }, "loc": { "start": { - "line": 60, + "line": 74, "column": 40 }, "end": { - "line": 60, + "line": 74, "column": 97 } } }, "loc": { "start": { - "line": 60, + "line": 74, "column": 40 }, "end": { - "line": 60, + "line": 74, "column": 97 } } @@ -7944,11 +7824,11 @@ "kind": "init", "loc": { "start": { - "line": 60, + "line": 74, "column": 37 }, "end": { - "line": 60, + "line": 74, "column": 97 } } @@ -7956,33 +7836,33 @@ ], "loc": { "start": { - "line": 60, + "line": 74, "column": 9 }, "end": { - "line": 60, + "line": 74, "column": 99 } } }, "loc": { "start": { - "line": 60, + "line": 74, "column": 1 }, "end": { - "line": 60, + "line": 74, "column": 99 } } }, "loc": { "start": { - "line": 60, + "line": 74, "column": 1 }, "end": { - "line": 60, + "line": 74, "column": 100 } } @@ -8003,11 +7883,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 77, "column": 5 }, "end": { - "line": 63, + "line": 77, "column": 6 } } @@ -8019,11 +7899,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 63, + "line": 77, "column": 8 }, "end": { - "line": 63, + "line": 77, "column": 14 } } @@ -8032,11 +7912,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 63, + "line": 77, "column": 17 }, "end": { - "line": 63, + "line": 77, "column": 23 } } @@ -8045,11 +7925,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 63, + "line": 77, "column": 26 }, "end": { - "line": 63, + "line": 77, "column": 33 } } @@ -8057,22 +7937,22 @@ ], "loc": { "start": { - "line": 63, + "line": 77, "column": 8 }, "end": { - "line": 63, + "line": 77, "column": 33 } } }, "loc": { "start": { - "line": 63, + "line": 77, "column": 5 }, "end": { - "line": 64, + "line": 78, "column": 2 } } @@ -8080,11 +7960,11 @@ ], "loc": { "start": { - "line": 62, + "line": 76, "column": 22 }, "end": { - "line": 64, + "line": 78, "column": 2 } } @@ -8095,11 +7975,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 76, "column": 11 }, "end": { - "line": 62, + "line": 76, "column": 21 } } @@ -8107,11 +7987,11 @@ "extends": [], "loc": { "start": { - "line": 62, + "line": 76, "column": 1 }, "end": { - "line": 64, + "line": 78, "column": 2 } } @@ -8132,11 +8012,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 81, "column": 5 }, "end": { - "line": 67, + "line": 81, "column": 6 } } @@ -8145,22 +8025,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 67, + "line": 81, "column": 8 }, "end": { - "line": 67, + "line": 81, "column": 14 } } }, "loc": { "start": { - "line": 67, + "line": 81, "column": 5 }, "end": { - "line": 68, + "line": 82, "column": 2 } } @@ -8168,11 +8048,11 @@ ], "loc": { "start": { - "line": 66, + "line": 80, "column": 41 }, "end": { - "line": 68, + "line": 82, "column": 2 } } @@ -8183,11 +8063,11 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 80, "column": 11 }, "end": { - "line": 66, + "line": 80, "column": 21 } } @@ -8196,27 +8076,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "interface3", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "interface3", + "decorators": [], + "loc": { + "start": { + "line": 80, + "column": 30 + }, + "end": { + "line": 80, + "column": 40 + } + } + }, "loc": { "start": { - "line": 66, - "column": 30 + "line": 80, + "column": 41 }, "end": { - "line": 66, + "line": 80, "column": 40 } } }, "loc": { "start": { - "line": 66, + "line": 80, "column": 41 }, "end": { - "line": 66, + "line": 80, "column": 40 } } @@ -8224,11 +8117,11 @@ ], "loc": { "start": { - "line": 66, + "line": 80, "column": 1 }, "end": { - "line": 68, + "line": 82, "column": 2 } } @@ -8249,11 +8142,11 @@ "decorators": [], "loc": { "start": { - "line": 71, + "line": 85, "column": 5 }, "end": { - "line": 71, + "line": 85, "column": 6 } } @@ -8262,22 +8155,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 71, + "line": 85, "column": 8 }, "end": { - "line": 71, + "line": 85, "column": 14 } } }, "loc": { "start": { - "line": 71, + "line": 85, "column": 5 }, "end": { - "line": 72, + "line": 86, "column": 2 } } @@ -8285,11 +8178,11 @@ ], "loc": { "start": { - "line": 70, + "line": 84, "column": 41 }, "end": { - "line": 72, + "line": 86, "column": 2 } } @@ -8300,11 +8193,11 @@ "decorators": [], "loc": { "start": { - "line": 70, + "line": 84, "column": 11 }, "end": { - "line": 70, + "line": 84, "column": 21 } } @@ -8313,27 +8206,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "interface3", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "interface3", + "decorators": [], + "loc": { + "start": { + "line": 84, + "column": 30 + }, + "end": { + "line": 84, + "column": 40 + } + } + }, "loc": { "start": { - "line": 70, - "column": 30 + "line": 84, + "column": 41 }, "end": { - "line": 70, + "line": 84, "column": 40 } } }, "loc": { "start": { - "line": 70, + "line": 84, "column": 41 }, "end": { - "line": 70, + "line": 84, "column": 40 } } @@ -8341,11 +8247,11 @@ ], "loc": { "start": { - "line": 70, + "line": 84, "column": 1 }, "end": { - "line": 72, + "line": 86, "column": 2 } } @@ -8366,11 +8272,11 @@ "decorators": [], "loc": { "start": { - "line": 75, + "line": 89, "column": 5 }, "end": { - "line": 75, + "line": 89, "column": 6 } } @@ -8379,22 +8285,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 75, + "line": 89, "column": 8 }, "end": { - "line": 75, + "line": 89, "column": 15 } } }, "loc": { "start": { - "line": 75, + "line": 89, "column": 5 }, "end": { - "line": 76, + "line": 90, "column": 2 } } @@ -8402,11 +8308,11 @@ ], "loc": { "start": { - "line": 74, + "line": 88, "column": 41 }, "end": { - "line": 76, + "line": 90, "column": 2 } } @@ -8417,11 +8323,11 @@ "decorators": [], "loc": { "start": { - "line": 74, + "line": 88, "column": 11 }, "end": { - "line": 74, + "line": 88, "column": 21 } } @@ -8430,27 +8336,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "interface3", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "interface3", + "decorators": [], + "loc": { + "start": { + "line": 88, + "column": 30 + }, + "end": { + "line": 88, + "column": 40 + } + } + }, "loc": { "start": { - "line": 74, - "column": 30 + "line": 88, + "column": 41 }, "end": { - "line": 74, + "line": 88, "column": 40 } } }, "loc": { "start": { - "line": 74, + "line": 88, "column": 41 }, "end": { - "line": 74, + "line": 88, "column": 40 } } @@ -8458,11 +8377,11 @@ ], "loc": { "start": { - "line": 74, + "line": 88, "column": 1 }, "end": { - "line": 76, + "line": 90, "column": 2 } } @@ -8486,22 +8405,22 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 92, "column": 12 }, "end": { - "line": 78, + "line": 92, "column": 22 } } }, "loc": { "start": { - "line": 78, + "line": 92, "column": 12 }, "end": { - "line": 78, + "line": 92, "column": 22 } } @@ -8514,22 +8433,22 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 92, "column": 25 }, "end": { - "line": 78, + "line": 92, "column": 35 } } }, "loc": { "start": { - "line": 78, + "line": 92, "column": 25 }, "end": { - "line": 78, + "line": 92, "column": 35 } } @@ -8542,22 +8461,22 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 92, "column": 38 }, "end": { - "line": 78, + "line": 92, "column": 48 } } }, "loc": { "start": { - "line": 78, + "line": 92, "column": 38 }, "end": { - "line": 78, + "line": 92, "column": 48 } } @@ -8565,11 +8484,11 @@ ], "loc": { "start": { - "line": 78, + "line": 92, "column": 12 }, "end": { - "line": 78, + "line": 92, "column": 48 } } @@ -8577,11 +8496,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 92, "column": 5 }, "end": { - "line": 78, + "line": 92, "column": 10 } } @@ -8589,11 +8508,11 @@ "init": null, "loc": { "start": { - "line": 78, + "line": 92, "column": 5 }, "end": { - "line": 78, + "line": 92, "column": 10 } } @@ -8602,11 +8521,11 @@ "kind": "var", "loc": { "start": { - "line": 78, + "line": 92, "column": 1 }, "end": { - "line": 78, + "line": 92, "column": 49 } } @@ -8622,11 +8541,11 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 93, "column": 1 }, "end": { - "line": 79, + "line": 93, "column": 6 } } @@ -8645,11 +8564,11 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 93, "column": 11 }, "end": { - "line": 79, + "line": 93, "column": 12 } } @@ -8659,11 +8578,11 @@ "value": 5, "loc": { "start": { - "line": 79, + "line": 93, "column": 14 }, "end": { - "line": 79, + "line": 93, "column": 15 } } @@ -8671,11 +8590,11 @@ "kind": "init", "loc": { "start": { - "line": 79, + "line": 93, "column": 11 }, "end": { - "line": 79, + "line": 93, "column": 15 } } @@ -8683,33 +8602,33 @@ ], "loc": { "start": { - "line": 79, + "line": 93, "column": 9 }, "end": { - "line": 79, + "line": 93, "column": 17 } } }, "loc": { "start": { - "line": 79, + "line": 93, "column": 1 }, "end": { - "line": 79, + "line": 93, "column": 17 } } }, "loc": { "start": { - "line": 79, + "line": 93, "column": 1 }, "end": { - "line": 79, + "line": 93, "column": 18 } } @@ -8725,11 +8644,11 @@ "decorators": [], "loc": { "start": { - "line": 80, + "line": 94, "column": 1 }, "end": { - "line": 80, + "line": 94, "column": 6 } } @@ -8748,25 +8667,25 @@ "decorators": [], "loc": { "start": { - "line": 80, + "line": 94, "column": 11 }, "end": { - "line": 80, + "line": 94, "column": 12 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 80, + "line": 94, "column": 14 }, "end": { - "line": 80, + "line": 94, "column": 19 } } @@ -8774,11 +8693,11 @@ "kind": "init", "loc": { "start": { - "line": 80, + "line": 94, "column": 11 }, "end": { - "line": 80, + "line": 94, "column": 19 } } @@ -8786,33 +8705,33 @@ ], "loc": { "start": { - "line": 80, + "line": 94, "column": 9 }, "end": { - "line": 80, + "line": 94, "column": 21 } } }, "loc": { "start": { - "line": 80, + "line": 94, "column": 1 }, "end": { - "line": 80, + "line": 94, "column": 21 } } }, "loc": { "start": { - "line": 80, + "line": 94, "column": 1 }, "end": { - "line": 80, + "line": 94, "column": 22 } } @@ -8828,11 +8747,11 @@ "decorators": [], "loc": { "start": { - "line": 81, + "line": 95, "column": 1 }, "end": { - "line": 81, + "line": 95, "column": 6 } } @@ -8851,11 +8770,11 @@ "decorators": [], "loc": { "start": { - "line": 81, + "line": 95, "column": 11 }, "end": { - "line": 81, + "line": 95, "column": 12 } } @@ -8865,11 +8784,11 @@ "value": true, "loc": { "start": { - "line": 81, + "line": 95, "column": 14 }, "end": { - "line": 81, + "line": 95, "column": 18 } } @@ -8877,11 +8796,11 @@ "kind": "init", "loc": { "start": { - "line": 81, + "line": 95, "column": 11 }, "end": { - "line": 81, + "line": 95, "column": 18 } } @@ -8889,33 +8808,33 @@ ], "loc": { "start": { - "line": 81, + "line": 95, "column": 9 }, "end": { - "line": 81, + "line": 95, "column": 20 } } }, "loc": { "start": { - "line": 81, + "line": 95, "column": 1 }, "end": { - "line": 81, + "line": 95, "column": 20 } } }, "loc": { "start": { - "line": 81, + "line": 95, "column": 1 }, "end": { - "line": 81, + "line": 95, "column": 21 } } @@ -8927,8 +8846,8 @@ "column": 1 }, "end": { - "line": 81, - "column": 21 + "line": 96, + "column": 1 } } } diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability.ts b/es2panda/test/compiler/ts/objectLiteralAssignability.ts index c51da9a377a9e0521bd3bda6ab7a9f4c5ecd239a..5f7b8b18068ed010efac51ccc2621114d6b9a618 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability.ts +++ b/es2panda/test/compiler/ts/objectLiteralAssignability.ts @@ -15,8 +15,8 @@ var obj1: { c: number }; -var obj2: { a: number, b: string } | { a: string, b: string, c: string } = { a: 5, b: "foo", ...obj1 }; -obj2 = { a: "foo", b: "bar", c: "baz" }; +var obj2: { a: number, b: string } | { a: number, b: string, c: number } = { a: 5, b: "foo", ...obj1 }; +obj2 = { a: 2, b: "bar", c: 3 }; var obj3: {} = {}; var obj4: { a: typeof obj3, b?: { a: number, b?: string } } = { a: {}, b: { a: 5 } }; @@ -37,15 +37,13 @@ var obj8 = { ...obj6 }; obj8 = obj6; obj8 = { a: function (a: number, b: string): number { return 12; }, b: function () { return true } }; -var a: 5; -var b: "foo"; -var obj9: { [a]: number, [b]: string } = { 5: 5, "foo": "foo" }; +var obj9: { 5: number, "foo": string } = { 5: 5, "foo": "foo" }; var c: number; var d: string; var obj10: { [x: number]: number, [y: string]: number } = { [c]: 1, [d]: 2 }; -var obj11 = { get 5() { return 5; }, set "foo"(a) { } }; +var obj11 = { get 5() { return 5; }, set "foo"(a: any) { } }; obj9 = obj11; var obj12: { a?: number, b?: string, c?: boolean }; @@ -94,4 +92,4 @@ interface interface6 extends interface3 { var obj15: interface4 | interface5 | interface6; obj15 = { a: 5 }; obj15 = { a: "foo" }; -obj15 = { a: true }; \ No newline at end of file +obj15 = { a: true }; diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability1-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability1-expected.txt index 35dc3c8ef46714bc4793c3f7777722b355ae0fe6..82117a9d936f2d3510101205077f8b0960887137 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability1-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability1-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -80,22 +80,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -103,11 +103,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -115,11 +115,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -138,25 +138,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -164,11 +164,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -184,25 +184,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 48 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 50 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -210,11 +210,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -222,22 +222,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 57 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -246,11 +246,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -262,9 +262,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 58 } } } -TypeError: Type 'string' is not assignable to type 'number'. [objectLiteralAssignability1.ts:1:37] +TypeError: Type 'string' is not assignable to type 'number'. [objectLiteralAssignability1.ts:17:37] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability10-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability10-expected.txt index 4d0bbec189f2e08168f6485bcf23582a420a3270..b994d6e9cb8851beb1d1328e4e6097cd7c9b093b 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability10-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability10-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -46,11 +46,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -59,22 +59,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -90,11 +90,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -103,22 +103,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -126,22 +126,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -149,11 +149,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -161,11 +161,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -207,11 +207,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 50 } } @@ -221,11 +221,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -233,11 +233,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -253,11 +253,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 55 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -267,11 +267,11 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 58 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -279,11 +279,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 55 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -291,11 +291,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -303,11 +303,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -315,22 +315,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 63 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -339,11 +339,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 64 } } @@ -355,9 +355,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 64 } } } -TypeError: Type 'number' is not assignable to type 'string'. [objectLiteralAssignability10.ts:1:55] +TypeError: Type 'number' is not assignable to type 'string'. [objectLiteralAssignability10.ts:17:55] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability11-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability11-expected.txt index 40ad6b64cb47aa60b5776ec364fb6dd6650d8ce8..dfa279b2319d97241d248b9a6b6d5659a434429d 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability11-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability11-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -49,11 +49,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -62,22 +62,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -93,11 +93,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -108,33 +108,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -142,22 +142,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 39 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -165,11 +165,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -188,11 +188,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -211,11 +211,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -226,33 +226,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 60 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -268,11 +268,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -281,22 +281,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 73 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -304,22 +304,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 75 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -327,11 +327,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -339,11 +339,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -351,11 +351,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -374,11 +374,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 82 }, "end": { - "line": 1, + "line": 17, "column": 83 } } @@ -388,11 +388,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 85 }, "end": { - "line": 1, + "line": 17, "column": 86 } } @@ -400,11 +400,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 82 }, "end": { - "line": 1, + "line": 17, "column": 86 } } @@ -412,22 +412,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 80 }, "end": { - "line": 1, + "line": 17, "column": 88 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -436,11 +436,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -452,9 +452,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 88 } } } -TypeError: Type 'number' is not assignable to type '{ a: number[]; b: number; } | { a: number; b: string[]; }'. [objectLiteralAssignability11.ts:1:82] +TypeError: Type 'number' is not assignable to type '{ a: number; b: string[]; } | { a: number[]; b: number; }'. [objectLiteralAssignability11.ts:17:82] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability12-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability12-expected.txt index 73907ad142fce2921edb523a28bdb8649181c07a..ba60898dc8fcb2c843a226fdcf36d2fef3510581 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability12-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability12-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -49,11 +49,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -62,22 +62,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -93,11 +93,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -108,33 +108,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -142,22 +142,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 39 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -165,11 +165,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -188,11 +188,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -211,11 +211,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -226,33 +226,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 60 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -268,11 +268,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -281,22 +281,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 73 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -304,22 +304,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 75 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -327,11 +327,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -339,11 +339,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -351,11 +351,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -374,11 +374,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 82 }, "end": { - "line": 1, + "line": 17, "column": 83 } } @@ -397,11 +397,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 87 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -414,11 +414,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 91 }, "end": { - "line": 1, + "line": 17, "column": 92 } } @@ -428,11 +428,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 94 }, "end": { - "line": 1, + "line": 17, "column": 95 } } @@ -442,25 +442,25 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 97 }, "end": { - "line": 1, + "line": 17, "column": 98 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 100 }, "end": { - "line": 1, + "line": 17, "column": 105 } } @@ -468,11 +468,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 90 }, "end": { - "line": 1, + "line": 17, "column": 106 } } @@ -480,11 +480,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 87 }, "end": { - "line": 1, + "line": 17, "column": 106 } } @@ -492,11 +492,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 85 }, "end": { - "line": 1, + "line": 17, "column": 108 } } @@ -504,11 +504,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 82 }, "end": { - "line": 1, + "line": 17, "column": 108 } } @@ -516,22 +516,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 80 }, "end": { - "line": 1, + "line": 17, "column": 110 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 110 } } @@ -540,11 +540,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 110 } } @@ -556,9 +556,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 110 } } } -TypeError: Type 'string' is not assignable to type 'number'. [objectLiteralAssignability12.ts:1:100] +TypeError: Type 'string' is not assignable to type 'number'. [objectLiteralAssignability12.ts:17:100] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability13-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability13-expected.txt index 5bc5c23ee35dd8761dc4c1de029fd3af27e420d9..43b542502cc5b887ab0f9874346498ebb50b43bd 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability13-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability13-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -49,11 +49,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -62,22 +62,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -93,11 +93,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -108,33 +108,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -142,22 +142,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 39 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -165,11 +165,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -188,11 +188,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -211,11 +211,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -226,33 +226,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 60 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -268,11 +268,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -281,22 +281,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 73 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -304,22 +304,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 75 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -327,11 +327,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -339,11 +339,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -351,11 +351,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -374,11 +374,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 82 }, "end": { - "line": 1, + "line": 17, "column": 83 } } @@ -397,11 +397,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 87 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -414,11 +414,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 91 }, "end": { - "line": 1, + "line": 17, "column": 92 } } @@ -428,11 +428,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 94 }, "end": { - "line": 1, + "line": 17, "column": 95 } } @@ -442,11 +442,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 97 }, "end": { - "line": 1, + "line": 17, "column": 98 } } @@ -456,11 +456,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 100 }, "end": { - "line": 1, + "line": 17, "column": 101 } } @@ -468,11 +468,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 90 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -480,11 +480,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 87 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -500,11 +500,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 104 }, "end": { - "line": 1, + "line": 17, "column": 105 } } @@ -514,11 +514,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 107 }, "end": { - "line": 1, + "line": 17, "column": 111 } } @@ -526,11 +526,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 104 }, "end": { - "line": 1, + "line": 17, "column": 111 } } @@ -538,11 +538,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 85 }, "end": { - "line": 1, + "line": 17, "column": 113 } } @@ -550,11 +550,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 82 }, "end": { - "line": 1, + "line": 17, "column": 113 } } @@ -562,22 +562,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 80 }, "end": { - "line": 1, + "line": 17, "column": 115 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 115 } } @@ -586,11 +586,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 115 } } @@ -602,9 +602,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 115 } } } -TypeError: Type 'boolean' is not assignable to type 'number'. [objectLiteralAssignability13.ts:1:104] +TypeError: Type 'boolean' is not assignable to type 'number'. [objectLiteralAssignability13.ts:17:104] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability14-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability14-expected.txt index 08c5235393904f8da423150bff84feb7f3429d3f..85da31e7599182fd3c022f522d9a43e4cea5cf92 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability14-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability14-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -49,11 +49,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -62,22 +62,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -93,11 +93,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -108,33 +108,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -142,22 +142,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 39 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -165,11 +165,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -188,11 +188,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -211,11 +211,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -226,33 +226,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 60 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 62 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -268,11 +268,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -281,22 +281,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 73 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -304,22 +304,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 75 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 46 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -327,11 +327,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -339,11 +339,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -351,11 +351,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -374,11 +374,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 82 }, "end": { - "line": 1, + "line": 17, "column": 83 } } @@ -397,11 +397,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 87 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -414,11 +414,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 91 }, "end": { - "line": 1, + "line": 17, "column": 92 } } @@ -428,11 +428,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 94 }, "end": { - "line": 1, + "line": 17, "column": 95 } } @@ -442,11 +442,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 97 }, "end": { - "line": 1, + "line": 17, "column": 98 } } @@ -456,11 +456,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 100 }, "end": { - "line": 1, + "line": 17, "column": 101 } } @@ -468,11 +468,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 90 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -480,11 +480,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 87 }, "end": { - "line": 1, + "line": 17, "column": 102 } } @@ -500,11 +500,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 104 }, "end": { - "line": 1, + "line": 17, "column": 105 } } @@ -514,11 +514,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 107 }, "end": { - "line": 1, + "line": 17, "column": 108 } } @@ -526,11 +526,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 104 }, "end": { - "line": 1, + "line": 17, "column": 108 } } @@ -546,25 +546,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 110 }, "end": { - "line": 1, + "line": 17, "column": 111 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 113 }, "end": { - "line": 1, + "line": 17, "column": 118 } } @@ -572,11 +572,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 110 }, "end": { - "line": 1, + "line": 17, "column": 118 } } @@ -584,11 +584,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 85 }, "end": { - "line": 1, + "line": 17, "column": 120 } } @@ -596,11 +596,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 82 }, "end": { - "line": 1, + "line": 17, "column": 120 } } @@ -608,22 +608,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 80 }, "end": { - "line": 1, + "line": 17, "column": 122 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 122 } } @@ -632,11 +632,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 122 } } @@ -648,9 +648,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 122 } } } -TypeError: Object literal may only specify known properties, and 'c' does not exist in type '{ a: number[]; b: number; } | { a: number; b: string[]; }' [objectLiteralAssignability14.ts:1:110] +TypeError: Object literal may only specify known properties, and "c" does not exist in type '{ a: number; b: string[]; } | { a: number[]; b: number; }'. [objectLiteralAssignability14.ts:17:110] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability15-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability15-expected.txt index 199052174fd3990b4159a29dbf0a4ca1adef6f66..237071ad24deae30e90b74b1fc85548364f54d53 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability15-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability15-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -33,11 +33,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -46,11 +46,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -58,22 +58,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 23 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -89,11 +89,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -102,22 +102,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -125,11 +125,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -140,11 +140,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -152,11 +152,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -177,11 +177,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -190,22 +190,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -221,11 +221,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -234,22 +234,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 15 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -257,11 +257,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -272,11 +272,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -285,27 +285,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "a", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, "loc": { "start": { - "line": 6, - "column": 21 + "line": 22, + "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -313,11 +326,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -338,22 +351,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 9 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 9 } } @@ -361,11 +374,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -384,11 +397,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 15 } } @@ -398,11 +411,11 @@ "value": 5, "loc": { "start": { - "line": 11, + "line": 27, "column": 17 }, "end": { - "line": 11, + "line": 27, "column": 18 } } @@ -410,11 +423,11 @@ "kind": "init", "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 18 } } @@ -422,22 +435,22 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 12 }, "end": { - "line": 11, + "line": 27, "column": 20 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 20 } } @@ -446,11 +459,11 @@ "kind": "var", "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 21 } } @@ -462,9 +475,9 @@ "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 21 } } } -TypeError: Type 'number' is not assignable to type 'string'. [objectLiteralAssignability15.ts:11:14] +TypeError: Type 'number' is not assignable to type 'string'. [objectLiteralAssignability15.ts:27:14] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability16-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability16-expected.txt index 8013c23c763de5647a9360b2cc3238cab4d31123..f27cb9fe5c5d32bd193a0ddc83fbe94a2352020a 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability16-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability16-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -53,11 +53,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -118,22 +118,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -149,11 +149,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -162,22 +162,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -185,11 +185,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -200,11 +200,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -212,11 +212,11 @@ "extends": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -237,11 +237,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -250,22 +250,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 14 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 15 } } @@ -281,11 +281,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -294,22 +294,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 8 }, "end": { - "line": 12, + "line": 28, "column": 14 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 15 } } @@ -325,11 +325,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -338,22 +338,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 15 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 2 } } @@ -361,11 +361,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 14, + "line": 30, "column": 2 } } @@ -376,11 +376,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 11 }, "end": { - "line": 10, + "line": 26, "column": 12 } } @@ -388,11 +388,11 @@ "extends": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 2 } } @@ -413,11 +413,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 6 } } @@ -426,22 +426,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 14 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 18, + "line": 34, "column": 2 } } @@ -449,11 +449,11 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 29 }, "end": { - "line": 18, + "line": 34, "column": 2 } } @@ -464,11 +464,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 11 }, "end": { - "line": 16, + "line": 32, "column": 12 } } @@ -477,27 +477,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "a", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 32, + "column": 21 + }, + "end": { + "line": 32, + "column": 22 + } + } + }, "loc": { "start": { - "line": 16, - "column": 21 + "line": 32, + "column": 22 }, "end": { - "line": 16, + "line": 32, "column": 22 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 22 }, "end": { - "line": 16, + "line": 32, "column": 22 } } @@ -505,27 +518,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "b", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 32, + "column": 24 + }, + "end": { + "line": 32, + "column": 25 + } + } + }, "loc": { "start": { - "line": 16, - "column": 24 + "line": 32, + "column": 25 }, "end": { - "line": 16, + "line": 32, "column": 25 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 25 }, "end": { - "line": 16, + "line": 32, "column": 25 } } @@ -533,27 +559,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "c", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "c", + "decorators": [], + "loc": { + "start": { + "line": 32, + "column": 27 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, "loc": { "start": { - "line": 16, - "column": 27 + "line": 32, + "column": 29 }, "end": { - "line": 16, + "line": 32, "column": 28 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 29 }, "end": { - "line": 16, + "line": 32, "column": 28 } } @@ -561,11 +600,11 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 2 } } @@ -586,22 +625,22 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 8 }, "end": { - "line": 20, + "line": 36, "column": 9 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 8 }, "end": { - "line": 20, + "line": 36, "column": 9 } } @@ -609,11 +648,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 6 } } @@ -632,11 +671,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 14 }, "end": { - "line": 20, + "line": 36, "column": 15 } } @@ -646,11 +685,11 @@ "value": 5, "loc": { "start": { - "line": 20, + "line": 36, "column": 17 }, "end": { - "line": 20, + "line": 36, "column": 18 } } @@ -658,11 +697,11 @@ "kind": "init", "loc": { "start": { - "line": 20, + "line": 36, "column": 14 }, "end": { - "line": 20, + "line": 36, "column": 18 } } @@ -678,25 +717,25 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 20 }, "end": { - "line": 20, + "line": 36, "column": 21 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 20, + "line": 36, "column": 23 }, "end": { - "line": 20, + "line": 36, "column": 28 } } @@ -704,11 +743,11 @@ "kind": "init", "loc": { "start": { - "line": 20, + "line": 36, "column": 20 }, "end": { - "line": 20, + "line": 36, "column": 28 } } @@ -724,11 +763,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 30 }, "end": { - "line": 20, + "line": 36, "column": 31 } } @@ -738,11 +777,11 @@ "value": true, "loc": { "start": { - "line": 20, + "line": 36, "column": 33 }, "end": { - "line": 20, + "line": 36, "column": 37 } } @@ -750,11 +789,11 @@ "kind": "init", "loc": { "start": { - "line": 20, + "line": 36, "column": 30 }, "end": { - "line": 20, + "line": 36, "column": 37 } } @@ -762,22 +801,22 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 12 }, "end": { - "line": 20, + "line": 36, "column": 39 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 39 } } @@ -786,11 +825,11 @@ "kind": "var", "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 40 } } @@ -802,9 +841,9 @@ "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 40 } } } -TypeError: Type '{ a: number; b: string; c: boolean; }' is not assignable to type 'd'. [objectLiteralAssignability16.ts:20:5] +TypeError: Type '{ a: 5; b: "foo"; c: true; }' is not assignable to type 'd'. [objectLiteralAssignability16.ts:36:5] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability17-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability17-expected.txt index 410100f54fc280a3428faa4a8dbc919097324fa5..a67c0d9eeb30e2fe2516f230b50a68ecfa5b60fc 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability17-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability17-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -80,22 +80,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -103,11 +103,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -115,11 +115,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -127,11 +127,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -140,11 +140,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -171,11 +171,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -188,33 +188,33 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -230,11 +230,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -243,22 +243,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 26 }, "end": { - "line": 2, + "line": 18, "column": 32 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 34 } } @@ -266,11 +266,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 34 } } @@ -278,11 +278,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -290,11 +290,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -303,11 +303,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -323,11 +323,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -338,33 +338,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -376,9 +376,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type '{ a: { a: number; b: string; }; b: string; }' is not assignable to type '{ a: number; b: string; }'. [objectLiteralAssignability17.ts:3:1] +TypeError: Type '{ a: { a: number; b: string; }; b: string; }' is not assignable to type '{ a: number; b: string; }'. [objectLiteralAssignability17.ts:19:1] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability18-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability18-expected.txt index cfe5f73d6017ff91fdfdab35276e6a096a829a84..52b3e5d8ed8d449202fb414a13697bd462957e59 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability18-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability18-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -41,11 +41,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -54,22 +54,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 29 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -85,11 +85,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -98,22 +98,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -121,11 +121,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -133,11 +133,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -149,11 +149,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -161,11 +161,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -185,11 +185,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 58 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -200,33 +200,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 67 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 69 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 58 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -242,11 +242,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 71 }, "end": { - "line": 1, + "line": 17, "column": 72 } } @@ -255,22 +255,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 74 }, "end": { - "line": 1, + "line": 17, "column": 81 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 71 }, "end": { - "line": 1, + "line": 17, "column": 83 } } @@ -278,11 +278,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 83 } } @@ -306,11 +306,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -323,11 +323,11 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -337,11 +337,11 @@ "value": 2, "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -351,11 +351,11 @@ "value": 3, "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -363,11 +363,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -375,11 +375,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -395,11 +395,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -409,11 +409,11 @@ "value": true, "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -421,11 +421,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -433,22 +433,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 37 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 38 } } @@ -456,33 +456,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 84 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -509,11 +509,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -524,33 +524,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 19 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 21 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -566,11 +566,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 24 } } @@ -579,22 +579,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 26 }, "end": { - "line": 5, + "line": 21, "column": 33 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 35 } } @@ -602,11 +602,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 35 } } @@ -614,11 +614,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -631,11 +631,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 38 }, "end": { - "line": 5, + "line": 21, "column": 42 } } @@ -655,11 +655,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 45 }, "end": { - "line": 5, + "line": 21, "column": 46 } } @@ -669,11 +669,11 @@ "value": 5, "loc": { "start": { - "line": 5, + "line": 21, "column": 48 }, "end": { - "line": 5, + "line": 21, "column": 49 } } @@ -681,11 +681,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 45 }, "end": { - "line": 5, + "line": 21, "column": 49 } } @@ -701,25 +701,25 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 51 }, "end": { - "line": 5, + "line": 21, "column": 52 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 54 }, "end": { - "line": 5, + "line": 21, "column": 59 } } @@ -727,11 +727,11 @@ "kind": "init", "loc": { "start": { - "line": 5, + "line": 21, "column": 51 }, "end": { - "line": 5, + "line": 21, "column": 59 } } @@ -739,11 +739,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 43 }, "end": { - "line": 5, + "line": 21, "column": 61 } } @@ -753,11 +753,11 @@ "value": 6, "loc": { "start": { - "line": 5, + "line": 21, "column": 63 }, "end": { - "line": 5, + "line": 21, "column": 64 } } @@ -766,22 +766,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 38 }, "end": { - "line": 5, + "line": 21, "column": 65 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 65 } } @@ -790,11 +790,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 66 } } @@ -806,9 +806,9 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 66 } } } -TypeError: Type '{ a: number[]; b: boolean; }' is not assignable to type '{ a: string[]; b: boolean; }' [objectLiteralAssignability18.ts:5:5] +TypeError: Type '{ a: number[]; b: boolean; }' is not assignable to type '{ a: string[]; b: boolean; }'. [objectLiteralAssignability18.ts:21:5] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability19-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability19-expected.txt index 5606da9d4d8783a39b2af8a62eed4dc590bd9d21..e3dedd78432489782f49c8200f95fefcb205b948 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability19-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability19-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -90,11 +90,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -103,22 +103,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -134,11 +134,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -147,22 +147,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -170,22 +170,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 48 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -201,11 +201,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 50 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -224,11 +224,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 55 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -237,22 +237,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 58 }, "end": { - "line": 1, + "line": 17, "column": 65 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 55 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -268,11 +268,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -281,22 +281,22 @@ "type": "TSNullKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 74 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -304,22 +304,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 77 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 50 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -327,11 +327,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 79 } } @@ -339,11 +339,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -351,11 +351,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -364,11 +364,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 80 } } @@ -395,11 +395,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -411,11 +411,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -424,11 +424,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -436,22 +436,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 28 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -467,11 +467,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 30 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -490,11 +490,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 35 }, "end": { - "line": 2, + "line": 18, "column": 36 } } @@ -503,22 +503,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 38 }, "end": { - "line": 2, + "line": 18, "column": 44 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 35 }, "end": { - "line": 2, + "line": 18, "column": 45 } } @@ -534,11 +534,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 46 }, "end": { - "line": 2, + "line": 18, "column": 47 } } @@ -547,22 +547,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 49 }, "end": { - "line": 2, + "line": 18, "column": 55 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 46 }, "end": { - "line": 2, + "line": 18, "column": 57 } } @@ -570,22 +570,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 33 }, "end": { - "line": 2, + "line": 18, "column": 57 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 30 }, "end": { - "line": 2, + "line": 18, "column": 58 } } @@ -601,11 +601,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 59 }, "end": { - "line": 2, + "line": 18, "column": 60 } } @@ -624,11 +624,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 64 }, "end": { - "line": 2, + "line": 18, "column": 65 } } @@ -647,11 +647,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 69 }, "end": { - "line": 2, + "line": 18, "column": 70 } } @@ -660,22 +660,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 72 }, "end": { - "line": 2, + "line": 18, "column": 78 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 69 }, "end": { - "line": 2, + "line": 18, "column": 79 } } @@ -691,11 +691,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 80 }, "end": { - "line": 2, + "line": 18, "column": 81 } } @@ -704,22 +704,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 83 }, "end": { - "line": 2, + "line": 18, "column": 89 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 80 }, "end": { - "line": 2, + "line": 18, "column": 91 } } @@ -727,22 +727,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 67 }, "end": { - "line": 2, + "line": 18, "column": 91 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 64 }, "end": { - "line": 2, + "line": 18, "column": 92 } } @@ -758,11 +758,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 93 }, "end": { - "line": 2, + "line": 18, "column": 94 } } @@ -771,22 +771,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 96 }, "end": { - "line": 2, + "line": 18, "column": 103 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 93 }, "end": { - "line": 2, + "line": 18, "column": 105 } } @@ -794,22 +794,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 62 }, "end": { - "line": 2, + "line": 18, "column": 105 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 59 }, "end": { - "line": 2, + "line": 18, "column": 107 } } @@ -817,11 +817,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 107 } } @@ -829,11 +829,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -841,11 +841,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -854,11 +854,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 108 } } @@ -874,11 +874,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -889,33 +889,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -927,9 +927,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type '{ a: number | string; b: { a: number; b: number; }; c: { a: { a: number; b: string; }; d: boolean; }; }' is not assignable to type '{ a: number; b: { a: number; b: string; }; c: { b: boolean; a: null; }; }'. [objectLiteralAssignability19.ts:3:1] +TypeError: Type '{ a: number | string; b: { a: number; b: number; }; c: { a: { a: number; b: string; }; d: boolean; }; }' is not assignable to type '{ a: number; b: { a: number; b: string; }; c: { b: boolean; a: null; }; }'. [objectLiteralAssignability19.ts:19:1] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability2-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability2-expected.txt index dbe519596dccc08c8fe645fcc0f3ed12d7f52b73..342d8af70c2cde3b9984496951b7c5e1ef38a274 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability2-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability2-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -94,11 +94,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -108,11 +108,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -120,11 +120,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -140,25 +140,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -166,11 +166,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -178,22 +178,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 42 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -202,11 +202,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -218,9 +218,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 43 } } } -TypeError: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; }' [objectLiteralAssignability2.ts:1:32] +TypeError: Object literal may only specify known properties, and "b" does not exist in type '{ a: number; }'. [objectLiteralAssignability2.ts:17:32] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability20-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability20-expected.txt index 7b3c365e1993c36291163bee07bd8ed0c55a58b9..9d8e2ea6c3aa97c966f482dfbd09463d3147f97f 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability20-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability20-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -62,24 +62,37 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } } ], + "returnType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 17, + "column": 37 + }, + "end": { + "line": 17, + "column": 43 + } + } + }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, - "column": 36 + "line": 17, + "column": 44 } } }, @@ -93,24 +106,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, - "column": 41 + "line": 17, + "column": 49 }, "end": { - "line": 1, - "column": 47 + "line": 17, + "column": 55 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 38 + "line": 17, + "column": 46 }, "end": { - "line": 1, - "column": 39 + "line": 17, + "column": 47 } } }, @@ -121,59 +134,72 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, - "column": 52 + "line": 17, + "column": 60 }, "end": { - "line": 1, - "column": 58 + "line": 17, + "column": 66 } } }, "decorators": [], "loc": { "start": { - "line": 1, - "column": 49 + "line": 17, + "column": 57 }, "end": { - "line": 1, - "column": 50 + "line": 17, + "column": 58 } } } ], + "returnType": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 17, + "column": 69 + }, + "end": { + "line": 17, + "column": 75 + } + } + }, "loc": { "start": { - "line": 1, - "column": 37 + "line": 17, + "column": 45 }, "end": { - "line": 1, - "column": 61 + "line": 17, + "column": 77 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, - "column": 61 + "line": 17, + "column": 77 } } }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -181,11 +207,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -194,12 +220,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 62 + "line": 17, + "column": 78 } } }, @@ -224,11 +250,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -236,11 +262,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -252,11 +278,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 34 } } @@ -264,24 +290,37 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 26 } } } ], + "returnType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 18, + "column": 37 + }, + "end": { + "line": 18, + "column": 43 + } + } + }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, - "column": 36 + "line": 18, + "column": 44 } } }, @@ -295,24 +334,24 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, - "column": 41 + "line": 18, + "column": 49 }, "end": { - "line": 2, - "column": 47 + "line": 18, + "column": 55 } } }, "decorators": [], "loc": { "start": { - "line": 2, - "column": 38 + "line": 18, + "column": 46 }, "end": { - "line": 2, - "column": 39 + "line": 18, + "column": 47 } } }, @@ -323,59 +362,72 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, - "column": 52 + "line": 18, + "column": 60 }, "end": { - "line": 2, - "column": 58 + "line": 18, + "column": 66 } } }, "decorators": [], "loc": { "start": { - "line": 2, - "column": 49 + "line": 18, + "column": 57 }, "end": { - "line": 2, - "column": 50 + "line": 18, + "column": 58 } } } ], + "returnType": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 18, + "column": 69 + }, + "end": { + "line": 18, + "column": 75 + } + } + }, "loc": { "start": { - "line": 2, - "column": 37 + "line": 18, + "column": 45 }, "end": { - "line": 2, - "column": 61 + "line": 18, + "column": 77 } } } ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, - "column": 61 + "line": 18, + "column": 77 } } }, "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -383,11 +435,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -396,11 +448,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -416,11 +468,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -431,33 +483,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -469,9 +521,9 @@ "column": 1 }, "end": { - "line": 3, - "column": 7 + "line": 20, + "column": 1 } } } -TypeError: Type '{ (a: string, b: string): any; new (a: number, b: string): any; }' is not assignable to type '{ (a: number, b: string): any; new (a: number, b: string): any; }'. [objectLiteralAssignability20.ts:3:1] +TypeError: Type '{ (a: string, b: string): string; new (a: number, b: string): number; }' is not assignable to type '{ (a: number, b: string): string; new (a: number, b: string): number; }'. [objectLiteralAssignability20.ts:19:1] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability20.ts b/es2panda/test/compiler/ts/objectLiteralAssignability20.ts index 4b952942a472e8070510b3dddae423e31ed15ad4..6c1ac958ee52ca41265edb622926562e38acb04a 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability20.ts +++ b/es2panda/test/compiler/ts/objectLiteralAssignability20.ts @@ -14,6 +14,6 @@ */ -var a: { new(a: number, b: string), (a: number, b: string) }; -var b: { new(a: number, b: string), (a: string, b: string) } -a = b; \ No newline at end of file +var a: { new(a: number, b: string): number, (a: number, b: string): string }; +var b: { new(a: number, b: string): number, (a: string, b: string): string } +a = b; diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability3-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability3-expected.txt index 76b5095e3f8d3480271621938bbf0dd7f4f73804..26f8a456a257e623aef4161cd5cdc1baa3ec304e 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability3-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability3-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -39,22 +39,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -62,11 +62,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -85,11 +85,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -98,22 +98,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -121,11 +121,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -133,11 +133,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -145,11 +145,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -182,11 +182,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -194,11 +194,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -206,22 +206,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 51 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -230,11 +230,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -246,9 +246,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 52 } } } -TypeError: Object literal may only specify known properties, and 'c' does not exist in type '{ a: number; } | { b: string; }' [objectLiteralAssignability3.ts:1:42] +TypeError: Object literal may only specify known properties, and "c" does not exist in type '{ a: number; } | { b: string; }'. [objectLiteralAssignability3.ts:17:42] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability4-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability4-expected.txt index 8273d0c8356aa685bee90dfffe46dadb6b71770c..fb0bbd5b9e69e96715a20c4afee9b7d34fbd23f9 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability4-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability4-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -94,12 +94,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 30 + "line": 17, + "column": 26 }, "end": { - "line": 1, - "column": 31 + "line": 17, + "column": 27 } } }, @@ -116,12 +116,12 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, - "column": 35 + "line": 17, + "column": 42 }, "end": { - "line": 1, - "column": 41 + "line": 17, + "column": 48 } } }, @@ -132,95 +132,95 @@ "type": "ReturnStatement", "argument": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, - "column": 51 + "line": 17, + "column": 58 }, "end": { - "line": 1, - "column": 56 + "line": 17, + "column": 63 } } }, "loc": { "start": { - "line": 1, - "column": 44 + "line": 17, + "column": 51 }, "end": { - "line": 1, - "column": 56 + "line": 17, + "column": 63 } } } ], "loc": { "start": { - "line": 1, - "column": 42 + "line": 17, + "column": 49 }, "end": { - "line": 1, - "column": 58 + "line": 17, + "column": 65 } } }, "loc": { "start": { - "line": 1, - "column": 31 + "line": 17, + "column": 29 }, "end": { - "line": 1, - "column": 58 + "line": 17, + "column": 65 } } }, "loc": { "start": { - "line": 1, - "column": 31 + "line": 17, + "column": 29 }, "end": { - "line": 1, - "column": 58 + "line": 17, + "column": 65 } } }, - "kind": "get", + "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, - "column": 58 + "line": 17, + "column": 65 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, - "column": 60 + "line": 17, + "column": 67 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, - "column": 60 + "line": 17, + "column": 67 } } } @@ -228,12 +228,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 60 + "line": 17, + "column": 67 } } } @@ -244,9 +244,9 @@ "column": 1 }, "end": { - "line": 1, - "column": 60 + "line": 18, + "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [objectLiteralAssignability4.ts:1:26] +TypeError: Type '() => string' is not assignable to type 'number'. [objectLiteralAssignability4.ts:17:26] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability4.ts b/es2panda/test/compiler/ts/objectLiteralAssignability4.ts index 2076c5eff351396bd82a8140129c43323f02720f..4ca9f1fc125df0d461c0df9c5d212d062401f0f5 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability4.ts +++ b/es2panda/test/compiler/ts/objectLiteralAssignability4.ts @@ -14,4 +14,4 @@ */ -var a: { b: number } = { get b(): string { return "foo" } } \ No newline at end of file +var a: { b: number } = { b: function (): string { return "foo" } } diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability5-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability5-expected.txt index 5514dba56a91f4987c279a26b0b91e5376b818e3..bb3e766f7f07637e6753ab92783701c64b776f2d 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability5-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability5-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -49,11 +49,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -61,11 +61,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -81,25 +81,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 18 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -107,11 +107,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -119,22 +119,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -143,11 +143,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -174,11 +174,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -187,22 +187,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -218,11 +218,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -231,22 +231,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 30 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -262,11 +262,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 32 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -275,22 +275,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 35 }, "end": { - "line": 2, + "line": 18, "column": 41 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 32 }, "end": { - "line": 2, + "line": 18, "column": 42 } } @@ -306,11 +306,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 43 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -322,11 +322,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 46 }, "end": { - "line": 2, + "line": 18, "column": 53 } } @@ -335,11 +335,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 56 }, "end": { - "line": 2, + "line": 18, "column": 62 } } @@ -347,22 +347,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 46 }, "end": { - "line": 2, + "line": 18, "column": 62 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 43 }, "end": { - "line": 2, + "line": 18, "column": 64 } } @@ -370,11 +370,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 64 } } @@ -382,11 +382,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -402,22 +402,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 72 }, "end": { - "line": 2, + "line": 18, "column": 73 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 69 }, "end": { - "line": 2, + "line": 18, "column": 73 } } @@ -433,11 +433,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 75 }, "end": { - "line": 2, + "line": 18, "column": 76 } } @@ -447,11 +447,11 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 78 }, "end": { - "line": 2, + "line": 18, "column": 79 } } @@ -459,11 +459,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 75 }, "end": { - "line": 2, + "line": 18, "column": 79 } } @@ -479,11 +479,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 81 }, "end": { - "line": 2, + "line": 18, "column": 82 } } @@ -493,11 +493,11 @@ "value": 6, "loc": { "start": { - "line": 2, + "line": 18, "column": 84 }, "end": { - "line": 2, + "line": 18, "column": 85 } } @@ -505,11 +505,11 @@ "kind": "init", "loc": { "start": { - "line": 2, + "line": 18, "column": 81 }, "end": { - "line": 2, + "line": 18, "column": 85 } } @@ -517,22 +517,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 67 }, "end": { - "line": 2, + "line": 18, "column": 87 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 87 } } @@ -541,11 +541,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 88 } } @@ -557,9 +557,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 88 } } } -TypeError: Type 'number' is not assignable to type 'boolean | string'. [objectLiteralAssignability5.ts:2:81] +TypeError: Type 'number' is not assignable to type 'boolean | string'. [objectLiteralAssignability5.ts:18:81] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability6-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability6-expected.txt index c1c94fd55c63d3e69970556959b0afd1430b1973..4d78529a1d1350cb294e94d3c2594c39203d1e4c 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability6-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability6-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -39,22 +39,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -83,22 +83,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -106,11 +106,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -129,11 +129,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -142,22 +142,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -186,22 +186,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 57 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -209,11 +209,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -221,11 +221,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -233,11 +233,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -256,11 +256,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -270,11 +270,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -282,11 +282,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -294,22 +294,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 62 }, "end": { - "line": 1, + "line": 17, "column": 73 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 73 } } @@ -318,11 +318,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 74 } } @@ -334,9 +334,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 74 } } } -TypeError: Type 'boolean' is not assignable to type 'string | number'. [objectLiteralAssignability6.ts:1:64] +TypeError: Type 'boolean' is not assignable to type 'number | string'. [objectLiteralAssignability6.ts:17:64] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability7-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability7-expected.txt index e39674a936e32769fd31e96ffdd53f0574cbf530..40166c21eb9909dc75043c6211ea2f4ec403fcd7 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability7-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability7-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -39,22 +39,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -62,11 +62,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -85,11 +85,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -98,22 +98,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -121,11 +121,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -144,11 +144,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -157,22 +157,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 52 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -180,11 +180,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -192,11 +192,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -204,11 +204,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -227,25 +227,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 60 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 62 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -253,11 +253,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -265,22 +265,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 57 }, "end": { - "line": 1, + "line": 17, "column": 69 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 69 } } @@ -289,11 +289,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -305,9 +305,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 70 } } } -TypeError: Object literal may only specify known properties, and 'b' does not exist in type '{ a: number; } | { a: string; } | { a: boolean; }' [objectLiteralAssignability7.ts:1:59] +TypeError: Object literal may only specify known properties, and "b" does not exist in type '{ a: number; } | { a: string; } | { a: boolean; }'. [objectLiteralAssignability7.ts:17:59] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability8-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability8-expected.txt index fbc9a13d13b25fd0eabec476f0bcf7db26d1b980..1cf18e8ee570abc1d1b7e63bc604d97e2d9303e8 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability8-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability8-expected.txt @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -39,22 +39,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -70,11 +70,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -83,22 +83,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -106,11 +106,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -129,11 +129,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -142,22 +142,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 46 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -173,11 +173,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -186,22 +186,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 57 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -209,11 +209,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -232,11 +232,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -245,22 +245,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 74 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -276,11 +276,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 76 }, "end": { - "line": 1, + "line": 17, "column": 77 } } @@ -289,22 +289,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 79 }, "end": { - "line": 1, + "line": 17, "column": 86 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 76 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -312,11 +312,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 62 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -324,11 +324,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 88 } } @@ -336,11 +336,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -359,25 +359,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 93 }, "end": { - "line": 1, + "line": 17, "column": 94 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 96 }, "end": { - "line": 1, + "line": 17, "column": 101 } } @@ -385,11 +385,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 93 }, "end": { - "line": 1, + "line": 17, "column": 101 } } @@ -405,26 +405,25 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 103 }, "end": { - "line": 1, + "line": 17, "column": 104 } } }, "value": { "type": "BigIntLiteral", - "value": "", - "bigint": "", + "value": "5n", "loc": { "start": { - "line": 1, + "line": 17, "column": 106 }, "end": { - "line": 1, + "line": 17, "column": 108 } } @@ -432,11 +431,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 103 }, "end": { - "line": 1, + "line": 17, "column": 108 } } @@ -444,22 +443,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 91 }, "end": { - "line": 1, + "line": 17, "column": 110 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 110 } } @@ -468,11 +467,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 111 } } @@ -484,9 +483,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 111 } } } -TypeError: Type 'bigint' is not assignable to type 'string'. [objectLiteralAssignability8.ts:1:103] +TypeError: Type 'bigint' is not assignable to type 'string'. [objectLiteralAssignability8.ts:17:103] diff --git a/es2panda/test/compiler/ts/objectLiteralAssignability9-expected.txt b/es2panda/test/compiler/ts/objectLiteralAssignability9-expected.txt index 30d0f5575232c85557257f0a6852eecd5d89dbed..9c2b720c95304e332922eaf9a3da511b229a3a1f 100644 --- a/es2panda/test/compiler/ts/objectLiteralAssignability9-expected.txt +++ b/es2panda/test/compiler/ts/objectLiteralAssignability9-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -46,11 +46,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -59,22 +59,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -90,11 +90,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -103,22 +103,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -126,22 +126,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -149,11 +149,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -161,11 +161,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -198,11 +198,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -210,11 +210,11 @@ "kind": "init", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -222,22 +222,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 50 } } @@ -246,11 +246,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -262,9 +262,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 51 } } } -TypeError: Type 'number' is not assignable to type '{ a: number; b: string; }'. [objectLiteralAssignability9.ts:1:44] +TypeError: Type 'number' is not assignable to type '{ a: number; b: string; }'. [objectLiteralAssignability9.ts:17:44] diff --git a/es2panda/test/compiler/ts/recursiveFunction-expected.txt b/es2panda/test/compiler/ts/recursiveFunction-expected.txt index 622270f811d16090464dad86247379f34b129221..fe1ecae488debd101e34557d88b7ea97ff600af6 100644 --- a/es2panda/test/compiler/ts/recursiveFunction-expected.txt +++ b/es2panda/test/compiler/ts/recursiveFunction-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -96,11 +96,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -108,11 +108,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -125,11 +125,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -140,25 +140,25 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 26 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -167,22 +167,22 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 34 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 34 } } @@ -191,11 +191,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -210,11 +210,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -225,25 +225,25 @@ "value": 2, "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 17 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -252,22 +252,22 @@ "optional": false, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -279,22 +279,22 @@ "value": 12, "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -302,33 +302,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -345,11 +345,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 11 } } @@ -357,11 +357,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -369,11 +369,11 @@ "init": null, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -382,11 +382,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 12 } } @@ -402,11 +402,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -419,11 +419,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 8, + "line": 24, "column": 12 } } @@ -434,25 +434,25 @@ "value": 2, "loc": { "start": { - "line": 8, + "line": 24, "column": 13 }, "end": { - "line": 8, + "line": 24, "column": 14 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 8, + "line": 24, "column": 16 }, "end": { - "line": 8, + "line": 24, "column": 21 } } @@ -461,22 +461,22 @@ "optional": false, "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 8, + "line": 24, "column": 22 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 22 } } @@ -485,11 +485,11 @@ "kind": "var", "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 23 } } @@ -501,8 +501,9 @@ "column": 1 }, "end": { - "line": 8, - "column": 23 + "line": 25, + "column": 1 } } } +TypeError: foo implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. [recursiveFunction.ts:17:10] diff --git a/es2panda/test/compiler/ts/recursiveFunction.ts b/es2panda/test/compiler/ts/recursiveFunction.ts index a11d766b9a7eece2fe90e3311075786b15901f2b..a678156dfc00d6abd31f666cfa052ff2fb752f52 100644 --- a/es2panda/test/compiler/ts/recursiveFunction.ts +++ b/es2panda/test/compiler/ts/recursiveFunction.ts @@ -21,4 +21,4 @@ function foo(a: number, b: string) { } var b: any; -var b = foo(2, "bar"); \ No newline at end of file +var b = foo(2, "bar"); diff --git a/es2panda/test/compiler/ts/recursiveTypeofWithProperty-expected.txt b/es2panda/test/compiler/ts/recursiveTypeofWithProperty-expected.txt index dfa118d3fca112cbda7b30f92c36fee37b9f8df6..134210b4f806f6f21d6603434970d3655d2034df 100644 --- a/es2panda/test/compiler/ts/recursiveTypeofWithProperty-expected.txt +++ b/es2panda/test/compiler/ts/recursiveTypeofWithProperty-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -46,11 +46,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -82,22 +82,22 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 21 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -108,44 +108,44 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 23 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 25 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -161,11 +161,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 4, + "line": 20, "column": 20 } } @@ -199,22 +199,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 21 }, "end": { - "line": 4, + "line": 20, "column": 22 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 4, + "line": 20, "column": 22 } } @@ -225,22 +225,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 23 }, "end": { - "line": 4, + "line": 20, "column": 24 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 4, + "line": 20, "column": 24 } } @@ -251,44 +251,44 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 25 }, "end": { - "line": 4, + "line": 20, "column": 26 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 5, + "line": 21, "column": 6 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 6 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -296,22 +296,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -327,11 +327,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -350,11 +350,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 10 } } @@ -371,11 +371,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 19 }, "end": { - "line": 7, + "line": 23, "column": 20 } } @@ -386,22 +386,22 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 21 }, "end": { - "line": 7, + "line": 23, "column": 22 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 19 }, "end": { - "line": 7, + "line": 23, "column": 22 } } @@ -412,44 +412,44 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 24 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 19 }, "end": { - "line": 7, + "line": 23, "column": 25 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 25 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 25 } } @@ -465,11 +465,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 8, + "line": 24, "column": 10 } } @@ -488,11 +488,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 14 } } @@ -509,11 +509,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 24 } } @@ -524,22 +524,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 26 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 26 } } @@ -550,44 +550,44 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 27 }, "end": { - "line": 9, + "line": 25, "column": 28 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 23 }, "end": { - "line": 9, + "line": 25, "column": 29 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 16 }, "end": { - "line": 9, + "line": 25, "column": 29 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 29 } } @@ -603,11 +603,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 10, + "line": 26, "column": 14 } } @@ -616,22 +616,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 16 }, "end": { - "line": 10, + "line": 26, "column": 22 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 11, + "line": 27, "column": 10 } } @@ -639,22 +639,22 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 12 }, "end": { - "line": 11, + "line": 27, "column": 10 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -662,22 +662,22 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 12, + "line": 28, "column": 6 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 2 } } @@ -685,11 +685,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 2 } } @@ -697,11 +697,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -709,11 +709,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -722,11 +722,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 3 } } @@ -738,9 +738,9 @@ "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 1 } } } -TypeError: 'z' is referenced directly or indirectly in its own type annotation. [recursiveTypeofWithProperty.ts:7:23] +TypeError: 'c' is referenced directly or indirectly in its own initializer ot type annotation. [recursiveTypeofWithProperty.ts:23:9] diff --git a/es2panda/test/compiler/ts/test-interface-expected.txt b/es2panda/test/compiler/ts/test-interface-expected.txt index 8e5ff32590dc655ce4d3de8c19b020c6da8b07a3..e2c6a65afbe6d662b248c8018abf898efb44d809 100644 --- a/es2panda/test/compiler/ts/test-interface-expected.txt +++ b/es2panda/test/compiler/ts/test-interface-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -77,11 +77,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -90,11 +90,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -102,22 +102,22 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -132,11 +132,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -155,11 +155,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 14 }, "end": { - "line": 4, + "line": 20, "column": 20 } } @@ -167,11 +167,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -183,11 +183,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 25 }, "end": { - "line": 4, + "line": 20, "column": 29 } } @@ -195,11 +195,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 22 }, "end": { - "line": 4, + "line": 20, "column": 23 } } @@ -209,22 +209,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 34 }, "end": { - "line": 4, + "line": 20, "column": 40 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 40 } } @@ -232,11 +232,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -250,22 +250,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 52 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 54 } } @@ -274,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 42 }, "end": { - "line": 4, + "line": 20, "column": 43 } } @@ -288,22 +288,22 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 57 }, "end": { - "line": 4, + "line": 20, "column": 66 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 67 } } @@ -318,11 +318,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -330,11 +330,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -344,22 +344,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 5, + "line": 21, "column": 24 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -374,11 +374,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -386,11 +386,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 6 }, "end": { - "line": 6, + "line": 22, "column": 7 } } @@ -400,22 +400,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 24 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -430,11 +430,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 13 } } @@ -447,11 +447,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 18 }, "end": { - "line": 7, + "line": 23, "column": 24 } } @@ -459,11 +459,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 15 }, "end": { - "line": 7, + "line": 23, "column": 16 } } @@ -473,22 +473,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 27 }, "end": { - "line": 7, + "line": 23, "column": 33 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 34 } } @@ -502,11 +502,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 14 } } @@ -514,11 +514,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 6 }, "end": { - "line": 8, + "line": 24, "column": 7 } } @@ -527,11 +527,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 16 }, "end": { - "line": 8, + "line": 24, "column": 22 } } @@ -539,11 +539,11 @@ "readonly": false, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 23 } } @@ -558,11 +558,11 @@ "type": "TSNullKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 12 }, "end": { - "line": 9, + "line": 25, "column": 16 } } @@ -570,11 +570,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 9 }, "end": { - "line": 9, + "line": 25, "column": 10 } } @@ -586,11 +586,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 22 }, "end": { - "line": 9, + "line": 25, "column": 28 } } @@ -599,11 +599,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 18 }, "end": { - "line": 9, + "line": 25, "column": 19 } } @@ -623,11 +623,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 33 }, "end": { - "line": 9, + "line": 25, "column": 34 } } @@ -636,22 +636,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 36 }, "end": { - "line": 9, + "line": 25, "column": 42 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 33 }, "end": { - "line": 9, + "line": 25, "column": 43 } } @@ -667,11 +667,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 44 }, "end": { - "line": 9, + "line": 25, "column": 45 } } @@ -680,22 +680,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 47 }, "end": { - "line": 9, + "line": 25, "column": 53 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 44 }, "end": { - "line": 9, + "line": 25, "column": 54 } } @@ -710,11 +710,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 55 }, "end": { - "line": 9, + "line": 25, "column": 56 } } @@ -729,11 +729,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 59 }, "end": { - "line": 9, + "line": 25, "column": 60 } } @@ -744,11 +744,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 62 }, "end": { - "line": 9, + "line": 25, "column": 63 } } @@ -756,11 +756,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 58 }, "end": { - "line": 9, + "line": 25, "column": 64 } } @@ -770,22 +770,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 67 }, "end": { - "line": 9, + "line": 25, "column": 73 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 55 }, "end": { - "line": 9, + "line": 25, "column": 75 } } @@ -793,22 +793,22 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 31 }, "end": { - "line": 9, + "line": 25, "column": 75 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 2 } } @@ -816,11 +816,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 10, + "line": 26, "column": 2 } } @@ -831,11 +831,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -843,11 +843,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 2 } } @@ -868,11 +868,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 14 }, "end": { - "line": 13, + "line": 29, "column": 15 } } @@ -881,22 +881,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 18 }, "end": { - "line": 13, + "line": 29, "column": 24 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 25 } } @@ -912,11 +912,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 14 }, "end": { - "line": 14, + "line": 30, "column": 15 } } @@ -928,11 +928,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 17 }, "end": { - "line": 14, + "line": 30, "column": 23 } } @@ -941,11 +941,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 26 }, "end": { - "line": 14, + "line": 30, "column": 33 } } @@ -953,22 +953,22 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 17 }, "end": { - "line": 14, + "line": 30, "column": 33 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 34 } } @@ -982,11 +982,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 17 }, "end": { - "line": 15, + "line": 31, "column": 23 } } @@ -994,11 +994,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 15 }, "end": { - "line": 15, + "line": 31, "column": 16 } } @@ -1007,11 +1007,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 25 }, "end": { - "line": 15, + "line": 31, "column": 31 } } @@ -1019,11 +1019,11 @@ "readonly": true, "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -1031,11 +1031,11 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -1046,11 +1046,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 11 }, "end": { - "line": 12, + "line": 28, "column": 14 } } @@ -1058,11 +1058,11 @@ "extends": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -1074,7 +1074,7 @@ "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 2 } } diff --git a/es2panda/test/compiler/ts/test-interface4-expected.txt b/es2panda/test/compiler/ts/test-interface4-expected.txt index b80117748bd917ef33dce403167c378649e17844..611715743e9795342b2047e5a00d65ff8325c3f2 100644 --- a/es2panda/test/compiler/ts/test-interface4-expected.txt +++ b/es2panda/test/compiler/ts/test-interface4-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected [test-interface4.ts:1:27] +SyntaxError: ';' expected [test-interface4.ts:17:27] diff --git a/es2panda/test/compiler/ts/test-interface5-expected.txt b/es2panda/test/compiler/ts/test-interface5-expected.txt index 6c41402d92b311c996175f42bb091c52c85ad6e3..782ae65beca3d01bd788cf208cddebbd0133672e 100644 --- a/es2panda/test/compiler/ts/test-interface5-expected.txt +++ b/es2panda/test/compiler/ts/test-interface5-expected.txt @@ -1 +1 @@ -SyntaxError: 'readonly' modifier can only appear on a property declaration or index signature. [test-interface5.ts:1:15] +SyntaxError: 'readonly' modifier can only appear on a property declaration or index signature. [test-interface5.ts:17:15] diff --git a/es2panda/test/compiler/ts/test-interface6-expected.txt b/es2panda/test/compiler/ts/test-interface6-expected.txt index 7d55b07ee8878eb85b723c09d776bf1653cd1b54..fb26065400a2e4a965997d3db9f6da7aa79d3178 100644 --- a/es2panda/test/compiler/ts/test-interface6-expected.txt +++ b/es2panda/test/compiler/ts/test-interface6-expected.txt @@ -1 +1 @@ -SyntaxError: 'readonly' modifier can only appear on a property declaration or index signature. [test-interface6.ts:1:15] +SyntaxError: 'readonly' modifier can only appear on a property declaration or index signature. [test-interface6.ts:17:15] diff --git a/es2panda/test/compiler/ts/test-interface7-expected.txt b/es2panda/test/compiler/ts/test-interface7-expected.txt index 969f7021d26bfd4bb43d31eed4022c56c5ee00ae..6a795b8f88b36f6180739d3605bd3248dc49aa6e 100644 --- a/es2panda/test/compiler/ts/test-interface7-expected.txt +++ b/es2panda/test/compiler/ts/test-interface7-expected.txt @@ -1 +1 @@ -SyntaxError: An index signature must have a type annotation. [test-interface7.ts:1:15] +SyntaxError: An index signature must have a type annotation. [test-interface7.ts:17:15] diff --git a/es2panda/test/compiler/ts/test-type-literal-expected.txt b/es2panda/test/compiler/ts/test-type-literal-expected.txt index eecb754c17104d80c390f9748e3ef6cc7f9232b5..b982eec2613d7de90e10c4a768c6206c2d61bc76 100644 --- a/es2panda/test/compiler/ts/test-type-literal-expected.txt +++ b/es2panda/test/compiler/ts/test-type-literal-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -76,22 +76,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -107,11 +107,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -120,22 +120,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 54 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -150,11 +150,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -163,14 +163,27 @@ { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 17, + "column": 62 + }, + "end": { + "line": 17, + "column": 68 + } + } + }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 60 } } @@ -184,12 +197,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 63 + "line": 17, + "column": 71 }, "end": { - "line": 1, - "column": 64 + "line": 17, + "column": 72 } } }, @@ -199,75 +212,101 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 66 + "line": 17, + "column": 74 }, "end": { - "line": 1, - "column": 67 + "line": 17, + "column": 75 } } } ], "loc": { "start": { - "line": 1, - "column": 62 + "line": 17, + "column": 70 }, "end": { - "line": 1, - "column": 68 + "line": 17, + "column": 76 } } }, { "type": "Identifier", "name": "k", + "typeAnnotation": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 17, + "column": 82 + }, + "end": { + "line": 17, + "column": 88 + } + } + }, "optional": true, "decorators": [], "loc": { "start": { - "line": 1, - "column": 70 + "line": 17, + "column": 78 }, "end": { - "line": 1, - "column": 71 + "line": 17, + "column": 79 } } } ], + "typeAnnotation": { + "type": "TSBooleanKeyword", + "loc": { + "start": { + "line": 17, + "column": 91 + }, + "end": { + "line": 17, + "column": 98 + } + } + }, "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, - "column": 75 + "line": 17, + "column": 100 } } } ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, - "column": 75 + "line": 17, + "column": 100 } } }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -275,11 +314,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -288,11 +327,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -319,11 +358,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -332,22 +371,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -363,11 +402,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -376,22 +415,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 30 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -407,11 +446,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 32 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -420,22 +459,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 36 }, "end": { - "line": 2, + "line": 18, "column": 42 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 32 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -443,11 +482,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -455,11 +494,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -467,11 +506,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -480,11 +519,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -510,11 +549,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -527,11 +566,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -539,11 +578,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -557,22 +596,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 32 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 34 } } @@ -580,24 +619,37 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 23 }, "end": { - "line": 3, + "line": 19, "column": 24 } } } ], + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 40 + } + } + }, "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, - "column": 36 + "line": 19, + "column": 41 } } }, @@ -611,39 +663,67 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, - "column": 41 + "line": 19, + "column": 46 }, "end": { - "line": 3, - "column": 48 + "line": 19, + "column": 53 } } }, "decorators": [], "loc": { "start": { - "line": 3, - "column": 38 + "line": 19, + "column": 43 }, "end": { - "line": 3, - "column": 39 + "line": 19, + "column": 44 } } }, { "type": "Identifier", "name": "e", + "typeAnnotation": { + "type": "TSTupleType", + "elementTypes": [ + { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 19, + "column": 59 + }, + "end": { + "line": 19, + "column": 66 + } + } + } + ], + "loc": { + "start": { + "line": 19, + "column": 58 + }, + "end": { + "line": 19, + "column": 66 + } + } + }, "decorators": [], "loc": { "start": { - "line": 3, - "column": 50 + "line": 19, + "column": 55 }, "end": { - "line": 3, - "column": 51 + "line": 19, + "column": 56 } } } @@ -658,24 +738,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, - "column": 58 + "line": 19, + "column": 73 }, "end": { - "line": 3, - "column": 64 + "line": 19, + "column": 79 } } }, "decorators": [], "loc": { "start": { - "line": 3, - "column": 55 + "line": 19, + "column": 70 }, "end": { - "line": 3, - "column": 56 + "line": 19, + "column": 71 } } }, @@ -686,24 +766,24 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, - "column": 69 + "line": 19, + "column": 84 }, "end": { - "line": 3, - "column": 75 + "line": 19, + "column": 90 } } }, "decorators": [], "loc": { "start": { - "line": 3, - "column": 66 + "line": 19, + "column": 81 }, "end": { - "line": 3, - "column": 67 + "line": 19, + "column": 82 } } } @@ -712,57 +792,57 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, - "column": 80 + "line": 19, + "column": 95 }, "end": { - "line": 3, - "column": 86 + "line": 19, + "column": 101 } } }, "loc": { "start": { - "line": 3, - "column": 54 + "line": 19, + "column": 69 }, "end": { - "line": 3, - "column": 86 + "line": 19, + "column": 101 } } }, "loc": { "start": { - "line": 3, - "column": 37 + "line": 19, + "column": 42 }, "end": { - "line": 3, - "column": 88 + "line": 19, + "column": 103 } } } ], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, - "column": 88 + "line": 19, + "column": 103 } } }, "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -770,11 +850,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -783,11 +863,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -810,14 +890,14 @@ "readonly": false, "key": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -826,22 +906,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 4, + "line": 20, "column": 26 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 27 } } @@ -855,11 +935,11 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 29 }, "end": { - "line": 4, + "line": 20, "column": 30 } } @@ -872,11 +952,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 35 }, "end": { - "line": 4, + "line": 20, "column": 44 } } @@ -884,11 +964,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 32 }, "end": { - "line": 4, + "line": 20, "column": 33 } } @@ -900,11 +980,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 50 }, "end": { - "line": 4, + "line": 20, "column": 53 } } @@ -913,11 +993,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 47 } } @@ -927,22 +1007,22 @@ "type": "TSNullKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 56 }, "end": { - "line": 4, + "line": 20, "column": 60 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 28 }, "end": { - "line": 4, + "line": 20, "column": 62 } } @@ -950,11 +1030,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 62 } } @@ -962,11 +1042,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -974,11 +1054,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -987,11 +1067,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -1018,12 +1098,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 10 + "line": 22, + "column": 5 }, "end": { - "line": 5, - "column": 11 + "line": 22, + "column": 6 } } }, @@ -1031,23 +1111,23 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, - "column": 13 + "line": 22, + "column": 8 }, "end": { - "line": 5, - "column": 19 + "line": 22, + "column": 14 } } }, "loc": { "start": { - "line": 5, - "column": 10 + "line": 22, + "column": 5 }, "end": { - "line": 5, - "column": 20 + "line": 22, + "column": 15 } } }, @@ -1061,12 +1141,12 @@ "value": 5, "loc": { "start": { - "line": 5, - "column": 21 + "line": 22, + "column": 16 }, "end": { - "line": 5, - "column": 22 + "line": 22, + "column": 17 } } }, @@ -1074,23 +1154,23 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, - "column": 24 + "line": 22, + "column": 19 }, "end": { - "line": 5, - "column": 30 + "line": 22, + "column": 25 } } }, "loc": { "start": { - "line": 5, - "column": 21 + "line": 22, + "column": 16 }, "end": { - "line": 5, - "column": 31 + "line": 22, + "column": 26 } } }, @@ -1105,12 +1185,12 @@ "decorators": [], "loc": { "start": { - "line": 5, - "column": 32 + "line": 22, + "column": 27 }, "end": { - "line": 5, - "column": 33 + "line": 22, + "column": 28 } } }, @@ -1118,23 +1198,23 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, - "column": 36 + "line": 22, + "column": 31 }, "end": { - "line": 5, - "column": 42 + "line": 22, + "column": 37 } } }, "loc": { "start": { - "line": 5, - "column": 32 + "line": 22, + "column": 27 }, "end": { - "line": 5, - "column": 43 + "line": 22, + "column": 38 } } }, @@ -1148,12 +1228,12 @@ "value": 6, "loc": { "start": { - "line": 5, - "column": 44 + "line": 22, + "column": 39 }, "end": { - "line": 5, - "column": 45 + "line": 22, + "column": 40 } } }, @@ -1161,23 +1241,23 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, - "column": 48 + "line": 22, + "column": 43 }, "end": { - "line": 5, - "column": 54 + "line": 22, + "column": 49 } } }, "loc": { "start": { - "line": 5, - "column": 44 + "line": 22, + "column": 39 }, "end": { - "line": 5, - "column": 55 + "line": 22, + "column": 50 } } }, @@ -1192,11 +1272,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 23, "column": 14 }, "end": { - "line": 6, + "line": 23, "column": 15 } } @@ -1205,22 +1285,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 23, "column": 17 }, "end": { - "line": 6, + "line": 23, "column": 23 } } }, "loc": { "start": { - "line": 6, + "line": 23, "column": 5 }, "end": { - "line": 6, + "line": 23, "column": 24 } } @@ -1235,11 +1315,11 @@ "value": 7, "loc": { "start": { - "line": 6, + "line": 23, "column": 34 }, "end": { - "line": 6, + "line": 23, "column": 35 } } @@ -1248,22 +1328,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 23, "column": 37 }, "end": { - "line": 6, + "line": 23, "column": 43 } } }, "loc": { "start": { - "line": 6, + "line": 23, "column": 25 }, "end": { - "line": 6, + "line": 23, "column": 44 } } @@ -1279,11 +1359,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 23, "column": 54 }, "end": { - "line": 6, + "line": 23, "column": 55 } } @@ -1292,22 +1372,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 23, "column": 58 }, "end": { - "line": 6, + "line": 23, "column": 64 } } }, "loc": { "start": { - "line": 6, + "line": 23, "column": 45 }, "end": { - "line": 6, + "line": 23, "column": 65 } } @@ -1322,11 +1402,11 @@ "value": 8, "loc": { "start": { - "line": 6, + "line": 23, "column": 75 }, "end": { - "line": 6, + "line": 23, "column": 76 } } @@ -1335,46 +1415,46 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 23, "column": 79 }, "end": { - "line": 6, + "line": 23, "column": 85 } } }, "loc": { "start": { - "line": 6, + "line": 23, "column": 66 }, "end": { - "line": 6, - "column": 86 + "line": 24, + "column": 2 } } } ], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 6, - "column": 86 + "line": 24, + "column": 2 } } }, "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -1382,11 +1462,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -1395,12 +1475,12 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 6, - "column": 87 + "line": 24, + "column": 3 } } }, @@ -1424,24 +1504,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, - "column": 12 + "line": 26, + "column": 14 }, "end": { - "line": 8, - "column": 18 + "line": 26, + "column": 20 } } }, "decorators": [], "loc": { "start": { - "line": 8, - "column": 10 + "line": 26, + "column": 11 }, "end": { - "line": 8, - "column": 11 + "line": 26, + "column": 12 } } }, @@ -1449,24 +1529,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, - "column": 20 + "line": 26, + "column": 23 }, "end": { - "line": 8, - "column": 26 + "line": 26, + "column": 29 } } }, "readonly": false, "loc": { "start": { - "line": 8, - "column": 9 + "line": 26, + "column": 10 }, "end": { - "line": 8, - "column": 27 + "line": 26, + "column": 30 } } }, @@ -1480,12 +1560,12 @@ "decorators": [], "loc": { "start": { - "line": 8, - "column": 28 + "line": 26, + "column": 31 }, "end": { - "line": 8, - "column": 36 + "line": 26, + "column": 39 } } }, @@ -1497,24 +1577,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, - "column": 40 + "line": 26, + "column": 43 }, "end": { - "line": 8, - "column": 46 + "line": 26, + "column": 49 } } }, "decorators": [], "loc": { "start": { - "line": 8, - "column": 38 + "line": 26, + "column": 40 }, "end": { - "line": 8, - "column": 39 + "line": 26, + "column": 41 } } } @@ -1523,46 +1603,46 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 8, - "column": 48 + "line": 26, + "column": 52 }, "end": { - "line": 8, - "column": 54 + "line": 26, + "column": 58 } } }, "loc": { "start": { - "line": 8, - "column": 28 + "line": 26, + "column": 31 }, "end": { - "line": 8, - "column": 55 + "line": 26, + "column": 60 } } } ], "loc": { "start": { - "line": 8, + "line": 26, "column": 8 }, "end": { - "line": 8, - "column": 55 + "line": 26, + "column": 60 } } }, "decorators": [], "loc": { "start": { - "line": 8, + "line": 26, "column": 5 }, "end": { - "line": 8, + "line": 26, "column": 6 } } @@ -1570,11 +1650,11 @@ "init": null, "loc": { "start": { - "line": 8, + "line": 26, "column": 5 }, "end": { - "line": 8, + "line": 26, "column": 6 } } @@ -1583,12 +1663,12 @@ "kind": "var", "loc": { "start": { - "line": 8, + "line": 26, "column": 1 }, "end": { - "line": 8, - "column": 56 + "line": 26, + "column": 61 } } }, @@ -1612,24 +1692,24 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 9, - "column": 21 + "line": 27, + "column": 23 }, "end": { - "line": 9, - "column": 27 + "line": 27, + "column": 29 } } }, "decorators": [], "loc": { "start": { - "line": 9, - "column": 19 + "line": 27, + "column": 20 }, "end": { - "line": 9, - "column": 20 + "line": 27, + "column": 21 } } }, @@ -1637,47 +1717,47 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 9, - "column": 29 + "line": 27, + "column": 32 }, "end": { - "line": 9, - "column": 35 + "line": 27, + "column": 38 } } }, "readonly": true, "loc": { "start": { - "line": 9, - "column": 9 + "line": 27, + "column": 10 }, "end": { - "line": 9, - "column": 36 + "line": 27, + "column": 40 } } } ], "loc": { "start": { - "line": 9, + "line": 27, "column": 8 }, "end": { - "line": 9, - "column": 36 + "line": 27, + "column": 40 } } }, "decorators": [], "loc": { "start": { - "line": 9, + "line": 27, "column": 5 }, "end": { - "line": 9, + "line": 27, "column": 6 } } @@ -1685,11 +1765,11 @@ "init": null, "loc": { "start": { - "line": 9, + "line": 27, "column": 5 }, "end": { - "line": 9, + "line": 27, "column": 6 } } @@ -1698,12 +1778,12 @@ "kind": "var", "loc": { "start": { - "line": 9, + "line": 27, "column": 1 }, "end": { - "line": 9, - "column": 37 + "line": 27, + "column": 41 } } } @@ -1714,8 +1794,8 @@ "column": 1 }, "end": { - "line": 9, - "column": 37 + "line": 29, + "column": 1 } } } diff --git a/es2panda/test/compiler/ts/test-type-literal.ts b/es2panda/test/compiler/ts/test-type-literal.ts index 9d0f8196e447026623ef5c8edc359abe2a983ba8..e9419768cdd9eac60ccadece6c0cc0c105633be9 100644 --- a/es2panda/test/compiler/ts/test-type-literal.ts +++ b/es2panda/test/compiler/ts/test-type-literal.ts @@ -14,12 +14,15 @@ */ -var a: { new(a: number, b: string): number; a: string; b?(a, [c, d], k?) } +var a: { new(a: number, b: string): number; a: string; b?(a: number, [c, d], k?: string): boolean } var b: { a: number, b: number; c?: string } -var c: { a(a: number, b: string[]), (d: boolean, e): (g: number, l: string) => string } +var c: { a(a: number, b: string[]): any, (d: boolean, e: [number]): (g: number, l: string) => string } var d: { ["foo"]: boolean, [5](a: undefined, b?: any): null } -var e: { a: number, 5: number; b?: string, 6?: number, - readonly c: number, readonly 7: number; readonly d?: string, readonly 8?: number}; +var e: { + a: number, 5: number; b?: string, 6?: number, + readonly c: number, readonly 7: number; readonly d?: string, readonly 8?: number +}; + +var f: { [a: number]: number, readonly(a: number): string }; +var g: { readonly [a: number]: number }; -var f: {[a:number]:number, readonly (a:number):string}; -var g: {readonly [a:number]:number}; \ No newline at end of file diff --git a/es2panda/test/compiler/ts/test-type-literal4-expected.txt b/es2panda/test/compiler/ts/test-type-literal4-expected.txt index a009866db586a4c154f03ee9a66a3b8fb042a7f9..85ae455a3f0c053964ede9116d5e9ea029d83143 100644 --- a/es2panda/test/compiler/ts/test-type-literal4-expected.txt +++ b/es2panda/test/compiler/ts/test-type-literal4-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected [test-type-literal4.ts:1:21] +SyntaxError: ';' expected [test-type-literal4.ts:17:21] diff --git a/es2panda/test/compiler/ts/test-type-literal5-expected.txt b/es2panda/test/compiler/ts/test-type-literal5-expected.txt index b731ac04d0337c51b2d23128798a0abf61e688ae..2884353ac8d4a755e655f5ebdcb5d576e4210f9d 100644 --- a/es2panda/test/compiler/ts/test-type-literal5-expected.txt +++ b/es2panda/test/compiler/ts/test-type-literal5-expected.txt @@ -1 +1 @@ -SyntaxError: 'readonly' modifier can only appear on a property declaration or index signature. [test-type-literal5.ts:1:10] +SyntaxError: 'readonly' modifier can only appear on a property declaration or index signature. [test-type-literal5.ts:17:10] diff --git a/es2panda/test/compiler/ts/test-type-literal6-expected.txt b/es2panda/test/compiler/ts/test-type-literal6-expected.txt index c1368f4c650d9ab8dc1c795e1af75832395ab47e..1976a83172d91ab7f96138c05ea509d594c336d0 100644 --- a/es2panda/test/compiler/ts/test-type-literal6-expected.txt +++ b/es2panda/test/compiler/ts/test-type-literal6-expected.txt @@ -1 +1 @@ -SyntaxError: 'readonly' modifier can only appear on a property declaration or index signature. [test-type-literal6.ts:1:10] +SyntaxError: 'readonly' modifier can only appear on a property declaration or index signature. [test-type-literal6.ts:17:10] diff --git a/es2panda/test/compiler/ts/test-type-literal7-expected.txt b/es2panda/test/compiler/ts/test-type-literal7-expected.txt index d3a2912298c55e3a18913bb4f7a66440a71cd8de..8222d35d719aefee652892e1e582de22a8b637ab 100644 --- a/es2panda/test/compiler/ts/test-type-literal7-expected.txt +++ b/es2panda/test/compiler/ts/test-type-literal7-expected.txt @@ -1 +1 @@ -SyntaxError: An index signature must have a type annotation. [test-type-literal7.ts:1:10] +SyntaxError: An index signature must have a type annotation. [test-type-literal7.ts:17:10] diff --git a/es2panda/test/compiler/ts/tupleAssignability-expected.txt b/es2panda/test/compiler/ts/tupleAssignability-expected.txt index ffacf20ca95c868f73826d6450aee3ebf419ae40..8225600c82f737858e3cef46afb0abd883df0160 100644 --- a/es2panda/test/compiler/ts/tupleAssignability-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability-expected.txt @@ -14,11 +14,11 @@ "elementTypes": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -40,22 +40,22 @@ "elements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -64,11 +64,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -92,11 +92,11 @@ "elementTypes": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -104,11 +104,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -116,11 +116,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -148,11 +148,11 @@ "elements": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -160,11 +160,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 27 } } @@ -172,22 +172,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 28 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 28 } } @@ -196,11 +196,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -220,11 +220,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -233,11 +233,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 22 }, "end": { - "line": 3, + "line": 19, "column": 29 } } @@ -246,11 +246,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 30 }, "end": { - "line": 3, + "line": 19, "column": 37 } } @@ -258,11 +258,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 37 } } @@ -270,11 +270,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -287,11 +287,11 @@ "value": 1, "loc": { "start": { - "line": 3, + "line": 19, "column": 41 }, "end": { - "line": 3, + "line": 19, "column": 42 } } @@ -301,11 +301,11 @@ "value": 2, "loc": { "start": { - "line": 3, + "line": 19, "column": 44 }, "end": { - "line": 3, + "line": 19, "column": 45 } } @@ -315,11 +315,11 @@ "value": 3, "loc": { "start": { - "line": 3, + "line": 19, "column": 47 }, "end": { - "line": 3, + "line": 19, "column": 48 } } @@ -327,22 +327,22 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 40 }, "end": { - "line": 3, + "line": 19, "column": 49 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 49 } } @@ -351,11 +351,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 50 } } @@ -379,22 +379,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 21 }, "end": { - "line": 4, + "line": 20, "column": 27 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 14 }, "end": { - "line": 4, + "line": 20, "column": 28 } } @@ -403,11 +403,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 29 }, "end": { - "line": 4, + "line": 20, "column": 36 } } @@ -415,11 +415,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 36 } } @@ -427,11 +427,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -444,25 +444,25 @@ "elements": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 40 }, "end": { - "line": 4, + "line": 20, "column": 42 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 44 }, "end": { - "line": 4, + "line": 20, "column": 49 } } @@ -470,22 +470,22 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 39 }, "end": { - "line": 4, + "line": 20, "column": 50 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 50 } } @@ -494,11 +494,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 51 } } @@ -523,11 +523,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 5, + "line": 21, "column": 24 } } @@ -538,22 +538,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 15 }, "end": { - "line": 5, + "line": 21, "column": 16 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 15 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -564,11 +564,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 30 }, "end": { - "line": 5, + "line": 21, "column": 36 } } @@ -579,11 +579,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 26 }, "end": { - "line": 5, + "line": 21, "column": 27 } } @@ -591,11 +591,11 @@ "optional": true, "loc": { "start": { - "line": 5, + "line": 21, "column": 26 }, "end": { - "line": 5, + "line": 21, "column": 37 } } @@ -603,11 +603,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 14 }, "end": { - "line": 5, + "line": 21, "column": 38 } } @@ -622,11 +622,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 40 }, "end": { - "line": 5, + "line": 21, "column": 47 } } @@ -635,11 +635,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 50 }, "end": { - "line": 5, + "line": 21, "column": 56 } } @@ -647,11 +647,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 40 }, "end": { - "line": 5, + "line": 21, "column": 57 } } @@ -662,22 +662,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 58 }, "end": { - "line": 5, + "line": 21, "column": 64 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 58 }, "end": { - "line": 5, + "line": 21, "column": 67 } } @@ -685,11 +685,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 39 }, "end": { - "line": 5, + "line": 21, "column": 68 } } @@ -697,11 +697,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 68 } } @@ -709,11 +709,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -729,11 +729,11 @@ "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 73 }, "end": { - "line": 5, + "line": 21, "column": 74 } } @@ -741,11 +741,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 72 }, "end": { - "line": 5, + "line": 21, "column": 75 } } @@ -755,14 +755,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 78 }, "end": { - "line": 5, + "line": 21, "column": 83 } } @@ -775,11 +775,11 @@ "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 86 }, "end": { - "line": 5, + "line": 21, "column": 87 } } @@ -789,11 +789,11 @@ "value": 2, "loc": { "start": { - "line": 5, + "line": 21, "column": 89 }, "end": { - "line": 5, + "line": 21, "column": 90 } } @@ -803,11 +803,11 @@ "value": 3, "loc": { "start": { - "line": 5, + "line": 21, "column": 92 }, "end": { - "line": 5, + "line": 21, "column": 93 } } @@ -815,11 +815,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 85 }, "end": { - "line": 5, + "line": 21, "column": 94 } } @@ -827,11 +827,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 77 }, "end": { - "line": 5, + "line": 21, "column": 95 } } @@ -839,22 +839,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 71 }, "end": { - "line": 5, + "line": 21, "column": 96 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 96 } } @@ -863,11 +863,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 97 } } @@ -890,11 +890,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 14 }, "end": { - "line": 7, + "line": 23, "column": 21 } } @@ -902,11 +902,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 13 }, "end": { - "line": 7, + "line": 23, "column": 21 } } @@ -918,11 +918,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 25 }, "end": { - "line": 7, + "line": 23, "column": 32 } } @@ -930,11 +930,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 24 }, "end": { - "line": 7, + "line": 23, "column": 32 } } @@ -942,11 +942,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 13 }, "end": { - "line": 7, + "line": 23, "column": 32 } } @@ -954,11 +954,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 11 } } @@ -971,11 +971,11 @@ "value": 5, "loc": { "start": { - "line": 7, + "line": 23, "column": 36 }, "end": { - "line": 7, + "line": 23, "column": 37 } } @@ -983,22 +983,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 35 }, "end": { - "line": 7, + "line": 23, "column": 38 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 38 } } @@ -1007,11 +1007,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 39 } } @@ -1034,11 +1034,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 14 }, "end": { - "line": 8, + "line": 24, "column": 21 } } @@ -1047,11 +1047,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 22 }, "end": { - "line": 8, + "line": 24, "column": 29 } } @@ -1059,11 +1059,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 13 }, "end": { - "line": 8, + "line": 24, "column": 29 } } @@ -1072,11 +1072,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 32 }, "end": { - "line": 8, + "line": 24, "column": 38 } } @@ -1085,11 +1085,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 41 }, "end": { - "line": 8, + "line": 24, "column": 47 } } @@ -1097,11 +1097,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 13 }, "end": { - "line": 8, + "line": 24, "column": 47 } } @@ -1109,11 +1109,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 11 } } @@ -1126,25 +1126,25 @@ "value": 5, "loc": { "start": { - "line": 8, + "line": 24, "column": 51 }, "end": { - "line": 8, + "line": 24, "column": 52 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 8, + "line": 24, "column": 54 }, "end": { - "line": 8, + "line": 24, "column": 59 } } @@ -1152,22 +1152,22 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 50 }, "end": { - "line": 8, + "line": 24, "column": 60 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 60 } } @@ -1176,11 +1176,11 @@ "kind": "var", "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 61 } } @@ -1207,11 +1207,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 14 }, "end": { - "line": 9, + "line": 25, "column": 21 } } @@ -1230,11 +1230,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 26 }, "end": { - "line": 9, + "line": 25, "column": 27 } } @@ -1243,22 +1243,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 29 }, "end": { - "line": 9, + "line": 25, "column": 35 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 26 }, "end": { - "line": 9, + "line": 25, "column": 36 } } @@ -1274,11 +1274,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 37 }, "end": { - "line": 9, + "line": 25, "column": 38 } } @@ -1287,22 +1287,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 40 }, "end": { - "line": 9, + "line": 25, "column": 46 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 37 }, "end": { - "line": 9, + "line": 25, "column": 48 } } @@ -1310,11 +1310,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 24 }, "end": { - "line": 9, + "line": 25, "column": 48 } } @@ -1322,33 +1322,33 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 14 }, "end": { - "line": 9, + "line": 25, "column": 48 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 49 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 51 } } @@ -1360,11 +1360,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 55 }, "end": { - "line": 9, + "line": 25, "column": 62 } } @@ -1376,11 +1376,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 63 }, "end": { - "line": 9, + "line": 25, "column": 69 } } @@ -1389,11 +1389,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 72 }, "end": { - "line": 9, + "line": 25, "column": 78 } } @@ -1401,11 +1401,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 63 }, "end": { - "line": 9, + "line": 25, "column": 79 } } @@ -1413,11 +1413,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 54 }, "end": { - "line": 9, + "line": 25, "column": 79 } } @@ -1425,11 +1425,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 13 }, "end": { - "line": 9, + "line": 25, "column": 79 } } @@ -1437,11 +1437,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 11 } } @@ -1454,11 +1454,11 @@ "value": false, "loc": { "start": { - "line": 9, + "line": 25, "column": 83 }, "end": { - "line": 9, + "line": 25, "column": 88 } } @@ -1477,11 +1477,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 92 }, "end": { - "line": 9, + "line": 25, "column": 93 } } @@ -1491,11 +1491,11 @@ "value": 5, "loc": { "start": { - "line": 9, + "line": 25, "column": 95 }, "end": { - "line": 9, + "line": 25, "column": 96 } } @@ -1503,11 +1503,11 @@ "kind": "init", "loc": { "start": { - "line": 9, + "line": 25, "column": 92 }, "end": { - "line": 9, + "line": 25, "column": 96 } } @@ -1523,25 +1523,25 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 98 }, "end": { - "line": 9, + "line": 25, "column": 99 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 9, + "line": 25, "column": 101 }, "end": { - "line": 9, + "line": 25, "column": 106 } } @@ -1549,11 +1549,11 @@ "kind": "init", "loc": { "start": { - "line": 9, + "line": 25, "column": 98 }, "end": { - "line": 9, + "line": 25, "column": 106 } } @@ -1561,11 +1561,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 90 }, "end": { - "line": 9, + "line": 25, "column": 108 } } @@ -1573,22 +1573,22 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 82 }, "end": { - "line": 9, + "line": 25, "column": 109 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 109 } } @@ -1597,11 +1597,11 @@ "kind": "var", "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 110 } } @@ -1621,11 +1621,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 21 } } @@ -1637,11 +1637,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 22 }, "end": { - "line": 11, + "line": 27, "column": 28 } } @@ -1650,11 +1650,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 31 }, "end": { - "line": 11, + "line": 27, "column": 37 } } @@ -1662,11 +1662,11 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 22 }, "end": { - "line": 11, + "line": 27, "column": 38 } } @@ -1678,11 +1678,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 39 }, "end": { - "line": 11, + "line": 27, "column": 46 } } @@ -1691,11 +1691,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 49 }, "end": { - "line": 11, + "line": 27, "column": 55 } } @@ -1703,11 +1703,11 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 39 }, "end": { - "line": 11, + "line": 27, "column": 56 } } @@ -1715,11 +1715,11 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 13 }, "end": { - "line": 11, + "line": 27, "column": 56 } } @@ -1727,11 +1727,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -1739,11 +1739,11 @@ "init": null, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -1752,11 +1752,11 @@ "kind": "var", "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 57 } } @@ -1776,11 +1776,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 22 } } @@ -1789,11 +1789,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 23 }, "end": { - "line": 12, + "line": 28, "column": 30 } } @@ -1802,11 +1802,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 31 }, "end": { - "line": 12, + "line": 28, "column": 38 } } @@ -1814,11 +1814,11 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 14 }, "end": { - "line": 12, + "line": 28, "column": 38 } } @@ -1826,11 +1826,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 12 } } @@ -1838,11 +1838,11 @@ "init": null, "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 12 } } @@ -1851,11 +1851,11 @@ "kind": "var", "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 39 } } @@ -1877,11 +1877,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 18 }, "end": { - "line": 13, + "line": 29, "column": 24 } } @@ -1892,22 +1892,22 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 15 }, "end": { - "line": 13, + "line": 29, "column": 16 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 15 }, "end": { - "line": 13, + "line": 29, "column": 25 } } @@ -1921,11 +1921,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 29 }, "end": { - "line": 13, + "line": 29, "column": 35 } } @@ -1934,11 +1934,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 38 }, "end": { - "line": 13, + "line": 29, "column": 44 } } @@ -1946,11 +1946,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 29 }, "end": { - "line": 13, + "line": 29, "column": 44 } } @@ -1961,22 +1961,22 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 26 }, "end": { - "line": 13, + "line": 29, "column": 27 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 26 }, "end": { - "line": 13, + "line": 29, "column": 45 } } @@ -1987,11 +1987,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 49 }, "end": { - "line": 13, + "line": 29, "column": 56 } } @@ -2002,22 +2002,22 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 46 }, "end": { - "line": 13, + "line": 29, "column": 47 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 46 }, "end": { - "line": 13, + "line": 29, "column": 57 } } @@ -2025,11 +2025,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 14 }, "end": { - "line": 13, + "line": 29, "column": 57 } } @@ -2037,11 +2037,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 12 } } @@ -2049,11 +2049,11 @@ "init": null, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 12 } } @@ -2062,11 +2062,11 @@ "kind": "var", "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 58 } } @@ -2088,11 +2088,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 18 }, "end": { - "line": 14, + "line": 30, "column": 24 } } @@ -2103,22 +2103,22 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 15 }, "end": { - "line": 14, + "line": 30, "column": 16 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 15 }, "end": { - "line": 14, + "line": 30, "column": 25 } } @@ -2129,11 +2129,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 29 }, "end": { - "line": 14, + "line": 30, "column": 35 } } @@ -2144,22 +2144,22 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 26 }, "end": { - "line": 14, + "line": 30, "column": 27 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 26 }, "end": { - "line": 14, + "line": 30, "column": 36 } } @@ -2170,11 +2170,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 40 }, "end": { - "line": 14, + "line": 30, "column": 47 } } @@ -2185,22 +2185,22 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 37 }, "end": { - "line": 14, + "line": 30, "column": 38 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 37 }, "end": { - "line": 14, + "line": 30, "column": 48 } } @@ -2211,11 +2211,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 53 }, "end": { - "line": 14, + "line": 30, "column": 56 } } @@ -2226,11 +2226,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 49 }, "end": { - "line": 14, + "line": 30, "column": 50 } } @@ -2238,11 +2238,11 @@ "optional": true, "loc": { "start": { - "line": 14, + "line": 30, "column": 49 }, "end": { - "line": 14, + "line": 30, "column": 57 } } @@ -2250,11 +2250,11 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 14 }, "end": { - "line": 14, + "line": 30, "column": 57 } } @@ -2262,11 +2262,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 12 } } @@ -2274,11 +2274,11 @@ "init": null, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 12 } } @@ -2287,11 +2287,11 @@ "kind": "var", "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 58 } } @@ -2313,11 +2313,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 19 }, "end": { - "line": 15, + "line": 31, "column": 25 } } @@ -2328,11 +2328,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 15 }, "end": { - "line": 15, + "line": 31, "column": 16 } } @@ -2340,11 +2340,11 @@ "optional": true, "loc": { "start": { - "line": 15, + "line": 31, "column": 15 }, "end": { - "line": 15, + "line": 31, "column": 26 } } @@ -2355,11 +2355,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 31 }, "end": { - "line": 15, + "line": 31, "column": 37 } } @@ -2370,11 +2370,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 27 }, "end": { - "line": 15, + "line": 31, "column": 28 } } @@ -2382,11 +2382,11 @@ "optional": true, "loc": { "start": { - "line": 15, + "line": 31, "column": 27 }, "end": { - "line": 15, + "line": 31, "column": 38 } } @@ -2397,11 +2397,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 43 }, "end": { - "line": 15, + "line": 31, "column": 49 } } @@ -2412,11 +2412,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 39 }, "end": { - "line": 15, + "line": 31, "column": 40 } } @@ -2424,11 +2424,11 @@ "optional": true, "loc": { "start": { - "line": 15, + "line": 31, "column": 39 }, "end": { - "line": 15, + "line": 31, "column": 50 } } @@ -2436,11 +2436,11 @@ ], "loc": { "start": { - "line": 15, + "line": 31, "column": 14 }, "end": { - "line": 15, + "line": 31, "column": 50 } } @@ -2448,11 +2448,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 12 } } @@ -2460,11 +2460,11 @@ "init": null, "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 12 } } @@ -2473,11 +2473,11 @@ "kind": "var", "loc": { "start": { - "line": 15, + "line": 31, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 51 } } @@ -2493,11 +2493,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 7 } } @@ -2508,33 +2508,33 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 10 }, "end": { - "line": 17, + "line": 33, "column": 17 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 17 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 18 } } @@ -2550,11 +2550,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 7 } } @@ -2565,33 +2565,33 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 10 }, "end": { - "line": 18, + "line": 34, "column": 17 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 17 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 18 } } @@ -2607,11 +2607,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 7 } } @@ -2622,33 +2622,33 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 10 }, "end": { - "line": 19, + "line": 35, "column": 17 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 17 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 18 } } @@ -2664,11 +2664,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 8 } } @@ -2679,33 +2679,33 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 11 }, "end": { - "line": 20, + "line": 36, "column": 18 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 18 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 19 } } @@ -2721,11 +2721,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 8 } } @@ -2736,33 +2736,33 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 11 }, "end": { - "line": 21, + "line": 37, "column": 17 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 17 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 18 } } @@ -2778,11 +2778,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 8 } } @@ -2793,414 +2793,53 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 11 }, "end": { - "line": 22, + "line": 38, "column": 18 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 18 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 19 } } }, { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "Identifier", - "name": "tuple12", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 1 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "right": { - "type": "TSAsExpression", - "expression": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 23, - "column": 12 - }, - "end": { - "line": 23, - "column": 13 - } - } - }, - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 20 - } - } - }, - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 23, - "column": 22 - }, - "end": { - "line": 23, - "column": 26 - } - } - }, - { - "type": "NumberLiteral", - "value": 5, - "loc": { - "start": { - "line": 23, - "column": 28 - }, - "end": { - "line": 23, - "column": 29 - } - } - }, - { - "type": "NumberLiteral", - "value": 6, - "loc": { - "start": { - "line": 23, - "column": 31 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - ], - "loc": { - "start": { - "line": 23, - "column": 11 + "type": "VariableDeclaration", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "tuple14", + "decorators": [], + "loc": { + "start": { + "line": 40, + "column": 5 }, "end": { - "line": 23, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 23, - "column": 41 - }, - "end": { - "line": 23, - "column": 47 - } - } - }, - "label": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 38 - }, - "end": { - "line": 23, - "column": 39 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 38 - }, - "end": { - "line": 23, - "column": 48 - } - } - }, - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 23, - "column": 52 - }, - "end": { - "line": 23, - "column": 58 - } - } - }, - "label": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 49 - }, - "end": { - "line": 23, - "column": 50 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 49 - }, - "end": { - "line": 23, - "column": 59 - } - } - }, - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 23, - "column": 63 - }, - "end": { - "line": 23, - "column": 70 - } - } - }, - "label": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 60 - }, - "end": { - "line": 23, - "column": 61 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 60 - }, - "end": { - "line": 23, - "column": 71 - } - } - }, - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 23, - "column": 75 - }, - "end": { - "line": 23, - "column": 81 - } - } - }, - "label": { - "type": "Identifier", - "name": "d", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 72 - }, - "end": { - "line": 23, - "column": 73 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 72 - }, - "end": { - "line": 23, - "column": 82 - } - } - }, - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 23, - "column": 87 - }, - "end": { - "line": 23, - "column": 93 - } - } - }, - "label": { - "type": "Identifier", - "name": "e", - "decorators": [], - "loc": { - "start": { - "line": 23, - "column": 83 - }, - "end": { - "line": 23, - "column": 84 - } - } - }, - "optional": true, - "loc": { - "start": { - "line": 23, - "column": 83 - }, - "end": { - "line": 23, - "column": 94 - } - } - } - ], - "loc": { - "start": { - "line": 23, - "column": 37 - }, - "end": { - "line": 23, - "column": 94 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 11 - }, - "end": { - "line": 23, - "column": 95 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 1 - }, - "end": { - "line": 23, - "column": 95 - } - } - }, - "loc": { - "start": { - "line": 23, - "column": 1 - }, - "end": { - "line": 23, - "column": 95 - } - } - }, - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "tuple14", - "decorators": [], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, + "line": 40, "column": 12 } } @@ -3218,11 +2857,11 @@ "value": 1, "loc": { "start": { - "line": 25, + "line": 40, "column": 17 }, "end": { - "line": 25, + "line": 40, "column": 18 } } @@ -3232,11 +2871,11 @@ "value": 2, "loc": { "start": { - "line": 25, + "line": 40, "column": 20 }, "end": { - "line": 25, + "line": 40, "column": 21 } } @@ -3244,11 +2883,11 @@ ], "loc": { "start": { - "line": 25, + "line": 40, "column": 16 }, "end": { - "line": 25, + "line": 40, "column": 22 } } @@ -3261,11 +2900,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 40, "column": 24 }, "end": { - "line": 25, + "line": 40, "column": 29 } } @@ -3276,25 +2915,25 @@ "value": 1, "loc": { "start": { - "line": 25, + "line": 40, "column": 30 }, "end": { - "line": 25, + "line": 40, "column": 31 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 25, + "line": 40, "column": 33 }, "end": { - "line": 25, + "line": 40, "column": 38 } } @@ -3303,11 +2942,11 @@ "optional": false, "loc": { "start": { - "line": 25, + "line": 40, "column": 24 }, "end": { - "line": 25, + "line": 40, "column": 39 } } @@ -3317,11 +2956,11 @@ "value": true, "loc": { "start": { - "line": 25, + "line": 40, "column": 41 }, "end": { - "line": 25, + "line": 40, "column": 45 } } @@ -3329,11 +2968,11 @@ ], "loc": { "start": { - "line": 25, + "line": 40, "column": 15 }, "end": { - "line": 25, + "line": 40, "column": 46 } } @@ -3350,11 +2989,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 40, "column": 56 }, "end": { - "line": 25, + "line": 40, "column": 63 } } @@ -3363,11 +3002,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 40, "column": 64 }, "end": { - "line": 25, + "line": 40, "column": 71 } } @@ -3375,11 +3014,11 @@ ], "loc": { "start": { - "line": 25, + "line": 40, "column": 55 }, "end": { - "line": 25, + "line": 40, "column": 71 } } @@ -3390,11 +3029,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 40, "column": 51 }, "end": { - "line": 25, + "line": 40, "column": 52 } } @@ -3402,11 +3041,11 @@ "optional": true, "loc": { "start": { - "line": 25, + "line": 40, "column": 51 }, "end": { - "line": 25, + "line": 40, "column": 72 } } @@ -3422,11 +3061,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 40, "column": 81 }, "end": { - "line": 25, + "line": 40, "column": 87 } } @@ -3437,22 +3076,22 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 40, "column": 78 }, "end": { - "line": 25, + "line": 40, "column": 79 } } }, "loc": { "start": { - "line": 25, + "line": 40, "column": 78 }, "end": { - "line": 25, + "line": 40, "column": 88 } } @@ -3465,22 +3104,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 25, + "line": 40, "column": 93 }, "end": { - "line": 25, + "line": 40, "column": 100 } } }, "loc": { "start": { - "line": 25, + "line": 40, "column": 93 }, "end": { - "line": 25, + "line": 40, "column": 102 } } @@ -3491,11 +3130,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 40, "column": 89 }, "end": { - "line": 25, + "line": 40, "column": 90 } } @@ -3503,11 +3142,11 @@ "optional": true, "loc": { "start": { - "line": 25, + "line": 40, "column": 89 }, "end": { - "line": 25, + "line": 40, "column": 103 } } @@ -3515,11 +3154,11 @@ ], "loc": { "start": { - "line": 25, + "line": 40, "column": 77 }, "end": { - "line": 25, + "line": 40, "column": 103 } } @@ -3530,11 +3169,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 40, "column": 73 }, "end": { - "line": 25, + "line": 40, "column": 74 } } @@ -3542,11 +3181,11 @@ "optional": true, "loc": { "start": { - "line": 25, + "line": 40, "column": 73 }, "end": { - "line": 25, + "line": 40, "column": 104 } } @@ -3557,11 +3196,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 25, + "line": 40, "column": 109 }, "end": { - "line": 25, + "line": 40, "column": 116 } } @@ -3572,11 +3211,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 40, "column": 105 }, "end": { - "line": 25, + "line": 40, "column": 106 } } @@ -3584,11 +3223,11 @@ "optional": true, "loc": { "start": { - "line": 25, + "line": 40, "column": 105 }, "end": { - "line": 25, + "line": 40, "column": 117 } } @@ -3596,33 +3235,33 @@ ], "loc": { "start": { - "line": 25, + "line": 40, "column": 50 }, "end": { - "line": 25, + "line": 40, "column": 117 } } }, "loc": { "start": { - "line": 25, + "line": 40, "column": 15 }, "end": { - "line": 25, + "line": 40, "column": 118 } } }, "loc": { "start": { - "line": 25, + "line": 40, "column": 5 }, "end": { - "line": 25, + "line": 40, "column": 118 } } @@ -3631,11 +3270,11 @@ "kind": "var", "loc": { "start": { - "line": 25, + "line": 40, "column": 1 }, "end": { - "line": 25, + "line": 40, "column": 118 } } @@ -3651,11 +3290,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 41, "column": 1 }, "end": { - "line": 26, + "line": 41, "column": 8 } } @@ -3665,33 +3304,33 @@ "elements": [], "loc": { "start": { - "line": 26, + "line": 41, "column": 11 }, "end": { - "line": 26, + "line": 41, "column": 13 } } }, "loc": { "start": { - "line": 26, + "line": 41, "column": 1 }, "end": { - "line": 26, + "line": 41, "column": 13 } } }, "loc": { "start": { - "line": 26, + "line": 41, "column": 1 }, "end": { - "line": 26, + "line": 41, "column": 14 } } @@ -3707,11 +3346,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 42, "column": 1 }, "end": { - "line": 27, + "line": 42, "column": 8 } } @@ -3727,11 +3366,11 @@ "value": 1, "loc": { "start": { - "line": 27, + "line": 42, "column": 13 }, "end": { - "line": 27, + "line": 42, "column": 14 } } @@ -3741,11 +3380,11 @@ "value": 2, "loc": { "start": { - "line": 27, + "line": 42, "column": 16 }, "end": { - "line": 27, + "line": 42, "column": 17 } } @@ -3753,11 +3392,11 @@ ], "loc": { "start": { - "line": 27, + "line": 42, "column": 12 }, "end": { - "line": 27, + "line": 42, "column": 18 } } @@ -3765,33 +3404,33 @@ ], "loc": { "start": { - "line": 27, + "line": 42, "column": 11 }, "end": { - "line": 27, + "line": 42, "column": 19 } } }, "loc": { "start": { - "line": 27, + "line": 42, "column": 1 }, "end": { - "line": 27, + "line": 42, "column": 19 } } }, "loc": { "start": { - "line": 27, + "line": 42, "column": 1 }, "end": { - "line": 27, + "line": 42, "column": 20 } } @@ -3807,11 +3446,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 43, "column": 1 }, "end": { - "line": 28, + "line": 43, "column": 8 } } @@ -3827,11 +3466,11 @@ "value": 3, "loc": { "start": { - "line": 28, + "line": 43, "column": 13 }, "end": { - "line": 28, + "line": 43, "column": 14 } } @@ -3841,11 +3480,11 @@ "value": 4, "loc": { "start": { - "line": 28, + "line": 43, "column": 16 }, "end": { - "line": 28, + "line": 43, "column": 17 } } @@ -3853,11 +3492,11 @@ ], "loc": { "start": { - "line": 28, + "line": 43, "column": 12 }, "end": { - "line": 28, + "line": 43, "column": 18 } } @@ -3870,11 +3509,11 @@ "value": 5, "loc": { "start": { - "line": 28, + "line": 43, "column": 21 }, "end": { - "line": 28, + "line": 43, "column": 22 } } @@ -3882,11 +3521,11 @@ ], "loc": { "start": { - "line": 28, + "line": 43, "column": 20 }, "end": { - "line": 28, + "line": 43, "column": 23 } } @@ -3894,33 +3533,33 @@ ], "loc": { "start": { - "line": 28, + "line": 43, "column": 11 }, "end": { - "line": 28, + "line": 43, "column": 24 } } }, "loc": { "start": { - "line": 28, + "line": 43, "column": 1 }, "end": { - "line": 28, + "line": 43, "column": 24 } } }, "loc": { "start": { - "line": 28, + "line": 43, "column": 1 }, "end": { - "line": 28, + "line": 43, "column": 25 } } @@ -3936,11 +3575,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 44, "column": 1 }, "end": { - "line": 29, + "line": 44, "column": 8 } } @@ -3956,11 +3595,11 @@ "value": 6, "loc": { "start": { - "line": 29, + "line": 44, "column": 13 }, "end": { - "line": 29, + "line": 44, "column": 14 } } @@ -3970,11 +3609,11 @@ "value": 7, "loc": { "start": { - "line": 29, + "line": 44, "column": 16 }, "end": { - "line": 29, + "line": 44, "column": 17 } } @@ -3982,11 +3621,11 @@ ], "loc": { "start": { - "line": 29, + "line": 44, "column": 12 }, "end": { - "line": 29, + "line": 44, "column": 18 } } @@ -3999,11 +3638,11 @@ "value": 8, "loc": { "start": { - "line": 29, + "line": 44, "column": 21 }, "end": { - "line": 29, + "line": 44, "column": 22 } } @@ -4016,11 +3655,11 @@ "value": true, "loc": { "start": { - "line": 29, + "line": 44, "column": 25 }, "end": { - "line": 29, + "line": 44, "column": 29 } } @@ -4030,11 +3669,11 @@ "value": false, "loc": { "start": { - "line": 29, + "line": 44, "column": 31 }, "end": { - "line": 29, + "line": 44, "column": 36 } } @@ -4042,11 +3681,11 @@ ], "loc": { "start": { - "line": 29, + "line": 44, "column": 24 }, "end": { - "line": 29, + "line": 44, "column": 37 } } @@ -4054,11 +3693,11 @@ ], "loc": { "start": { - "line": 29, + "line": 44, "column": 20 }, "end": { - "line": 29, + "line": 44, "column": 38 } } @@ -4066,33 +3705,33 @@ ], "loc": { "start": { - "line": 29, + "line": 44, "column": 11 }, "end": { - "line": 29, + "line": 44, "column": 39 } } }, "loc": { "start": { - "line": 29, + "line": 44, "column": 1 }, "end": { - "line": 29, + "line": 44, "column": 39 } } }, "loc": { "start": { - "line": 29, + "line": 44, "column": 1 }, "end": { - "line": 29, + "line": 44, "column": 40 } } @@ -4108,11 +3747,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 45, "column": 1 }, "end": { - "line": 30, + "line": 45, "column": 8 } } @@ -4128,11 +3767,11 @@ "value": 9, "loc": { "start": { - "line": 30, + "line": 45, "column": 13 }, "end": { - "line": 30, + "line": 45, "column": 14 } } @@ -4142,11 +3781,11 @@ "value": 10, "loc": { "start": { - "line": 30, + "line": 45, "column": 16 }, "end": { - "line": 30, + "line": 45, "column": 18 } } @@ -4154,11 +3793,11 @@ ], "loc": { "start": { - "line": 30, + "line": 45, "column": 12 }, "end": { - "line": 30, + "line": 45, "column": 19 } } @@ -4171,11 +3810,11 @@ "value": 11, "loc": { "start": { - "line": 30, + "line": 45, "column": 22 }, "end": { - "line": 30, + "line": 45, "column": 24 } } @@ -4188,11 +3827,11 @@ "value": true, "loc": { "start": { - "line": 30, + "line": 45, "column": 27 }, "end": { - "line": 30, + "line": 45, "column": 31 } } @@ -4202,11 +3841,11 @@ "value": false, "loc": { "start": { - "line": 30, + "line": 45, "column": 33 }, "end": { - "line": 30, + "line": 45, "column": 38 } } @@ -4214,11 +3853,11 @@ ], "loc": { "start": { - "line": 30, + "line": 45, "column": 26 }, "end": { - "line": 30, + "line": 45, "column": 39 } } @@ -4226,11 +3865,11 @@ ], "loc": { "start": { - "line": 30, + "line": 45, "column": 21 }, "end": { - "line": 30, + "line": 45, "column": 40 } } @@ -4240,11 +3879,11 @@ "value": true, "loc": { "start": { - "line": 30, + "line": 45, "column": 42 }, "end": { - "line": 30, + "line": 45, "column": 46 } } @@ -4252,33 +3891,33 @@ ], "loc": { "start": { - "line": 30, + "line": 45, "column": 11 }, "end": { - "line": 30, + "line": 45, "column": 47 } } }, "loc": { "start": { - "line": 30, + "line": 45, "column": 1 }, "end": { - "line": 30, + "line": 45, "column": 47 } } }, "loc": { "start": { - "line": 30, + "line": 45, "column": 1 }, "end": { - "line": 30, + "line": 45, "column": 48 } } @@ -4293,11 +3932,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 47, "column": 10 }, "end": { - "line": 32, + "line": 47, "column": 15 } } @@ -4313,11 +3952,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 47, "column": 19 }, "end": { - "line": 32, + "line": 47, "column": 25 } } @@ -4325,11 +3964,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 47, "column": 16 }, "end": { - "line": 32, + "line": 47, "column": 17 } } @@ -4341,11 +3980,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 32, + "line": 47, "column": 30 }, "end": { - "line": 32, + "line": 47, "column": 36 } } @@ -4353,11 +3992,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 47, "column": 27 }, "end": { - "line": 32, + "line": 47, "column": 28 } } @@ -4372,11 +4011,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 47, "column": 43 }, "end": { - "line": 32, + "line": 47, "column": 49 } } @@ -4387,22 +4026,22 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 47, "column": 40 }, "end": { - "line": 32, + "line": 47, "column": 41 } } }, "loc": { "start": { - "line": 32, + "line": 47, "column": 40 }, "end": { - "line": 32, + "line": 47, "column": 50 } } @@ -4415,22 +4054,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 32, + "line": 47, "column": 55 }, "end": { - "line": 32, + "line": 47, "column": 62 } } }, "loc": { "start": { - "line": 32, + "line": 47, "column": 55 }, "end": { - "line": 32, + "line": 47, "column": 64 } } @@ -4441,11 +4080,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 47, "column": 51 }, "end": { - "line": 32, + "line": 47, "column": 52 } } @@ -4453,11 +4092,11 @@ "optional": true, "loc": { "start": { - "line": 32, + "line": 47, "column": 51 }, "end": { - "line": 32, + "line": 47, "column": 65 } } @@ -4465,11 +4104,11 @@ ], "loc": { "start": { - "line": 32, + "line": 47, "column": 39 }, "end": { - "line": 32, + "line": 47, "column": 65 } } @@ -4492,11 +4131,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 33, + "line": 48, "column": 19 }, "end": { - "line": 33, + "line": 48, "column": 26 } } @@ -4504,11 +4143,11 @@ ], "loc": { "start": { - "line": 33, + "line": 48, "column": 18 }, "end": { - "line": 33, + "line": 48, "column": 26 } } @@ -4516,11 +4155,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 48, "column": 9 }, "end": { - "line": 33, + "line": 48, "column": 16 } } @@ -4528,24 +4167,24 @@ "init": null, "loc": { "start": { - "line": 33, + "line": 48, "column": 9 }, "end": { - "line": 33, + "line": 48, "column": 16 } } } ], - "kind": "let", + "kind": "var", "loc": { "start": { - "line": 33, + "line": 48, "column": 5 }, "end": { - "line": 33, + "line": 48, "column": 27 } } @@ -4561,11 +4200,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 49, "column": 5 }, "end": { - "line": 34, + "line": 49, "column": 12 } } @@ -4578,11 +4217,11 @@ "value": 123, "loc": { "start": { - "line": 34, + "line": 49, "column": 16 }, "end": { - "line": 34, + "line": 49, "column": 19 } } @@ -4590,33 +4229,33 @@ ], "loc": { "start": { - "line": 34, + "line": 49, "column": 15 }, "end": { - "line": 34, + "line": 49, "column": 20 } } }, "loc": { "start": { - "line": 34, + "line": 49, "column": 5 }, "end": { - "line": 34, + "line": 49, "column": 20 } } }, "loc": { "start": { - "line": 34, + "line": 49, "column": 5 }, "end": { - "line": 34, + "line": 49, "column": 21 } } @@ -4629,22 +4268,22 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 50, "column": 12 }, "end": { - "line": 35, + "line": 50, "column": 19 } } }, "loc": { "start": { - "line": 35, + "line": 50, "column": 5 }, "end": { - "line": 35, + "line": 50, "column": 20 } } @@ -4652,33 +4291,33 @@ ], "loc": { "start": { - "line": 32, + "line": 47, "column": 66 }, "end": { - "line": 36, + "line": 51, "column": 2 } } }, "loc": { "start": { - "line": 32, + "line": 47, "column": 1 }, "end": { - "line": 36, + "line": 51, "column": 2 } } }, "loc": { "start": { - "line": 32, + "line": 47, "column": 1 }, "end": { - "line": 36, + "line": 51, "column": 2 } } @@ -4702,22 +4341,22 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 53, "column": 22 }, "end": { - "line": 38, + "line": 53, "column": 29 } } }, "loc": { "start": { - "line": 38, + "line": 53, "column": 15 }, "end": { - "line": 38, + "line": 53, "column": 30 } } @@ -4730,22 +4369,22 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 53, "column": 38 }, "end": { - "line": 38, + "line": 53, "column": 44 } } }, "loc": { "start": { - "line": 38, + "line": 53, "column": 31 }, "end": { - "line": 38, + "line": 53, "column": 45 } } @@ -4754,11 +4393,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 38, + "line": 53, "column": 46 }, "end": { - "line": 38, + "line": 53, "column": 53 } } @@ -4766,11 +4405,11 @@ ], "loc": { "start": { - "line": 38, + "line": 53, "column": 14 }, "end": { - "line": 38, + "line": 53, "column": 53 } } @@ -4778,11 +4417,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 53, "column": 5 }, "end": { - "line": 38, + "line": 53, "column": 12 } } @@ -4790,11 +4429,11 @@ "init": null, "loc": { "start": { - "line": 38, + "line": 53, "column": 5 }, "end": { - "line": 38, + "line": 53, "column": 12 } } @@ -4803,11 +4442,11 @@ "kind": "var", "loc": { "start": { - "line": 38, + "line": 53, "column": 1 }, "end": { - "line": 38, + "line": 53, "column": 54 } } @@ -4822,11 +4461,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 55, "column": 10 }, "end": { - "line": 40, + "line": 55, "column": 15 } } @@ -4846,22 +4485,22 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 55, "column": 26 }, "end": { - "line": 40, + "line": 55, "column": 33 } } }, "loc": { "start": { - "line": 40, + "line": 55, "column": 19 }, "end": { - "line": 40, + "line": 55, "column": 33 } } @@ -4869,11 +4508,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 55, "column": 16 }, "end": { - "line": 40, + "line": 55, "column": 17 } } @@ -4888,11 +4527,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 40, + "line": 55, "column": 40 }, "end": { - "line": 40, + "line": 55, "column": 47 } } @@ -4901,11 +4540,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 40, + "line": 55, "column": 48 }, "end": { - "line": 40, + "line": 55, "column": 56 } } @@ -4913,11 +4552,11 @@ ], "loc": { "start": { - "line": 40, + "line": 55, "column": 39 }, "end": { - "line": 40, + "line": 55, "column": 56 } } @@ -4926,11 +4565,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 55, "column": 35 }, "end": { - "line": 40, + "line": 55, "column": 36 } } @@ -4947,22 +4586,22 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 55, "column": 67 }, "end": { - "line": 40, + "line": 55, "column": 72 } } }, "loc": { "start": { - "line": 40, + "line": 55, "column": 60 }, "end": { - "line": 40, + "line": 55, "column": 73 } } @@ -4971,11 +4610,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 40, + "line": 55, "column": 74 }, "end": { - "line": 40, + "line": 55, "column": 81 } } @@ -4983,11 +4622,11 @@ ], "loc": { "start": { - "line": 40, + "line": 55, "column": 59 }, "end": { - "line": 40, + "line": 55, "column": 81 } } @@ -5006,25 +4645,25 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 56, "column": 13 }, "end": { - "line": 41, + "line": 56, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 41, + "line": 56, "column": 20 }, "end": { - "line": 41, + "line": 56, "column": 25 } } @@ -5032,22 +4671,22 @@ ], "loc": { "start": { - "line": 41, + "line": 56, "column": 12 }, "end": { - "line": 41, + "line": 56, "column": 26 } } }, "loc": { "start": { - "line": 41, + "line": 56, "column": 5 }, "end": { - "line": 41, + "line": 56, "column": 27 } } @@ -5055,33 +4694,33 @@ ], "loc": { "start": { - "line": 40, + "line": 55, "column": 82 }, "end": { - "line": 42, + "line": 57, "column": 2 } } }, "loc": { "start": { - "line": 40, + "line": 55, "column": 1 }, "end": { - "line": 42, + "line": 57, "column": 2 } } }, "loc": { "start": { - "line": 40, + "line": 55, "column": 1 }, "end": { - "line": 42, + "line": 57, "column": 2 } } @@ -5097,11 +4736,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 59, "column": 5 }, "end": { - "line": 44, + "line": 59, "column": 12 } } @@ -5114,11 +4753,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 59, "column": 15 }, "end": { - "line": 44, + "line": 59, "column": 20 } } @@ -5135,39 +4774,39 @@ "value": 1, "loc": { "start": { - "line": 44, + "line": 59, "column": 23 }, "end": { - "line": 44, + "line": 59, "column": 24 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 44, + "line": 59, "column": 26 }, "end": { - "line": 44, + "line": 59, "column": 31 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 44, + "line": 59, "column": 33 }, "end": { - "line": 44, + "line": 59, "column": 38 } } @@ -5175,11 +4814,11 @@ ], "loc": { "start": { - "line": 44, + "line": 59, "column": 22 }, "end": { - "line": 44, + "line": 59, "column": 39 } } @@ -5189,11 +4828,11 @@ "elements": [], "loc": { "start": { - "line": 44, + "line": 59, "column": 41 }, "end": { - "line": 44, + "line": 59, "column": 43 } } @@ -5203,11 +4842,11 @@ "value": 2, "loc": { "start": { - "line": 44, + "line": 59, "column": 45 }, "end": { - "line": 44, + "line": 59, "column": 46 } } @@ -5215,11 +4854,11 @@ ], "loc": { "start": { - "line": 44, + "line": 59, "column": 21 }, "end": { - "line": 44, + "line": 59, "column": 47 } } @@ -5228,22 +4867,22 @@ "optional": false, "loc": { "start": { - "line": 44, + "line": 59, "column": 15 }, "end": { - "line": 44, + "line": 59, "column": 48 } } }, "loc": { "start": { - "line": 44, + "line": 59, "column": 5 }, "end": { - "line": 44, + "line": 59, "column": 48 } } @@ -5252,11 +4891,11 @@ "kind": "var", "loc": { "start": { - "line": 44, + "line": 59, "column": 1 }, "end": { - "line": 44, + "line": 59, "column": 49 } } @@ -5272,11 +4911,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 60, "column": 5 }, "end": { - "line": 45, + "line": 60, "column": 12 } } @@ -5289,11 +4928,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 60, "column": 15 }, "end": { - "line": 45, + "line": 60, "column": 20 } } @@ -5310,39 +4949,39 @@ "value": 3, "loc": { "start": { - "line": 45, + "line": 60, "column": 23 }, "end": { - "line": 45, + "line": 60, "column": 24 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 45, + "line": 60, "column": 26 }, "end": { - "line": 45, + "line": 60, "column": 31 } } }, { "type": "StringLiteral", - "value": "", + "value": "qux", "loc": { "start": { - "line": 45, + "line": 60, "column": 33 }, "end": { - "line": 45, + "line": 60, "column": 38 } } @@ -5350,11 +4989,11 @@ ], "loc": { "start": { - "line": 45, + "line": 60, "column": 22 }, "end": { - "line": 45, + "line": 60, "column": 39 } } @@ -5364,11 +5003,11 @@ "elements": [], "loc": { "start": { - "line": 45, + "line": 60, "column": 41 }, "end": { - "line": 45, + "line": 60, "column": 43 } } @@ -5378,11 +5017,11 @@ "value": 4, "loc": { "start": { - "line": 45, + "line": 60, "column": 45 }, "end": { - "line": 45, + "line": 60, "column": 46 } } @@ -5390,11 +5029,11 @@ ], "loc": { "start": { - "line": 45, + "line": 60, "column": 21 }, "end": { - "line": 45, + "line": 60, "column": 47 } } @@ -5407,11 +5046,11 @@ "value": 5, "loc": { "start": { - "line": 45, + "line": 60, "column": 50 }, "end": { - "line": 45, + "line": 60, "column": 51 } } @@ -5421,11 +5060,11 @@ "value": true, "loc": { "start": { - "line": 45, + "line": 60, "column": 53 }, "end": { - "line": 45, + "line": 60, "column": 57 } } @@ -5433,11 +5072,11 @@ ], "loc": { "start": { - "line": 45, + "line": 60, "column": 49 }, "end": { - "line": 45, + "line": 60, "column": 58 } } @@ -5446,22 +5085,22 @@ "optional": false, "loc": { "start": { - "line": 45, + "line": 60, "column": 15 }, "end": { - "line": 45, + "line": 60, "column": 59 } } }, "loc": { "start": { - "line": 45, + "line": 60, "column": 5 }, "end": { - "line": 45, + "line": 60, "column": 59 } } @@ -5470,11 +5109,11 @@ "kind": "var", "loc": { "start": { - "line": 45, + "line": 60, "column": 1 }, "end": { - "line": 45, + "line": 60, "column": 60 } } @@ -5491,11 +5130,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 47, + "line": 62, "column": 8 }, "end": { - "line": 47, + "line": 62, "column": 14 } } @@ -5503,11 +5142,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 62, "column": 5 }, "end": { - "line": 47, + "line": 62, "column": 6 } } @@ -5520,11 +5159,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 62, "column": 17 }, "end": { - "line": 47, + "line": 62, "column": 24 } } @@ -5534,11 +5173,11 @@ "value": 1, "loc": { "start": { - "line": 47, + "line": 62, "column": 25 }, "end": { - "line": 47, + "line": 62, "column": 26 } } @@ -5547,22 +5186,22 @@ "optional": false, "loc": { "start": { - "line": 47, + "line": 62, "column": 17 }, "end": { - "line": 47, + "line": 62, "column": 27 } } }, "loc": { "start": { - "line": 47, + "line": 62, "column": 5 }, "end": { - "line": 47, + "line": 62, "column": 27 } } @@ -5571,11 +5210,11 @@ "kind": "var", "loc": { "start": { - "line": 47, + "line": 62, "column": 1 }, "end": { - "line": 47, + "line": 62, "column": 28 } } @@ -5596,22 +5235,22 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 63, "column": 15 }, "end": { - "line": 48, + "line": 63, "column": 20 } } }, "loc": { "start": { - "line": 48, + "line": 63, "column": 8 }, "end": { - "line": 48, + "line": 63, "column": 20 } } @@ -5619,11 +5258,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 63, "column": 5 }, "end": { - "line": 48, + "line": 63, "column": 6 } } @@ -5636,11 +5275,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 63, "column": 23 }, "end": { - "line": 48, + "line": 63, "column": 30 } } @@ -5650,11 +5289,11 @@ "value": 0, "loc": { "start": { - "line": 48, + "line": 63, "column": 31 }, "end": { - "line": 48, + "line": 63, "column": 32 } } @@ -5663,22 +5302,22 @@ "optional": false, "loc": { "start": { - "line": 48, + "line": 63, "column": 23 }, "end": { - "line": 48, + "line": 63, "column": 33 } } }, "loc": { "start": { - "line": 48, + "line": 63, "column": 5 }, "end": { - "line": 48, + "line": 63, "column": 33 } } @@ -5687,11 +5326,11 @@ "kind": "var", "loc": { "start": { - "line": 48, + "line": 63, "column": 1 }, "end": { - "line": 48, + "line": 63, "column": 34 } } @@ -5706,11 +5345,11 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 64, "column": 1 }, "end": { - "line": 49, + "line": 64, "column": 2 } } @@ -5727,39 +5366,39 @@ "value": 1, "loc": { "start": { - "line": 49, + "line": 64, "column": 5 }, "end": { - "line": 49, + "line": 64, "column": 6 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 49, + "line": 64, "column": 8 }, "end": { - "line": 49, + "line": 64, "column": 13 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 49, + "line": 64, "column": 15 }, "end": { - "line": 49, + "line": 64, "column": 20 } } @@ -5767,11 +5406,11 @@ ], "loc": { "start": { - "line": 49, + "line": 64, "column": 4 }, "end": { - "line": 49, + "line": 64, "column": 21 } } @@ -5781,11 +5420,11 @@ "elements": [], "loc": { "start": { - "line": 49, + "line": 64, "column": 23 }, "end": { - "line": 49, + "line": 64, "column": 25 } } @@ -5795,11 +5434,11 @@ "value": 2, "loc": { "start": { - "line": 49, + "line": 64, "column": 27 }, "end": { - "line": 49, + "line": 64, "column": 28 } } @@ -5807,11 +5446,11 @@ ], "loc": { "start": { - "line": 49, + "line": 64, "column": 3 }, "end": { - "line": 49, + "line": 64, "column": 29 } } @@ -5820,22 +5459,22 @@ "optional": false, "loc": { "start": { - "line": 49, + "line": 64, "column": 1 }, "end": { - "line": 49, + "line": 64, "column": 30 } } }, "loc": { "start": { - "line": 49, + "line": 64, "column": 1 }, "end": { - "line": 49, + "line": 64, "column": 31 } } @@ -5858,11 +5497,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 51, + "line": 66, "column": 15 }, "end": { - "line": 51, + "line": 66, "column": 22 } } @@ -5871,11 +5510,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 51, + "line": 66, "column": 23 }, "end": { - "line": 51, + "line": 66, "column": 30 } } @@ -5883,11 +5522,11 @@ ], "loc": { "start": { - "line": 51, + "line": 66, "column": 14 }, "end": { - "line": 51, + "line": 66, "column": 30 } } @@ -5899,11 +5538,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 51, + "line": 66, "column": 34 }, "end": { - "line": 51, + "line": 66, "column": 41 } } @@ -5912,11 +5551,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 51, + "line": 66, "column": 42 }, "end": { - "line": 51, + "line": 66, "column": 49 } } @@ -5924,11 +5563,11 @@ ], "loc": { "start": { - "line": 51, + "line": 66, "column": 33 }, "end": { - "line": 51, + "line": 66, "column": 49 } } @@ -5936,11 +5575,11 @@ ], "loc": { "start": { - "line": 51, + "line": 66, "column": 14 }, "end": { - "line": 51, + "line": 66, "column": 49 } } @@ -5948,11 +5587,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 66, "column": 5 }, "end": { - "line": 51, + "line": 66, "column": 12 } } @@ -5960,11 +5599,11 @@ "init": null, "loc": { "start": { - "line": 51, + "line": 66, "column": 5 }, "end": { - "line": 51, + "line": 66, "column": 12 } } @@ -5973,11 +5612,11 @@ "kind": "var", "loc": { "start": { - "line": 51, + "line": 66, "column": 1 }, "end": { - "line": 51, + "line": 66, "column": 50 } } @@ -5999,11 +5638,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 52, + "line": 67, "column": 18 }, "end": { - "line": 52, + "line": 67, "column": 24 } } @@ -6014,22 +5653,22 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 67, "column": 15 }, "end": { - "line": 52, + "line": 67, "column": 16 } } }, "loc": { "start": { - "line": 52, + "line": 67, "column": 15 }, "end": { - "line": 52, + "line": 67, "column": 25 } } @@ -6040,11 +5679,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 52, + "line": 67, "column": 29 }, "end": { - "line": 52, + "line": 67, "column": 35 } } @@ -6055,22 +5694,22 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 67, "column": 26 }, "end": { - "line": 52, + "line": 67, "column": 27 } } }, "loc": { "start": { - "line": 52, + "line": 67, "column": 26 }, "end": { - "line": 52, + "line": 67, "column": 36 } } @@ -6081,11 +5720,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 52, + "line": 67, "column": 41 }, "end": { - "line": 52, + "line": 67, "column": 48 } } @@ -6096,11 +5735,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 67, "column": 37 }, "end": { - "line": 52, + "line": 67, "column": 38 } } @@ -6108,11 +5747,11 @@ "optional": true, "loc": { "start": { - "line": 52, + "line": 67, "column": 37 }, "end": { - "line": 52, + "line": 67, "column": 49 } } @@ -6120,11 +5759,11 @@ ], "loc": { "start": { - "line": 52, + "line": 67, "column": 14 }, "end": { - "line": 52, + "line": 67, "column": 49 } } @@ -6132,11 +5771,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 67, "column": 5 }, "end": { - "line": 52, + "line": 67, "column": 12 } } @@ -6144,11 +5783,11 @@ "init": null, "loc": { "start": { - "line": 52, + "line": 67, "column": 5 }, "end": { - "line": 52, + "line": 67, "column": 12 } } @@ -6157,11 +5796,11 @@ "kind": "var", "loc": { "start": { - "line": 52, + "line": 67, "column": 1 }, "end": { - "line": 52, + "line": 67, "column": 50 } } @@ -6181,11 +5820,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 53, + "line": 68, "column": 14 }, "end": { - "line": 53, + "line": 68, "column": 20 } } @@ -6198,22 +5837,22 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 68, "column": 30 }, "end": { - "line": 53, + "line": 68, "column": 37 } } }, "loc": { "start": { - "line": 53, + "line": 68, "column": 23 }, "end": { - "line": 53, + "line": 68, "column": 37 } } @@ -6227,11 +5866,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 53, + "line": 68, "column": 44 }, "end": { - "line": 53, + "line": 68, "column": 50 } } @@ -6242,22 +5881,22 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 68, "column": 41 }, "end": { - "line": 53, + "line": 68, "column": 42 } } }, "loc": { "start": { - "line": 53, + "line": 68, "column": 41 }, "end": { - "line": 53, + "line": 68, "column": 51 } } @@ -6268,11 +5907,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 53, + "line": 68, "column": 55 }, "end": { - "line": 53, + "line": 68, "column": 61 } } @@ -6283,22 +5922,22 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 68, "column": 52 }, "end": { - "line": 53, + "line": 68, "column": 53 } } }, "loc": { "start": { - "line": 53, + "line": 68, "column": 52 }, "end": { - "line": 53, + "line": 68, "column": 62 } } @@ -6306,11 +5945,11 @@ ], "loc": { "start": { - "line": 53, + "line": 68, "column": 40 }, "end": { - "line": 53, + "line": 68, "column": 62 } } @@ -6318,11 +5957,11 @@ ], "loc": { "start": { - "line": 53, + "line": 68, "column": 14 }, "end": { - "line": 53, + "line": 68, "column": 62 } } @@ -6330,11 +5969,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 68, "column": 5 }, "end": { - "line": 53, + "line": 68, "column": 12 } } @@ -6342,11 +5981,11 @@ "init": null, "loc": { "start": { - "line": 53, + "line": 68, "column": 5 }, "end": { - "line": 53, + "line": 68, "column": 12 } } @@ -6355,11 +5994,11 @@ "kind": "var", "loc": { "start": { - "line": 53, + "line": 68, "column": 1 }, "end": { - "line": 53, + "line": 68, "column": 63 } } @@ -6379,11 +6018,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 54, + "line": 69, "column": 15 }, "end": { - "line": 54, + "line": 69, "column": 22 } } @@ -6392,11 +6031,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 54, + "line": 69, "column": 23 }, "end": { - "line": 54, + "line": 69, "column": 30 } } @@ -6404,11 +6043,11 @@ ], "loc": { "start": { - "line": 54, + "line": 69, "column": 14 }, "end": { - "line": 54, + "line": 69, "column": 30 } } @@ -6416,11 +6055,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 69, "column": 5 }, "end": { - "line": 54, + "line": 69, "column": 12 } } @@ -6428,11 +6067,11 @@ "init": null, "loc": { "start": { - "line": 54, + "line": 69, "column": 5 }, "end": { - "line": 54, + "line": 69, "column": 12 } } @@ -6441,11 +6080,11 @@ "kind": "var", "loc": { "start": { - "line": 54, + "line": 69, "column": 1 }, "end": { - "line": 54, + "line": 69, "column": 31 } } @@ -6461,11 +6100,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 70, "column": 1 }, "end": { - "line": 55, + "line": 70, "column": 8 } } @@ -6476,33 +6115,33 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 70, "column": 11 }, "end": { - "line": 55, + "line": 70, "column": 18 } } }, "loc": { "start": { - "line": 55, + "line": 70, "column": 1 }, "end": { - "line": 55, + "line": 70, "column": 18 } } }, "loc": { "start": { - "line": 55, + "line": 70, "column": 1 }, "end": { - "line": 55, + "line": 70, "column": 19 } } @@ -6518,11 +6157,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 71, "column": 1 }, "end": { - "line": 56, + "line": 71, "column": 8 } } @@ -6533,33 +6172,33 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 71, "column": 11 }, "end": { - "line": 56, + "line": 71, "column": 18 } } }, "loc": { "start": { - "line": 56, + "line": 71, "column": 1 }, "end": { - "line": 56, + "line": 71, "column": 18 } } }, "loc": { "start": { - "line": 56, + "line": 71, "column": 1 }, "end": { - "line": 56, + "line": 71, "column": 19 } } @@ -6582,11 +6221,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 73, "column": 15 }, "end": { - "line": 58, + "line": 73, "column": 22 } } @@ -6595,11 +6234,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 73, "column": 23 }, "end": { - "line": 58, + "line": 73, "column": 30 } } @@ -6608,11 +6247,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 73, "column": 31 }, "end": { - "line": 58, + "line": 73, "column": 38 } } @@ -6620,11 +6259,11 @@ ], "loc": { "start": { - "line": 58, + "line": 73, "column": 14 }, "end": { - "line": 58, + "line": 73, "column": 38 } } @@ -6636,11 +6275,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 73, "column": 42 }, "end": { - "line": 58, + "line": 73, "column": 49 } } @@ -6649,11 +6288,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 73, "column": 50 }, "end": { - "line": 58, + "line": 73, "column": 57 } } @@ -6662,11 +6301,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 73, "column": 58 }, "end": { - "line": 58, + "line": 73, "column": 65 } } @@ -6675,11 +6314,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 73, "column": 66 }, "end": { - "line": 58, + "line": 73, "column": 73 } } @@ -6687,11 +6326,11 @@ ], "loc": { "start": { - "line": 58, + "line": 73, "column": 41 }, "end": { - "line": 58, + "line": 73, "column": 73 } } @@ -6699,11 +6338,11 @@ ], "loc": { "start": { - "line": 58, + "line": 73, "column": 14 }, "end": { - "line": 58, + "line": 73, "column": 73 } } @@ -6711,11 +6350,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 73, "column": 5 }, "end": { - "line": 58, + "line": 73, "column": 12 } } @@ -6723,11 +6362,11 @@ "init": null, "loc": { "start": { - "line": 58, + "line": 73, "column": 5 }, "end": { - "line": 58, + "line": 73, "column": 12 } } @@ -6736,11 +6375,11 @@ "kind": "var", "loc": { "start": { - "line": 58, + "line": 73, "column": 1 }, "end": { - "line": 58, + "line": 73, "column": 74 } } @@ -6756,11 +6395,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 74, "column": 1 }, "end": { - "line": 59, + "line": 74, "column": 8 } } @@ -6773,11 +6412,11 @@ "value": 1, "loc": { "start": { - "line": 59, + "line": 74, "column": 12 }, "end": { - "line": 59, + "line": 74, "column": 13 } } @@ -6787,11 +6426,11 @@ "value": 2, "loc": { "start": { - "line": 59, + "line": 74, "column": 15 }, "end": { - "line": 59, + "line": 74, "column": 16 } } @@ -6801,11 +6440,11 @@ "value": 3, "loc": { "start": { - "line": 59, + "line": 74, "column": 18 }, "end": { - "line": 59, + "line": 74, "column": 19 } } @@ -6813,33 +6452,33 @@ ], "loc": { "start": { - "line": 59, + "line": 74, "column": 11 }, "end": { - "line": 59, + "line": 74, "column": 20 } } }, "loc": { "start": { - "line": 59, + "line": 74, "column": 1 }, "end": { - "line": 59, + "line": 74, "column": 20 } } }, "loc": { "start": { - "line": 59, + "line": 74, "column": 1 }, "end": { - "line": 59, + "line": 74, "column": 21 } } @@ -6855,11 +6494,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 75, "column": 1 }, "end": { - "line": 60, + "line": 75, "column": 8 } } @@ -6872,11 +6511,11 @@ "value": 1, "loc": { "start": { - "line": 60, + "line": 75, "column": 12 }, "end": { - "line": 60, + "line": 75, "column": 13 } } @@ -6886,11 +6525,11 @@ "value": 2, "loc": { "start": { - "line": 60, + "line": 75, "column": 15 }, "end": { - "line": 60, + "line": 75, "column": 16 } } @@ -6900,11 +6539,11 @@ "value": 3, "loc": { "start": { - "line": 60, + "line": 75, "column": 18 }, "end": { - "line": 60, + "line": 75, "column": 19 } } @@ -6914,11 +6553,11 @@ "value": 4, "loc": { "start": { - "line": 60, + "line": 75, "column": 21 }, "end": { - "line": 60, + "line": 75, "column": 22 } } @@ -6926,33 +6565,33 @@ ], "loc": { "start": { - "line": 60, + "line": 75, "column": 11 }, "end": { - "line": 60, + "line": 75, "column": 23 } } }, "loc": { "start": { - "line": 60, + "line": 75, "column": 1 }, "end": { - "line": 60, + "line": 75, "column": 23 } } }, "loc": { "start": { - "line": 60, + "line": 75, "column": 1 }, "end": { - "line": 60, + "line": 75, "column": 24 } } @@ -6976,33 +6615,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 62, + "line": 77, "column": 14 }, "end": { - "line": 62, + "line": 77, "column": 20 } } }, "loc": { "start": { - "line": 62, + "line": 77, "column": 14 }, "end": { - "line": 62, + "line": 77, "column": 22 } } }, "loc": { "start": { - "line": 62, + "line": 77, "column": 14 }, "end": { - "line": 62, + "line": 77, "column": 24 } } @@ -7015,33 +6654,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 62, + "line": 77, "column": 27 }, "end": { - "line": 62, + "line": 77, "column": 33 } } }, "loc": { "start": { - "line": 62, + "line": 77, "column": 27 }, "end": { - "line": 62, + "line": 77, "column": 35 } } }, "loc": { "start": { - "line": 62, + "line": 77, "column": 27 }, "end": { - "line": 62, + "line": 77, "column": 37 } } @@ -7056,11 +6695,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 62, + "line": 77, "column": 42 }, "end": { - "line": 62, + "line": 77, "column": 49 } } @@ -7069,11 +6708,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 62, + "line": 77, "column": 50 }, "end": { - "line": 62, + "line": 77, "column": 57 } } @@ -7081,11 +6720,11 @@ ], "loc": { "start": { - "line": 62, + "line": 77, "column": 41 }, "end": { - "line": 62, + "line": 77, "column": 58 } } @@ -7097,11 +6736,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 62, + "line": 77, "column": 60 }, "end": { - "line": 62, + "line": 77, "column": 67 } } @@ -7110,11 +6749,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 62, + "line": 77, "column": 68 }, "end": { - "line": 62, + "line": 77, "column": 75 } } @@ -7122,11 +6761,11 @@ ], "loc": { "start": { - "line": 62, + "line": 77, "column": 59 }, "end": { - "line": 62, + "line": 77, "column": 76 } } @@ -7134,11 +6773,11 @@ ], "loc": { "start": { - "line": 62, + "line": 77, "column": 40 }, "end": { - "line": 62, + "line": 77, "column": 76 } } @@ -7146,11 +6785,11 @@ ], "loc": { "start": { - "line": 62, + "line": 77, "column": 14 }, "end": { - "line": 62, + "line": 77, "column": 76 } } @@ -7158,11 +6797,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 77, "column": 5 }, "end": { - "line": 62, + "line": 77, "column": 12 } } @@ -7170,11 +6809,11 @@ "init": null, "loc": { "start": { - "line": 62, + "line": 77, "column": 5 }, "end": { - "line": 62, + "line": 77, "column": 12 } } @@ -7183,11 +6822,11 @@ "kind": "var", "loc": { "start": { - "line": 62, + "line": 77, "column": 1 }, "end": { - "line": 62, + "line": 77, "column": 77 } } @@ -7203,11 +6842,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 78, "column": 1 }, "end": { - "line": 63, + "line": 78, "column": 8 } } @@ -7223,11 +6862,11 @@ "value": 1, "loc": { "start": { - "line": 63, + "line": 78, "column": 13 }, "end": { - "line": 63, + "line": 78, "column": 14 } } @@ -7237,11 +6876,11 @@ "value": 2, "loc": { "start": { - "line": 63, + "line": 78, "column": 16 }, "end": { - "line": 63, + "line": 78, "column": 17 } } @@ -7251,11 +6890,11 @@ "value": 3, "loc": { "start": { - "line": 63, + "line": 78, "column": 19 }, "end": { - "line": 63, + "line": 78, "column": 20 } } @@ -7263,11 +6902,11 @@ ], "loc": { "start": { - "line": 63, + "line": 78, "column": 12 }, "end": { - "line": 63, + "line": 78, "column": 21 } } @@ -7275,33 +6914,33 @@ ], "loc": { "start": { - "line": 63, + "line": 78, "column": 11 }, "end": { - "line": 63, + "line": 78, "column": 22 } } }, "loc": { "start": { - "line": 63, + "line": 78, "column": 1 }, "end": { - "line": 63, + "line": 78, "column": 22 } } }, "loc": { "start": { - "line": 63, + "line": 78, "column": 1 }, "end": { - "line": 63, + "line": 78, "column": 23 } } @@ -7317,11 +6956,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 79, "column": 1 }, "end": { - "line": 64, + "line": 79, "column": 8 } } @@ -7337,11 +6976,11 @@ "value": 1, "loc": { "start": { - "line": 64, + "line": 79, "column": 13 }, "end": { - "line": 64, + "line": 79, "column": 14 } } @@ -7351,11 +6990,11 @@ "value": 2, "loc": { "start": { - "line": 64, + "line": 79, "column": 16 }, "end": { - "line": 64, + "line": 79, "column": 17 } } @@ -7363,11 +7002,11 @@ ], "loc": { "start": { - "line": 64, + "line": 79, "column": 12 }, "end": { - "line": 64, + "line": 79, "column": 18 } } @@ -7377,28 +7016,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 64, + "line": 79, "column": 21 }, "end": { - "line": 64, + "line": 79, "column": 26 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 64, + "line": 79, "column": 28 }, "end": { - "line": 64, + "line": 79, "column": 33 } } @@ -7406,11 +7045,11 @@ ], "loc": { "start": { - "line": 64, + "line": 79, "column": 20 }, "end": { - "line": 64, + "line": 79, "column": 34 } } @@ -7418,33 +7057,33 @@ ], "loc": { "start": { - "line": 64, + "line": 79, "column": 11 }, "end": { - "line": 64, + "line": 79, "column": 35 } } }, "loc": { "start": { - "line": 64, + "line": 79, "column": 1 }, "end": { - "line": 64, + "line": 79, "column": 35 } } }, "loc": { "start": { - "line": 64, + "line": 79, "column": 1 }, "end": { - "line": 64, + "line": 79, "column": 36 } } @@ -7460,11 +7099,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 80, "column": 1 }, "end": { - "line": 65, + "line": 80, "column": 8 } } @@ -7477,42 +7116,42 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 65, + "line": 80, "column": 13 }, "end": { - "line": 65, + "line": 80, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 65, + "line": 80, "column": 20 }, "end": { - "line": 65, + "line": 80, "column": 25 } } }, { "type": "StringLiteral", - "value": "", + "value": "baz", "loc": { "start": { - "line": 65, + "line": 80, "column": 27 }, "end": { - "line": 65, + "line": 80, "column": 32 } } @@ -7520,11 +7159,11 @@ ], "loc": { "start": { - "line": 65, + "line": 80, "column": 12 }, "end": { - "line": 65, + "line": 80, "column": 33 } } @@ -7532,33 +7171,33 @@ ], "loc": { "start": { - "line": 65, + "line": 80, "column": 11 }, "end": { - "line": 65, + "line": 80, "column": 34 } } }, "loc": { "start": { - "line": 65, + "line": 80, "column": 1 }, "end": { - "line": 65, + "line": 80, "column": 34 } } }, "loc": { "start": { - "line": 65, + "line": 80, "column": 1 }, "end": { - "line": 65, + "line": 80, "column": 35 } } @@ -7580,22 +7219,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 67, + "line": 82, "column": 14 }, "end": { - "line": 67, + "line": 82, "column": 20 } } }, "loc": { "start": { - "line": 67, + "line": 82, "column": 14 }, "end": { - "line": 67, + "line": 82, "column": 22 } } @@ -7607,11 +7246,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 67, + "line": 82, "column": 26 }, "end": { - "line": 67, + "line": 82, "column": 33 } } @@ -7620,11 +7259,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 67, + "line": 82, "column": 34 }, "end": { - "line": 67, + "line": 82, "column": 41 } } @@ -7632,11 +7271,11 @@ ], "loc": { "start": { - "line": 67, + "line": 82, "column": 25 }, "end": { - "line": 67, + "line": 82, "column": 41 } } @@ -7645,11 +7284,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 67, + "line": 82, "column": 44 }, "end": { - "line": 67, + "line": 82, "column": 50 } } @@ -7657,11 +7296,11 @@ ], "loc": { "start": { - "line": 67, + "line": 82, "column": 14 }, "end": { - "line": 67, + "line": 82, "column": 50 } } @@ -7669,11 +7308,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 82, "column": 5 }, "end": { - "line": 67, + "line": 82, "column": 12 } } @@ -7681,11 +7320,11 @@ "init": null, "loc": { "start": { - "line": 67, + "line": 82, "column": 5 }, "end": { - "line": 67, + "line": 82, "column": 12 } } @@ -7694,11 +7333,11 @@ "kind": "var", "loc": { "start": { - "line": 67, + "line": 82, "column": 1 }, "end": { - "line": 67, + "line": 82, "column": 51 } } @@ -7714,11 +7353,11 @@ "decorators": [], "loc": { "start": { - "line": 68, + "line": 83, "column": 1 }, "end": { - "line": 68, + "line": 83, "column": 8 } } @@ -7731,11 +7370,11 @@ "value": 1, "loc": { "start": { - "line": 68, + "line": 83, "column": 12 }, "end": { - "line": 68, + "line": 83, "column": 13 } } @@ -7745,11 +7384,11 @@ "value": 2, "loc": { "start": { - "line": 68, + "line": 83, "column": 15 }, "end": { - "line": 68, + "line": 83, "column": 16 } } @@ -7759,11 +7398,11 @@ "value": 3, "loc": { "start": { - "line": 68, + "line": 83, "column": 18 }, "end": { - "line": 68, + "line": 83, "column": 19 } } @@ -7773,11 +7412,11 @@ "value": 4, "loc": { "start": { - "line": 68, + "line": 83, "column": 21 }, "end": { - "line": 68, + "line": 83, "column": 22 } } @@ -7787,11 +7426,11 @@ "value": 5, "loc": { "start": { - "line": 68, + "line": 83, "column": 24 }, "end": { - "line": 68, + "line": 83, "column": 25 } } @@ -7799,33 +7438,33 @@ ], "loc": { "start": { - "line": 68, + "line": 83, "column": 11 }, "end": { - "line": 68, + "line": 83, "column": 26 } } }, "loc": { "start": { - "line": 68, + "line": 83, "column": 1 }, "end": { - "line": 68, + "line": 83, "column": 26 } } }, "loc": { "start": { - "line": 68, + "line": 83, "column": 1 }, "end": { - "line": 68, + "line": 83, "column": 27 } } @@ -7841,11 +7480,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 84, "column": 1 }, "end": { - "line": 69, + "line": 84, "column": 8 } } @@ -7855,28 +7494,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 69, + "line": 84, "column": 12 }, "end": { - "line": 69, + "line": 84, "column": 17 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 69, + "line": 84, "column": 19 }, "end": { - "line": 69, + "line": 84, "column": 24 } } @@ -7884,33 +7523,33 @@ ], "loc": { "start": { - "line": 69, + "line": 84, "column": 11 }, "end": { - "line": 69, + "line": 84, "column": 25 } } }, "loc": { "start": { - "line": 69, + "line": 84, "column": 1 }, "end": { - "line": 69, + "line": 84, "column": 25 } } }, "loc": { "start": { - "line": 69, + "line": 84, "column": 1 }, "end": { - "line": 69, + "line": 84, "column": 26 } } @@ -7926,11 +7565,11 @@ "decorators": [], "loc": { "start": { - "line": 70, + "line": 85, "column": 1 }, "end": { - "line": 70, + "line": 85, "column": 8 } } @@ -7940,33 +7579,33 @@ "value": 12, "loc": { "start": { - "line": 70, + "line": 85, "column": 11 }, "end": { - "line": 70, + "line": 85, "column": 13 } } }, "loc": { "start": { - "line": 70, + "line": 85, "column": 1 }, "end": { - "line": 70, + "line": 85, "column": 13 } } }, "loc": { "start": { - "line": 70, + "line": 85, "column": 1 }, "end": { - "line": 70, + "line": 85, "column": 14 } } @@ -7978,8 +7617,8 @@ "column": 1 }, "end": { - "line": 70, - "column": 14 + "line": 86, + "column": 1 } } } diff --git a/es2panda/test/compiler/ts/tupleAssignability.ts b/es2panda/test/compiler/ts/tupleAssignability.ts index 6f78dcce12e292962e9ca54e4706e11a7db6f25f..2cef4e77889515a613146109f259ab83bf180483 100644 --- a/es2panda/test/compiler/ts/tupleAssignability.ts +++ b/es2panda/test/compiler/ts/tupleAssignability.ts @@ -36,7 +36,6 @@ tuple9 = tuple12; tuple11 = tuple12; tuple13 = tuple1; tuple13 = tuple13; -tuple12 = [1, "foo", true, 5, 6] as [a: number, b: string, c: boolean, d: number, e?: number]; var tuple14 = [[1, 2], func1(1, "foo"), true] as [a?: [number, number], b?: [a: number, b?: boolean[]], c?: boolean]; tuple14 = []; @@ -46,7 +45,7 @@ tuple14 = [[6, 7], [8, [true, false]]]; tuple14 = [[9, 10], [11, [true, false]], true]; function func1(a: number, b: string): [a: number, b?: boolean[]] { - let tuple15: [number]; + var tuple15: [number]; tuple15 = [123]; return tuple15; } @@ -83,4 +82,4 @@ tuple24 = [["foo", "bar", "baz"]]; var tuple25: number[] | [string, string] | number; tuple25 = [1, 2, 3, 4, 5]; tuple25 = ["foo", "bar"]; -tuple25 = 12; \ No newline at end of file +tuple25 = 12; diff --git a/es2panda/test/compiler/ts/tupleAssignability1-expected.txt b/es2panda/test/compiler/ts/tupleAssignability1-expected.txt index 8a27179a1b9ae32fbd51ed275bf58e9989b8980a..95beb57c52e4a213c7cae03905f9aa69153658fd 100644 --- a/es2panda/test/compiler/ts/tupleAssignability1-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability1-expected.txt @@ -14,11 +14,11 @@ "elementTypes": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -43,11 +43,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -55,22 +55,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -79,11 +79,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -95,9 +95,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } } -TypeError: Type '[number]' is not assignable to type '[]'. [tupleAssignability1.ts:1:5] +TypeError: Type '[1]' is not assignable to type '[]'. [tupleAssignability1.ts:17:5] diff --git a/es2panda/test/compiler/ts/tupleAssignability10-expected.txt b/es2panda/test/compiler/ts/tupleAssignability10-expected.txt index e355e0ffce18fc45cd90a69138871f2acb3efb5c..fab701bc9e661dd2c7b7281bd07e242f24c645a2 100644 --- a/es2panda/test/compiler/ts/tupleAssignability10-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability10-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -31,11 +31,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -44,11 +44,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -56,11 +56,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -75,28 +75,28 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 18 } } }, { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -104,22 +104,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 26 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 27 } } @@ -127,33 +127,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -165,9 +165,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [tupleAssignability10.ts:2:20] +TypeError: Type 'string' is not assignable to type 'number'. [tupleAssignability10.ts:18:20] diff --git a/es2panda/test/compiler/ts/tupleAssignability11-expected.txt b/es2panda/test/compiler/ts/tupleAssignability11-expected.txt index 085b265d82a9cf08868242f9555eb14aba4bee02..2a4a99e04d640bdad037729da644ed0121a5247a 100644 --- a/es2panda/test/compiler/ts/tupleAssignability11-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability11-expected.txt @@ -14,11 +14,11 @@ "elementTypes": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -38,11 +38,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -51,11 +51,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -76,11 +76,11 @@ "elementTypes": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -88,11 +88,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -100,11 +100,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -112,11 +112,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -125,11 +125,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -145,11 +145,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -160,33 +160,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -198,9 +198,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type '[[]]' is not assignable to type '[]'. [tupleAssignability11.ts:3:1] +TypeError: Type '[[]]' is not assignable to type '[]'. [tupleAssignability11.ts:19:1] diff --git a/es2panda/test/compiler/ts/tupleAssignability12-expected.txt b/es2panda/test/compiler/ts/tupleAssignability12-expected.txt index 88eae023ce438e3607fd13ef5bb1563fbb7c9e6a..e930d5c202f2f552b1f4ee1dff11761680a0a516 100644 --- a/es2panda/test/compiler/ts/tupleAssignability12-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability12-expected.txt @@ -18,11 +18,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -33,22 +33,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 10 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -74,22 +74,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -100,11 +100,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -115,11 +115,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -127,11 +127,11 @@ "optional": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -139,11 +139,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -151,11 +151,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -163,11 +163,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -176,11 +176,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -202,11 +202,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -217,22 +217,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -243,11 +243,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -258,22 +258,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -284,11 +284,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 34 }, "end": { - "line": 2, + "line": 18, "column": 40 } } @@ -299,22 +299,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 32 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 41 } } @@ -325,11 +325,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 45 }, "end": { - "line": 2, + "line": 18, "column": 51 } } @@ -340,22 +340,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 42 }, "end": { - "line": 2, + "line": 18, "column": 43 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 42 }, "end": { - "line": 2, + "line": 18, "column": 52 } } @@ -363,11 +363,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 52 } } @@ -375,11 +375,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -387,11 +387,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -400,11 +400,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 53 } } @@ -420,11 +420,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -435,33 +435,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -473,9 +473,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type '[a: number, b: string, c: number, d: number]' is not assignable to type '[a: number, b: string, c?: number]'. [tupleAssignability12.ts:3:1] +TypeError: Type '[a: number, b: string, c: number, d: number]' is not assignable to type '[a: number, b: string, c?: number]'. [tupleAssignability12.ts:19:1] diff --git a/es2panda/test/compiler/ts/tupleAssignability13-expected.txt b/es2panda/test/compiler/ts/tupleAssignability13-expected.txt index 7c283e08712ffb3ff81f20f979b7f6d00f330e46..229790ab7a1f84d2c1bff2bd602ef89b547011b6 100644 --- a/es2panda/test/compiler/ts/tupleAssignability13-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability13-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -42,11 +42,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -54,11 +54,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -66,11 +66,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -83,11 +83,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -97,25 +97,25 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -123,22 +123,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 48 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -147,11 +147,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -166,11 +166,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -190,22 +190,22 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 22 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -213,11 +213,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -228,33 +228,33 @@ "statements": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 25 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -269,11 +269,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -287,11 +287,11 @@ "value": 1, "loc": { "start": { - "line": 7, + "line": 23, "column": 4 }, "end": { - "line": 7, + "line": 23, "column": 5 } } @@ -301,11 +301,11 @@ "value": 2, "loc": { "start": { - "line": 7, + "line": 23, "column": 7 }, "end": { - "line": 7, + "line": 23, "column": 8 } } @@ -315,11 +315,11 @@ "value": 3, "loc": { "start": { - "line": 7, + "line": 23, "column": 10 }, "end": { - "line": 7, + "line": 23, "column": 11 } } @@ -327,11 +327,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 3 }, "end": { - "line": 7, + "line": 23, "column": 12 } } @@ -340,22 +340,22 @@ "optional": false, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 13 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 14 } } @@ -367,9 +367,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 14 } } } -TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability13.ts:7:10] +TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability13.ts:23:10] diff --git a/es2panda/test/compiler/ts/tupleAssignability14-expected.txt b/es2panda/test/compiler/ts/tupleAssignability14-expected.txt index 0e8361e381f44755761b736c07f55229db26a527..166be66e942081918868ec8cfa54ad9950cb3a65 100644 --- a/es2panda/test/compiler/ts/tupleAssignability14-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability14-expected.txt @@ -14,11 +14,11 @@ "elementTypes": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -26,11 +26,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -40,22 +40,22 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -64,11 +64,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -80,9 +80,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } } -TypeError: Type 'number' is not assignable to type '[]' [tupleAssignability14.ts:1:5] +TypeError: Type 'number' is not assignable to type '[]'. [tupleAssignability14.ts:17:5] diff --git a/es2panda/test/compiler/ts/tupleAssignability15-expected.txt b/es2panda/test/compiler/ts/tupleAssignability15-expected.txt index 70012730132ffa877e169b534a7e592082c6987d..d58442c37c8c80b536a18146d87809ff65a757f3 100644 --- a/es2panda/test/compiler/ts/tupleAssignability15-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability15-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -42,11 +42,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -54,11 +54,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -66,11 +66,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -91,11 +91,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -114,22 +114,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -137,11 +137,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -149,11 +149,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -162,11 +162,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -182,11 +182,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -197,33 +197,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -235,9 +235,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type 'number[]' is not assignable to type '[number, number, number]'. [tupleAssignability15.ts:3:1] +TypeError: Type 'number[]' is not assignable to type '[number, number, number]'. [tupleAssignability15.ts:19:1] diff --git a/es2panda/test/compiler/ts/tupleAssignability16-expected.txt b/es2panda/test/compiler/ts/tupleAssignability16-expected.txt index c0f50cd69770e066f05066be2f0eb897544bff06..9c79280695fb52e19f63755efef97e53cf2eb4e2 100644 --- a/es2panda/test/compiler/ts/tupleAssignability16-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability16-expected.txt @@ -18,22 +18,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -44,22 +44,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -67,11 +67,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -79,11 +79,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -96,14 +96,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -111,11 +111,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -125,14 +125,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -140,11 +140,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -152,22 +152,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 49 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -176,11 +176,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 50 } } @@ -192,9 +192,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 50 } } } -TypeError: Type 'string' is not assignable to type 'number'. [tupleAssignability16.ts:1:33] +TypeError: Type 'string' is not assignable to type 'number'. [tupleAssignability16.ts:17:33] diff --git a/es2panda/test/compiler/ts/tupleAssignability17-expected.txt b/es2panda/test/compiler/ts/tupleAssignability17-expected.txt index f1eaf449aac66b0fa0a7da2605a81c2c6e0c7210..7bfefd46a3e73930fd72533c828b9ffead9a4b48 100644 --- a/es2panda/test/compiler/ts/tupleAssignability17-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability17-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -41,11 +41,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -53,11 +53,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -65,11 +65,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -98,11 +98,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -113,22 +113,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -137,11 +137,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -157,11 +157,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -176,11 +176,11 @@ "value": 1, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -190,11 +190,11 @@ "value": 2, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -204,11 +204,11 @@ "value": 3, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -216,11 +216,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -232,11 +232,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -245,11 +245,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 27 }, "end": { - "line": 3, + "line": 19, "column": 34 } } @@ -258,11 +258,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 35 }, "end": { - "line": 3, + "line": 19, "column": 42 } } @@ -270,44 +270,44 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 42 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 43 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 43 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 43 } } @@ -319,9 +319,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 43 } } } -TypeError: Type '[number, number, number]' is not assignable to type '[number, string]'. [tupleAssignability17.ts:3:1] +TypeError: Type '[number, number, number]' is not assignable to type '[number, string]'. [tupleAssignability17.ts:19:1] diff --git a/es2panda/test/compiler/ts/tupleAssignability18-expected.txt b/es2panda/test/compiler/ts/tupleAssignability18-expected.txt index 5791813ac01000153a17753254b6e24778e0f2be..a5cbc53f9a964a03357d4d070548ae06fa595d28 100644 --- a/es2panda/test/compiler/ts/tupleAssignability18-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability18-expected.txt @@ -23,11 +23,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 17 }, "end": { - "line": 2, + "line": 16, "column": 23 } } @@ -38,22 +38,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 14 }, "end": { - "line": 2, + "line": 16, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 16, "column": 14 }, "end": { - "line": 2, + "line": 16, "column": 24 } } @@ -64,11 +64,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 29 }, "end": { - "line": 2, + "line": 16, "column": 35 } } @@ -79,11 +79,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 25 }, "end": { - "line": 2, + "line": 16, "column": 26 } } @@ -91,11 +91,11 @@ "optional": true, "loc": { "start": { - "line": 2, + "line": 16, "column": 25 }, "end": { - "line": 2, + "line": 16, "column": 36 } } @@ -103,11 +103,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 13 }, "end": { - "line": 2, + "line": 16, "column": 36 } } @@ -118,11 +118,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 9 }, "end": { - "line": 2, + "line": 16, "column": 10 } } @@ -130,11 +130,11 @@ "optional": true, "loc": { "start": { - "line": 2, + "line": 16, "column": 9 }, "end": { - "line": 2, + "line": 16, "column": 37 } } @@ -151,11 +151,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 43 }, "end": { - "line": 2, + "line": 16, "column": 49 } } @@ -164,11 +164,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 16, "column": 52 }, "end": { - "line": 2, + "line": 16, "column": 58 } } @@ -176,11 +176,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 43 }, "end": { - "line": 2, + "line": 16, "column": 59 } } @@ -188,11 +188,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 42 }, "end": { - "line": 2, + "line": 16, "column": 59 } } @@ -203,11 +203,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 38 }, "end": { - "line": 2, + "line": 16, "column": 39 } } @@ -215,11 +215,11 @@ "optional": true, "loc": { "start": { - "line": 2, + "line": 16, "column": 38 }, "end": { - "line": 2, + "line": 16, "column": 60 } } @@ -234,22 +234,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 72 }, "end": { - "line": 2, + "line": 16, "column": 73 } } }, "loc": { "start": { - "line": 2, + "line": 16, "column": 65 }, "end": { - "line": 2, + "line": 16, "column": 73 } } @@ -260,11 +260,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 61 }, "end": { - "line": 2, + "line": 16, "column": 62 } } @@ -272,11 +272,11 @@ "optional": true, "loc": { "start": { - "line": 2, + "line": 16, "column": 61 }, "end": { - "line": 2, + "line": 16, "column": 74 } } @@ -284,11 +284,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 8 }, "end": { - "line": 2, + "line": 16, "column": 74 } } @@ -296,11 +296,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 6 } } @@ -316,11 +316,11 @@ "value": 2, "loc": { "start": { - "line": 2, + "line": 16, "column": 79 }, "end": { - "line": 2, + "line": 16, "column": 80 } } @@ -328,11 +328,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 78 }, "end": { - "line": 2, + "line": 16, "column": 81 } } @@ -345,11 +345,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 16, "column": 83 }, "end": { - "line": 2, + "line": 16, "column": 87 } } @@ -360,25 +360,25 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 16, "column": 88 }, "end": { - "line": 2, + "line": 16, "column": 89 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 2, + "line": 16, "column": 91 }, "end": { - "line": 2, + "line": 16, "column": 96 } } @@ -387,11 +387,11 @@ "optional": false, "loc": { "start": { - "line": 2, + "line": 16, "column": 83 }, "end": { - "line": 2, + "line": 16, "column": 97 } } @@ -407,11 +407,11 @@ "value": 1, "loc": { "start": { - "line": 2, + "line": 16, "column": 101 }, "end": { - "line": 2, + "line": 16, "column": 102 } } @@ -419,11 +419,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 100 }, "end": { - "line": 2, + "line": 16, "column": 103 } } @@ -431,11 +431,11 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 99 }, "end": { - "line": 2, + "line": 16, "column": 104 } } @@ -443,22 +443,22 @@ ], "loc": { "start": { - "line": 2, + "line": 16, "column": 77 }, "end": { - "line": 2, + "line": 16, "column": 105 } } }, "loc": { "start": { - "line": 2, + "line": 16, "column": 5 }, "end": { - "line": 2, + "line": 16, "column": 105 } } @@ -467,11 +467,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 16, "column": 1 }, "end": { - "line": 2, + "line": 16, "column": 106 } } @@ -497,11 +497,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 17, "column": 11 }, "end": { - "line": 3, + "line": 17, "column": 18 } } @@ -509,11 +509,11 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 10 }, "end": { - "line": 3, + "line": 17, "column": 19 } } @@ -521,11 +521,11 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 9 }, "end": { - "line": 3, + "line": 17, "column": 20 } } @@ -533,11 +533,11 @@ ], "loc": { "start": { - "line": 3, + "line": 17, "column": 8 }, "end": { - "line": 3, + "line": 17, "column": 20 } } @@ -545,11 +545,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -557,11 +557,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 17, "column": 5 }, "end": { - "line": 3, + "line": 17, "column": 6 } } @@ -570,11 +570,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 17, "column": 21 } } @@ -589,11 +589,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 10 }, "end": { - "line": 5, + "line": 19, "column": 14 } } @@ -609,11 +609,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 19, "column": 18 }, "end": { - "line": 5, + "line": 19, "column": 24 } } @@ -621,11 +621,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 15 }, "end": { - "line": 5, + "line": 19, "column": 16 } } @@ -637,11 +637,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 19, "column": 29 }, "end": { - "line": 5, + "line": 19, "column": 35 } } @@ -649,11 +649,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 19, "column": 26 }, "end": { - "line": 5, + "line": 19, "column": 27 } } @@ -666,11 +666,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 19, "column": 39 }, "end": { - "line": 5, + "line": 19, "column": 46 } } @@ -678,11 +678,11 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 38 }, "end": { - "line": 5, + "line": 19, "column": 46 } } @@ -700,11 +700,11 @@ "value": 1, "loc": { "start": { - "line": 6, + "line": 20, "column": 13 }, "end": { - "line": 6, + "line": 20, "column": 14 } } @@ -712,22 +712,22 @@ ], "loc": { "start": { - "line": 6, + "line": 20, "column": 12 }, "end": { - "line": 6, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 6, + "line": 20, "column": 5 }, "end": { - "line": 6, + "line": 20, "column": 16 } } @@ -735,33 +735,33 @@ ], "loc": { "start": { - "line": 5, + "line": 19, "column": 47 }, "end": { - "line": 7, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 5, + "line": 19, "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 2 } } @@ -773,9 +773,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 21, "column": 2 } } } -TypeError: Type 'number' is not assignable to type '[number]'. [tupleAssignability18.ts:2:101] +TypeError: Type 'number' is not assignable to type '[number]'. [tupleAssignability18.ts:16:101] diff --git a/es2panda/test/compiler/ts/tupleAssignability19-expected.txt b/es2panda/test/compiler/ts/tupleAssignability19-expected.txt index 8cad9ee6d138ed695a14fab0fc26ea6a51b0478e..e9d768f19e4171e766d7c07a083e90a94bff3d82 100644 --- a/es2panda/test/compiler/ts/tupleAssignability19-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability19-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -31,11 +31,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -71,11 +71,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -100,11 +100,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -112,22 +112,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -152,9 +152,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 37 } } } -TypeError: Type 'boolean' is not assignable to type 'string | number'. [tupleAssignability19.ts:1:31] +TypeError: Type 'boolean' is not assignable to type 'number | string'. [tupleAssignability19.ts:17:31] diff --git a/es2panda/test/compiler/ts/tupleAssignability2-expected.txt b/es2panda/test/compiler/ts/tupleAssignability2-expected.txt index 760c3e08746613c86b8fc4969b4d319e1dc45520..899583652869cfd8ea882351c6a4d212fadf4323 100644 --- a/es2panda/test/compiler/ts/tupleAssignability2-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability2-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -41,11 +41,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -53,11 +53,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -70,25 +70,25 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -98,11 +98,11 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -110,22 +110,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -134,11 +134,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -150,9 +150,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 41 } } } -TypeError: Type '[number, string, number]' is not assignable to type '[number, string]'. [tupleAssignability2.ts:1:5] +TypeError: Type '[5, "foo", 6]' is not assignable to type '[number, string]'. [tupleAssignability2.ts:17:5] diff --git a/es2panda/test/compiler/ts/tupleAssignability20-expected.txt b/es2panda/test/compiler/ts/tupleAssignability20-expected.txt index 6ff145bcec969764829bb3013a0ad34f6eb21763..7ff77df58704ef7f19ab5c7410967c71b030c740 100644 --- a/es2panda/test/compiler/ts/tupleAssignability20-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability20-expected.txt @@ -18,22 +18,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -45,11 +45,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -58,11 +58,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -70,11 +70,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -82,11 +82,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -94,11 +94,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -111,11 +111,11 @@ "value": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -125,11 +125,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -137,22 +137,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 47 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -161,11 +161,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 48 } } @@ -177,9 +177,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 48 } } } -TypeError: Type 'boolean' is not assignable to type 'string | number'. [tupleAssignability20.ts:1:39] +TypeError: Type 'boolean' is not assignable to type 'number | string'. [tupleAssignability20.ts:17:39] diff --git a/es2panda/test/compiler/ts/tupleAssignability21-expected.txt b/es2panda/test/compiler/ts/tupleAssignability21-expected.txt index 4b3bb4e328056c2234811ddf89d1699c352bfd43..06397b7a4dc47df9cfee9689713fbba1635d5326 100644 --- a/es2panda/test/compiler/ts/tupleAssignability21-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability21-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -32,11 +32,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -44,11 +44,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -60,11 +60,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -73,11 +73,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -86,11 +86,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -98,11 +98,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -110,11 +110,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -122,11 +122,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -139,11 +139,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 55 }, "end": { - "line": 1, + "line": 17, "column": 56 } } @@ -151,22 +151,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 57 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -175,11 +175,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -191,9 +191,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 58 } } } -TypeError: Type '[number]' is not assignable to type '[number, number] | [number, number, number]'. [tupleAssignability21.ts:1:5] +TypeError: Type '[1]' is not assignable to type '[number, number] | [number, number, number]'. [tupleAssignability21.ts:17:5] diff --git a/es2panda/test/compiler/ts/tupleAssignability22-expected.txt b/es2panda/test/compiler/ts/tupleAssignability22-expected.txt index 2078f07b58f2569a4277efaabd387c823e656eca..5b2bb31018fe4bd0125a716be2fd5e400ae73e9a 100644 --- a/es2panda/test/compiler/ts/tupleAssignability22-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability22-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -32,11 +32,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -44,11 +44,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -57,11 +57,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -69,11 +69,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -81,11 +81,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -95,22 +95,22 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 1, + "line": 17, "column": 37 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -119,11 +119,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -135,9 +135,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 38 } } } -TypeError: Type 'number' is not assignable to type '[number, number] | string' [tupleAssignability22.ts:1:5] +TypeError: Type 'number' is not assignable to type '[number, number] | string'. [tupleAssignability22.ts:17:5] diff --git a/es2panda/test/compiler/ts/tupleAssignability23-expected.txt b/es2panda/test/compiler/ts/tupleAssignability23-expected.txt index def872bce54ec6af2bc8b861114e152e4bd3b758..376f24f06be5cecc1ceb6db19e270e6b81731833 100644 --- a/es2panda/test/compiler/ts/tupleAssignability23-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability23-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -32,11 +32,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -44,11 +44,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -60,11 +60,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -73,11 +73,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -85,11 +85,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -97,11 +97,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -109,11 +109,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -129,25 +129,25 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -155,11 +155,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 58 } } @@ -172,11 +172,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -186,11 +186,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 65 } } @@ -198,11 +198,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 60 }, "end": { - "line": 1, + "line": 17, "column": 66 } } @@ -210,22 +210,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 67 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -234,11 +234,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -250,9 +250,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 68 } } } -TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability23.ts:1:64] +TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability23.ts:17:64] diff --git a/es2panda/test/compiler/ts/tupleAssignability24-expected.txt b/es2panda/test/compiler/ts/tupleAssignability24-expected.txt index ad7bc748200628d77629058240b3ebbc643b78ea..b048ecbd219761d72e2f456d2f4ff81c6e26c553 100644 --- a/es2panda/test/compiler/ts/tupleAssignability24-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability24-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -32,11 +32,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -45,11 +45,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -57,11 +57,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -72,22 +72,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -95,11 +95,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 43 } } @@ -107,11 +107,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -119,11 +119,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -132,11 +132,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -159,11 +159,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -172,11 +172,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -185,11 +185,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -198,11 +198,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 33 }, "end": { - "line": 2, + "line": 18, "column": 40 } } @@ -210,11 +210,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 40 } } @@ -225,22 +225,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 43 }, "end": { - "line": 2, + "line": 18, "column": 49 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 43 }, "end": { - "line": 2, + "line": 18, "column": 51 } } @@ -248,11 +248,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 51 } } @@ -260,11 +260,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -272,11 +272,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -285,11 +285,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 52 } } @@ -305,11 +305,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -320,33 +320,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -358,9 +358,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type '[number, number, number, number] | string[]' is not assignable to type '[number, number, number] | number[]'. [tupleAssignability24.ts:3:1] +TypeError: Type '[number, number, number, number] | string[]' is not assignable to type '[number, number, number] | number[]'. [tupleAssignability24.ts:19:1] diff --git a/es2panda/test/compiler/ts/tupleAssignability3-expected.txt b/es2panda/test/compiler/ts/tupleAssignability3-expected.txt index 3f7db01de370b1fbdefba01e9f14346309bf8627..90960da60e9b83fdfa2db0e89bb1ea96993fafef 100644 --- a/es2panda/test/compiler/ts/tupleAssignability3-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability3-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -42,11 +42,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -54,11 +54,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -66,11 +66,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -83,11 +83,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 36 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -97,11 +97,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -109,22 +109,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -133,11 +133,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -149,9 +149,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 42 } } } -TypeError: Type '[number, number]' is not assignable to type '[number, number, number]'. [tupleAssignability3.ts:1:5] +TypeError: Type '[1, 2]' is not assignable to type '[number, number, number]'. [tupleAssignability3.ts:17:5] diff --git a/es2panda/test/compiler/ts/tupleAssignability4-expected.txt b/es2panda/test/compiler/ts/tupleAssignability4-expected.txt index 4a81f882dadee0e26a79067e8fc469e61b8a74fc..5bb14fc852ce56a12cbea8946480d4c63eee1a28 100644 --- a/es2panda/test/compiler/ts/tupleAssignability4-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability4-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -41,11 +41,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -53,11 +53,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -65,11 +65,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -102,11 +102,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -115,11 +115,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -127,11 +127,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -139,11 +139,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -151,11 +151,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -164,11 +164,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -199,33 +199,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -237,9 +237,9 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 7 } } } -TypeError: Type '[string, number]' is not assignable to type '[number, string]'. [tupleAssignability4.ts:3:1] +TypeError: Type '[string, number]' is not assignable to type '[number, string]'. [tupleAssignability4.ts:19:1] diff --git a/es2panda/test/compiler/ts/tupleAssignability5-expected.txt b/es2panda/test/compiler/ts/tupleAssignability5-expected.txt index db14b93a524576295bd4f9cf9930882a05e61c5e..519b07fa0dee4621c6ea931ccedca27e818e86fa 100644 --- a/es2panda/test/compiler/ts/tupleAssignability5-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability5-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -41,11 +41,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -53,11 +53,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -70,11 +70,11 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -84,11 +84,11 @@ "value": 6, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -96,22 +96,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -120,11 +120,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -136,9 +136,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 34 } } } -TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability5.ts:1:31] +TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability5.ts:17:31] diff --git a/es2panda/test/compiler/ts/tupleAssignability6-expected.txt b/es2panda/test/compiler/ts/tupleAssignability6-expected.txt index 9d441a705e45df76ba1731acf4d310fd76a4489a..3bc4258f376c304a16bd6a471a174f1a5ff7dd4d 100644 --- a/es2panda/test/compiler/ts/tupleAssignability6-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability6-expected.txt @@ -21,11 +21,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -36,22 +36,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -62,11 +62,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -77,11 +77,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -89,11 +89,11 @@ "optional": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -101,11 +101,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -120,11 +120,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -133,11 +133,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -145,11 +145,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -160,22 +160,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -183,11 +183,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -195,11 +195,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -207,11 +207,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -227,11 +227,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 68 }, "end": { - "line": 1, + "line": 17, "column": 69 } } @@ -239,11 +239,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -253,14 +253,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 73 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -273,11 +273,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 81 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -287,25 +287,25 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 84 }, "end": { - "line": 1, + "line": 17, "column": 85 } } }, { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 1, + "line": 17, "column": 87 }, "end": { - "line": 1, + "line": 17, "column": 92 } } @@ -313,11 +313,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 80 }, "end": { - "line": 1, + "line": 17, "column": 93 } } @@ -325,11 +325,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 72 }, "end": { - "line": 1, + "line": 17, "column": 94 } } @@ -337,22 +337,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 66 }, "end": { - "line": 1, + "line": 17, "column": 95 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 95 } } @@ -361,11 +361,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 96 } } @@ -377,9 +377,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 96 } } } -TypeError: Type 'string' is not assignable to type 'number'. [tupleAssignability6.ts:1:87] +TypeError: Type 'string' is not assignable to type 'number'. [tupleAssignability6.ts:17:87] diff --git a/es2panda/test/compiler/ts/tupleAssignability7-expected.txt b/es2panda/test/compiler/ts/tupleAssignability7-expected.txt index 27d7c8ef97ee5340d96ae5141c01a60c3051c735..25e8e2aad47cb5e0f4d6856e02b2792a77c75ff4 100644 --- a/es2panda/test/compiler/ts/tupleAssignability7-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability7-expected.txt @@ -21,11 +21,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -36,22 +36,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -62,11 +62,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 31 } } @@ -77,11 +77,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -89,11 +89,11 @@ "optional": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -101,11 +101,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -120,11 +120,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -133,11 +133,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 51 } } @@ -145,11 +145,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -160,22 +160,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 59 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -183,11 +183,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -195,11 +195,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -207,11 +207,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -227,11 +227,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 68 }, "end": { - "line": 1, + "line": 17, "column": 69 } } @@ -239,11 +239,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 67 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -256,11 +256,11 @@ "value": 2, "loc": { "start": { - "line": 1, + "line": 17, "column": 73 }, "end": { - "line": 1, + "line": 17, "column": 74 } } @@ -273,11 +273,11 @@ "value": 3, "loc": { "start": { - "line": 1, + "line": 17, "column": 77 }, "end": { - "line": 1, + "line": 17, "column": 78 } } @@ -287,11 +287,11 @@ "value": 4, "loc": { "start": { - "line": 1, + "line": 17, "column": 80 }, "end": { - "line": 1, + "line": 17, "column": 81 } } @@ -299,11 +299,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 76 }, "end": { - "line": 1, + "line": 17, "column": 82 } } @@ -311,11 +311,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 72 }, "end": { - "line": 1, + "line": 17, "column": 83 } } @@ -323,22 +323,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 66 }, "end": { - "line": 1, + "line": 17, "column": 84 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 84 } } @@ -347,11 +347,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 85 } } @@ -363,9 +363,9 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 85 } } } -TypeError: Type 'number' is not assignable to type 'boolean | string'. [tupleAssignability7.ts:1:73] +TypeError: Type 'number' is not assignable to type 'boolean | string'. [tupleAssignability7.ts:17:73] diff --git a/es2panda/test/compiler/ts/tupleAssignability8-expected.txt b/es2panda/test/compiler/ts/tupleAssignability8-expected.txt index 8470698c52b8044bce125bed447564e47993f764..dc38074f3127318071f7902c6913703f784335c9 100644 --- a/es2panda/test/compiler/ts/tupleAssignability8-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability8-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -42,11 +42,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -55,11 +55,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -68,11 +68,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -80,11 +80,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -92,341 +92,108 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } }, "init": { - "type": "TSAsExpression", - "expression": { - "type": "ArrayExpression", - "elements": [ - { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 1, - "column": 53 - }, - "end": { - "line": 1, - "column": 54 - } - } - }, - { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 1, - "column": 56 - }, - "end": { - "line": 1, - "column": 61 - } - } - }, - { - "type": "BooleanLiteral", - "value": true, - "loc": { - "start": { - "line": 1, - "column": 63 - }, - "end": { - "line": 1, - "column": 67 - } - } - }, - { - "type": "NumberLiteral", - "value": 5, - "loc": { - "start": { - "line": 1, - "column": 69 - }, - "end": { - "line": 1, - "column": 70 - } - } - }, - { - "type": "NumberLiteral", - "value": 6, - "loc": { - "start": { - "line": 1, - "column": 72 - }, - "end": { - "line": 1, - "column": 73 - } - } - } - ], - "loc": { - "start": { - "line": 1, - "column": 52 - }, - "end": { - "line": 1, - "column": 74 - } - } - }, - "typeAnnotation": { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 82 - }, - "end": { - "line": 1, - "column": 88 - } - } - }, - "label": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 79 - }, - "end": { - "line": 1, - "column": 80 - } - } + "type": "ArrayExpression", + "elements": [ + { + "type": "NumberLiteral", + "value": 1, + "loc": { + "start": { + "line": 17, + "column": 53 }, - "loc": { - "start": { - "line": 1, - "column": 79 - }, - "end": { - "line": 1, - "column": 89 - } + "end": { + "line": 17, + "column": 54 } - }, - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 1, - "column": 93 - }, - "end": { - "line": 1, - "column": 99 - } - } - }, - "label": { - "type": "Identifier", - "name": "b", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 90 - }, - "end": { - "line": 1, - "column": 91 - } - } + } + }, + { + "type": "StringLiteral", + "value": "foo", + "loc": { + "start": { + "line": 17, + "column": 56 }, - "loc": { - "start": { - "line": 1, - "column": 90 - }, - "end": { - "line": 1, - "column": 100 - } + "end": { + "line": 17, + "column": 61 } - }, - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSBooleanKeyword", - "loc": { - "start": { - "line": 1, - "column": 104 - }, - "end": { - "line": 1, - "column": 111 - } - } - }, - "label": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 101 - }, - "end": { - "line": 1, - "column": 102 - } - } + } + }, + { + "type": "BooleanLiteral", + "value": true, + "loc": { + "start": { + "line": 17, + "column": 63 }, - "loc": { - "start": { - "line": 1, - "column": 101 - }, - "end": { - "line": 1, - "column": 112 - } + "end": { + "line": 17, + "column": 67 } - }, - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 116 - }, - "end": { - "line": 1, - "column": 122 - } - } - }, - "label": { - "type": "Identifier", - "name": "d", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 113 - }, - "end": { - "line": 1, - "column": 114 - } - } + } + }, + { + "type": "NumberLiteral", + "value": 5, + "loc": { + "start": { + "line": 17, + "column": 69 }, - "loc": { - "start": { - "line": 1, - "column": 113 - }, - "end": { - "line": 1, - "column": 123 - } + "end": { + "line": 17, + "column": 70 } - }, - { - "type": "TSNamedTupleMember", - "elementType": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 1, - "column": 127 - }, - "end": { - "line": 1, - "column": 133 - } - } - }, - "label": { - "type": "Identifier", - "name": "e", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 124 - }, - "end": { - "line": 1, - "column": 125 - } - } + } + }, + { + "type": "NumberLiteral", + "value": 6, + "loc": { + "start": { + "line": 17, + "column": 72 }, - "loc": { - "start": { - "line": 1, - "column": 124 - }, - "end": { - "line": 1, - "column": 134 - } + "end": { + "line": 17, + "column": 73 } } - ], - "loc": { - "start": { - "line": 1, - "column": 78 - }, - "end": { - "line": 1, - "column": 134 - } } - }, + ], "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, - "column": 135 + "line": 17, + "column": 74 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, - "column": 135 + "line": 17, + "column": 74 } } } @@ -434,12 +201,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 135 + "line": 17, + "column": 74 } } } @@ -450,9 +217,9 @@ "column": 1 }, "end": { - "line": 1, - "column": 135 + "line": 18, + "column": 1 } } } -TypeError: Type '[a: number, b: string, c: boolean, d: number, e: number]' is not assignable to type '[number, string, boolean, number, string]' [tupleAssignability8.ts:1:5] +TypeError: Type 'number' is not assignable to type 'string'. [tupleAssignability8.ts:17:72] diff --git a/es2panda/test/compiler/ts/tupleAssignability8.ts b/es2panda/test/compiler/ts/tupleAssignability8.ts index 75b7867602b4277dcf850ea74e2df262fe4cefdd..49ccb20e66193d0fbc51d8824d12905083e7cc69 100644 --- a/es2panda/test/compiler/ts/tupleAssignability8.ts +++ b/es2panda/test/compiler/ts/tupleAssignability8.ts @@ -14,4 +14,4 @@ */ -var a: [number, string, boolean, number, string] = [1, "foo", true, 5, 6] as [a: number, b: string, c: boolean, d: number, e: number]; \ No newline at end of file +var a: [number, string, boolean, number, string] = [1, "foo", true, 5, 6] diff --git a/es2panda/test/compiler/ts/tupleAssignability9-expected.txt b/es2panda/test/compiler/ts/tupleAssignability9-expected.txt index a7127acf736330be35f6811ebaffca0d7e29bf9d..7cc4abea32371a4f9df0052308394fcf397d0ab8 100644 --- a/es2panda/test/compiler/ts/tupleAssignability9-expected.txt +++ b/es2panda/test/compiler/ts/tupleAssignability9-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -41,11 +41,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -53,11 +53,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -65,11 +65,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -97,11 +97,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -117,11 +117,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -130,11 +130,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 31 } } @@ -142,11 +142,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 31 } } @@ -161,14 +161,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 18 } } @@ -178,11 +178,11 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 20 }, "end": { - "line": 4, + "line": 20, "column": 21 } } @@ -190,22 +190,22 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 22 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 23 } } @@ -213,33 +213,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 32 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -255,11 +255,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -272,11 +272,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -285,33 +285,33 @@ "optional": false, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 8 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 8 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 9 } } @@ -323,9 +323,9 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 9 } } } -TypeError: Type '[string, number]' is not assignable to type '[number, string]'. [tupleAssignability9.ts:7:1] +TypeError: Type '[string, number]' is not assignable to type '[number, string]'. [tupleAssignability9.ts:23:1] diff --git a/es2panda/test/compiler/ts/typeAliasUsedAsValue-expected.txt b/es2panda/test/compiler/ts/typeAliasUsedAsValue-expected.txt index 303572462a1f8fea7e7e006fe235e894899f7594..1e0d42f3ffbabc4f01f5239aa034a1a7ce1dd4c0 100644 --- a/es2panda/test/compiler/ts/typeAliasUsedAsValue-expected.txt +++ b/es2panda/test/compiler/ts/typeAliasUsedAsValue-expected.txt @@ -9,11 +9,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -35,11 +35,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -48,22 +48,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -79,11 +79,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -92,22 +92,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 33 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -115,11 +115,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -128,11 +128,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -144,11 +144,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -157,11 +157,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -170,11 +170,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 64 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -182,11 +182,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 47 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -194,22 +194,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 71 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 72 } } @@ -218,11 +218,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 1, + "line": 17, "column": 71 }, "end": { - "line": 1, + "line": 17, "column": 72 } } @@ -243,22 +243,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -266,11 +266,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -278,11 +278,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -291,11 +291,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -311,11 +311,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -325,33 +325,33 @@ "value": 2, "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 7 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 7 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -363,9 +363,9 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 8 } } } -TypeError: a only refers to a type , but is being used as a value here [typeAliasUsedAsValue.ts:4:1] +TypeError: a only refers to a type, but is being used as a value here. [typeAliasUsedAsValue.ts:20:1] diff --git a/es2panda/test/compiler/ts/undefined_as_value-expected.txt b/es2panda/test/compiler/ts/undefined_as_value-expected.txt index 22716265af084e3f6c977533db5be9dc781a5eaf..9b39f2f0a24c20a10109834948078a3754b7b10b 100644 --- a/es2panda/test/compiler/ts/undefined_as_value-expected.txt +++ b/es2panda/test/compiler/ts/undefined_as_value-expected.txt @@ -13,11 +13,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -40,22 +40,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 29 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -64,11 +64,11 @@ "kind": "let", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -87,22 +87,22 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 17 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -110,11 +110,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -128,11 +128,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -143,11 +143,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 34 }, "end": { - "line": 2, + "line": 18, "column": 43 } } @@ -155,22 +155,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 22 }, "end": { - "line": 2, + "line": 18, "column": 44 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -179,11 +179,11 @@ "kind": "let", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 45 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -217,11 +217,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -232,11 +232,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 21 }, "end": { - "line": 3, + "line": 19, "column": 30 } } @@ -247,11 +247,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 32 }, "end": { - "line": 3, + "line": 19, "column": 41 } } @@ -259,22 +259,22 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 42 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 42 } } @@ -283,11 +283,11 @@ "kind": "let", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 43 } } @@ -302,11 +302,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 13 } } @@ -322,11 +322,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 26 } } @@ -334,11 +334,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 14 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -348,11 +348,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 30 }, "end": { - "line": 5, + "line": 21, "column": 39 } } @@ -368,22 +368,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 10 }, "end": { - "line": 6, + "line": 22, "column": 19 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 3 }, "end": { - "line": 6, + "line": 22, "column": 20 } } @@ -391,33 +391,33 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 40 }, "end": { - "line": 7, + "line": 23, "column": 2 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -432,11 +432,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 4 } } @@ -448,11 +448,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 14 } } @@ -461,22 +461,22 @@ "optional": false, "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 15 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 16 } } @@ -488,7 +488,7 @@ "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 1 } } diff --git a/es2panda/test/compiler/ts/undefined_variable_name-expected.txt b/es2panda/test/compiler/ts/undefined_variable_name-expected.txt index aeaf6453a2654d79826e1a680fdab9caa572560e..d75a0e02ac0e596ca6987214dbca51020f0f4070 100644 --- a/es2panda/test/compiler/ts/undefined_variable_name-expected.txt +++ b/es2panda/test/compiler/ts/undefined_variable_name-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -33,11 +33,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -45,36 +45,36 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 40 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 40 } } @@ -84,11 +84,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 43 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -104,22 +104,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -127,33 +127,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 50 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -168,11 +168,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 4 } } @@ -181,22 +181,22 @@ "optional": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 6 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -208,9 +208,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 1 } } } -TypeError: Type 'string' is not assignable to type 'number'. [undefined_variable_name.ts:2:5] +TypeError: Type 'string' is not assignable to type 'number'. [undefined_variable_name.ts:18:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration-expected.txt b/es2panda/test/compiler/ts/varRedeclaration-expected.txt index abaf90d0e746bc7f637d629516a881870bc1f108..a18fe84cd5730f08d335e22cf8a7f1ed51e09dcd 100644 --- a/es2panda/test/compiler/ts/varRedeclaration-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration-expected.txt @@ -9,14 +9,27 @@ "id": { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -24,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,12 +50,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 7 + "line": 17, + "column": 12 } } }, @@ -54,14 +67,27 @@ "id": { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -69,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -82,12 +108,12 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, - "column": 7 + "line": 18, + "column": 12 } } }, @@ -103,11 +129,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 14 } } @@ -115,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -127,11 +153,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -140,11 +166,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -161,11 +187,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 14 } } @@ -173,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -185,11 +211,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -198,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -222,11 +248,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 14 } } @@ -235,11 +261,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 23 } } @@ -247,11 +273,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 23 } } @@ -259,11 +285,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -271,11 +297,11 @@ "init": null, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -284,11 +310,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 24 } } @@ -308,11 +334,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 14 } } @@ -321,11 +347,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 17 }, "end": { - "line": 8, + "line": 24, "column": 23 } } @@ -333,11 +359,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 23 } } @@ -345,11 +371,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -357,11 +383,11 @@ "init": null, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -370,11 +396,11 @@ "kind": "var", "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 24 } } @@ -401,11 +427,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 11 } } @@ -414,22 +440,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 10, + "line": 26, "column": 19 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 20 } } @@ -445,11 +471,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 21 }, "end": { - "line": 10, + "line": 26, "column": 22 } } @@ -458,22 +484,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 24 }, "end": { - "line": 10, + "line": 26, "column": 30 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 21 }, "end": { - "line": 10, + "line": 26, "column": 32 } } @@ -481,11 +507,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 32 } } @@ -493,11 +519,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -505,11 +531,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -518,11 +544,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 33 } } @@ -549,11 +575,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 10 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -562,22 +588,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 13 }, "end": { - "line": 11, + "line": 27, "column": 19 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 10 }, "end": { - "line": 11, + "line": 27, "column": 20 } } @@ -593,11 +619,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 21 }, "end": { - "line": 11, + "line": 27, "column": 22 } } @@ -606,22 +632,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 24 }, "end": { - "line": 11, + "line": 27, "column": 30 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 21 }, "end": { - "line": 11, + "line": 27, "column": 32 } } @@ -629,11 +655,11 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 32 } } @@ -641,11 +667,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -653,11 +679,11 @@ "init": null, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -666,11 +692,11 @@ "kind": "var", "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 33 } } @@ -693,11 +719,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 12 }, "end": { - "line": 13, + "line": 29, "column": 18 } } @@ -705,11 +731,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 9 }, "end": { - "line": 13, + "line": 29, "column": 10 } } @@ -728,11 +754,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 24 }, "end": { - "line": 13, + "line": 29, "column": 30 } } @@ -741,11 +767,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 33 }, "end": { - "line": 13, + "line": 29, "column": 39 } } @@ -753,33 +779,33 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 24 }, "end": { - "line": 13, + "line": 29, "column": 39 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 23 }, "end": { - "line": 13, + "line": 29, "column": 40 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 23 }, "end": { - "line": 13, + "line": 29, "column": 42 } } @@ -787,11 +813,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 20 }, "end": { - "line": 13, + "line": 29, "column": 21 } } @@ -801,22 +827,22 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 47 }, "end": { - "line": 13, + "line": 29, "column": 51 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 51 } } @@ -824,11 +850,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -836,11 +862,11 @@ "init": null, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -849,11 +875,11 @@ "kind": "var", "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 52 } } @@ -876,11 +902,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 12 }, "end": { - "line": 14, + "line": 30, "column": 18 } } @@ -888,11 +914,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 9 }, "end": { - "line": 14, + "line": 30, "column": 10 } } @@ -911,11 +937,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 24 }, "end": { - "line": 14, + "line": 30, "column": 30 } } @@ -924,11 +950,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 33 }, "end": { - "line": 14, + "line": 30, "column": 39 } } @@ -936,33 +962,33 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 24 }, "end": { - "line": 14, + "line": 30, "column": 39 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 23 }, "end": { - "line": 14, + "line": 30, "column": 40 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 23 }, "end": { - "line": 14, + "line": 30, "column": 42 } } @@ -970,11 +996,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 20 }, "end": { - "line": 14, + "line": 30, "column": 21 } } @@ -984,22 +1010,22 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 47 }, "end": { - "line": 14, + "line": 30, "column": 51 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 51 } } @@ -1007,11 +1033,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -1019,11 +1045,11 @@ "init": null, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -1032,11 +1058,11 @@ "kind": "var", "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 52 } } @@ -1066,11 +1092,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 10 }, "end": { - "line": 16, + "line": 32, "column": 11 } } @@ -1079,22 +1105,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 13 }, "end": { - "line": 16, + "line": 32, "column": 19 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 10 }, "end": { - "line": 16, + "line": 32, "column": 20 } } @@ -1110,11 +1136,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 21 }, "end": { - "line": 16, + "line": 32, "column": 22 } } @@ -1123,22 +1149,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 24 }, "end": { - "line": 16, + "line": 32, "column": 30 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 21 }, "end": { - "line": 16, + "line": 32, "column": 32 } } @@ -1146,11 +1172,11 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 8 }, "end": { - "line": 16, + "line": 32, "column": 32 } } @@ -1169,11 +1195,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 37 }, "end": { - "line": 16, + "line": 32, "column": 38 } } @@ -1184,33 +1210,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 40 }, "end": { - "line": 16, + "line": 32, "column": 46 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 40 }, "end": { - "line": 16, + "line": 32, "column": 48 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 37 }, "end": { - "line": 16, + "line": 32, "column": 49 } } @@ -1226,11 +1252,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 50 }, "end": { - "line": 16, + "line": 32, "column": 51 } } @@ -1239,22 +1265,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 54 }, "end": { - "line": 16, + "line": 32, "column": 60 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 50 }, "end": { - "line": 16, + "line": 32, "column": 62 } } @@ -1262,11 +1288,11 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 35 }, "end": { - "line": 16, + "line": 32, "column": 62 } } @@ -1274,11 +1300,11 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 8 }, "end": { - "line": 16, + "line": 32, "column": 62 } } @@ -1286,11 +1312,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 5 }, "end": { - "line": 16, + "line": 32, "column": 6 } } @@ -1298,11 +1324,11 @@ "init": null, "loc": { "start": { - "line": 16, + "line": 32, "column": 5 }, "end": { - "line": 16, + "line": 32, "column": 6 } } @@ -1311,11 +1337,11 @@ "kind": "var", "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 63 } } @@ -1345,11 +1371,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 10 }, "end": { - "line": 17, + "line": 33, "column": 11 } } @@ -1358,22 +1384,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 13 }, "end": { - "line": 17, + "line": 33, "column": 19 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 10 }, "end": { - "line": 17, + "line": 33, "column": 20 } } @@ -1389,11 +1415,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 21 }, "end": { - "line": 17, + "line": 33, "column": 22 } } @@ -1402,22 +1428,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 24 }, "end": { - "line": 17, + "line": 33, "column": 30 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 21 }, "end": { - "line": 17, + "line": 33, "column": 32 } } @@ -1425,11 +1451,11 @@ ], "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 32 } } @@ -1448,11 +1474,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 37 }, "end": { - "line": 17, + "line": 33, "column": 38 } } @@ -1463,33 +1489,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 40 }, "end": { - "line": 17, + "line": 33, "column": 46 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 40 }, "end": { - "line": 17, + "line": 33, "column": 48 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 37 }, "end": { - "line": 17, + "line": 33, "column": 49 } } @@ -1505,11 +1531,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 50 }, "end": { - "line": 17, + "line": 33, "column": 51 } } @@ -1518,22 +1544,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 54 }, "end": { - "line": 17, + "line": 33, "column": 60 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 50 }, "end": { - "line": 17, + "line": 33, "column": 62 } } @@ -1541,11 +1567,11 @@ ], "loc": { "start": { - "line": 17, + "line": 33, "column": 35 }, "end": { - "line": 17, + "line": 33, "column": 62 } } @@ -1553,11 +1579,11 @@ ], "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 62 } } @@ -1565,11 +1591,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 6 } } @@ -1577,11 +1603,11 @@ "init": null, "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 6 } } @@ -1590,11 +1616,11 @@ "kind": "var", "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 63 } } @@ -1615,11 +1641,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 6 } } @@ -1628,22 +1654,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 8 }, "end": { - "line": 20, + "line": 36, "column": 14 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 15 } } @@ -1659,11 +1685,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 6 } } @@ -1672,22 +1698,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 8 }, "end": { - "line": 21, + "line": 37, "column": 14 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 15 } } @@ -1695,11 +1721,11 @@ ], "loc": { "start": { - "line": 19, + "line": 35, "column": 22 }, "end": { - "line": 22, + "line": 38, "column": 2 } } @@ -1710,11 +1736,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 11 }, "end": { - "line": 19, + "line": 35, "column": 21 } } @@ -1722,11 +1748,11 @@ "extends": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 2 } } @@ -1747,11 +1773,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 6 } } @@ -1760,22 +1786,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 8 }, "end": { - "line": 25, + "line": 41, "column": 14 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 15 } } @@ -1791,11 +1817,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 26, + "line": 42, "column": 6 } } @@ -1804,22 +1830,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 26, + "line": 42, "column": 8 }, "end": { - "line": 26, + "line": 42, "column": 14 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 26, + "line": 42, "column": 15 } } @@ -1827,11 +1853,11 @@ ], "loc": { "start": { - "line": 24, + "line": 40, "column": 22 }, "end": { - "line": 27, + "line": 43, "column": 2 } } @@ -1842,11 +1868,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 11 }, "end": { - "line": 24, + "line": 40, "column": 21 } } @@ -1854,11 +1880,11 @@ "extends": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 27, + "line": 43, "column": 2 } } @@ -1879,22 +1905,22 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 8 }, "end": { - "line": 29, + "line": 45, "column": 18 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 8 }, "end": { - "line": 29, + "line": 45, "column": 18 } } @@ -1902,11 +1928,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 6 } } @@ -1914,11 +1940,11 @@ "init": null, "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 6 } } @@ -1927,11 +1953,11 @@ "kind": "var", "loc": { "start": { - "line": 29, + "line": 45, "column": 1 }, "end": { - "line": 29, + "line": 45, "column": 19 } } @@ -1952,22 +1978,22 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 8 }, "end": { - "line": 30, + "line": 46, "column": 18 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 8 }, "end": { - "line": 30, + "line": 46, "column": 18 } } @@ -1975,11 +2001,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 5 }, "end": { - "line": 30, + "line": 46, "column": 6 } } @@ -1987,11 +2013,11 @@ "init": null, "loc": { "start": { - "line": 30, + "line": 46, "column": 5 }, "end": { - "line": 30, + "line": 46, "column": 6 } } @@ -2000,11 +2026,11 @@ "kind": "var", "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 19 } } @@ -2025,11 +2051,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, + "line": 49, "column": 6 } } @@ -2038,22 +2064,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 8 }, "end": { - "line": 33, + "line": 49, "column": 15 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, + "line": 49, "column": 16 } } @@ -2061,11 +2087,11 @@ ], "loc": { "start": { - "line": 32, + "line": 48, "column": 41 }, "end": { - "line": 34, + "line": 50, "column": 2 } } @@ -2076,11 +2102,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 11 }, "end": { - "line": 32, + "line": 48, "column": 21 } } @@ -2089,27 +2115,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "interface1", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "interface1", + "decorators": [], + "loc": { + "start": { + "line": 48, + "column": 30 + }, + "end": { + "line": 48, + "column": 40 + } + } + }, "loc": { "start": { - "line": 32, - "column": 30 + "line": 48, + "column": 41 }, "end": { - "line": 32, + "line": 48, "column": 40 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 41 }, "end": { - "line": 32, + "line": 48, "column": 40 } } @@ -2117,11 +2156,11 @@ ], "loc": { "start": { - "line": 32, + "line": 48, "column": 1 }, "end": { - "line": 34, + "line": 50, "column": 2 } } @@ -2142,11 +2181,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 6 } } @@ -2155,22 +2194,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 8 }, "end": { - "line": 37, + "line": 53, "column": 15 } } }, "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 16 } } @@ -2178,11 +2217,11 @@ ], "loc": { "start": { - "line": 36, + "line": 52, "column": 41 }, "end": { - "line": 38, + "line": 54, "column": 2 } } @@ -2193,11 +2232,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 11 }, "end": { - "line": 36, + "line": 52, "column": 21 } } @@ -2206,27 +2245,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "interface2", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "interface2", + "decorators": [], + "loc": { + "start": { + "line": 52, + "column": 30 + }, + "end": { + "line": 52, + "column": 40 + } + } + }, "loc": { "start": { - "line": 36, - "column": 30 + "line": 52, + "column": 41 }, "end": { - "line": 36, + "line": 52, "column": 40 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 41 }, "end": { - "line": 36, + "line": 52, "column": 40 } } @@ -2234,11 +2286,11 @@ ], "loc": { "start": { - "line": 36, + "line": 52, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 2 } } @@ -2259,22 +2311,22 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 8 }, "end": { - "line": 40, + "line": 56, "column": 18 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 8 }, "end": { - "line": 40, + "line": 56, "column": 18 } } @@ -2282,11 +2334,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 5 }, "end": { - "line": 40, + "line": 56, "column": 6 } } @@ -2294,11 +2346,11 @@ "init": null, "loc": { "start": { - "line": 40, + "line": 56, "column": 5 }, "end": { - "line": 40, + "line": 56, "column": 6 } } @@ -2307,11 +2359,11 @@ "kind": "var", "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 19 } } @@ -2332,22 +2384,22 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 8 }, "end": { - "line": 41, + "line": 57, "column": 18 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 8 }, "end": { - "line": 41, + "line": 57, "column": 18 } } @@ -2355,11 +2407,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 5 }, "end": { - "line": 41, + "line": 57, "column": 6 } } @@ -2367,11 +2419,11 @@ "init": null, "loc": { "start": { - "line": 41, + "line": 57, "column": 5 }, "end": { - "line": 41, + "line": 57, "column": 6 } } @@ -2380,11 +2432,11 @@ "kind": "var", "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 19 } } @@ -2404,11 +2456,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 9 }, "end": { - "line": 44, + "line": 60, "column": 15 } } @@ -2416,11 +2468,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 6 }, "end": { - "line": 44, + "line": 60, "column": 7 } } @@ -2432,11 +2484,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 20 }, "end": { - "line": 44, + "line": 60, "column": 26 } } @@ -2444,24 +2496,37 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 17 }, "end": { - "line": 44, + "line": 60, "column": 18 } } } ], + "returnType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 60, + "column": 29 + }, + "end": { + "line": 60, + "column": 35 + } + } + }, "loc": { "start": { - "line": 44, + "line": 60, "column": 5 }, "end": { - "line": 44, - "column": 28 + "line": 60, + "column": 36 } } }, @@ -2475,11 +2540,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 45, + "line": 61, "column": 9 }, "end": { - "line": 45, + "line": 61, "column": 15 } } @@ -2487,11 +2552,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 6 }, "end": { - "line": 45, + "line": 61, "column": 7 } } @@ -2503,11 +2568,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 45, + "line": 61, "column": 20 }, "end": { - "line": 45, + "line": 61, "column": 26 } } @@ -2515,24 +2580,37 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 17 }, "end": { - "line": 45, + "line": 61, "column": 18 } } } ], + "returnType": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 61, + "column": 29 + }, + "end": { + "line": 61, + "column": 35 + } + } + }, "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, - "column": 28 + "line": 61, + "column": 36 } } }, @@ -2548,22 +2626,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 46, + "line": 62, "column": 12 }, "end": { - "line": 46, + "line": 62, "column": 18 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 12 }, "end": { - "line": 46, + "line": 62, "column": 20 } } @@ -2571,11 +2649,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 9 }, "end": { - "line": 46, + "line": 62, "column": 10 } } @@ -2597,11 +2675,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 27 }, "end": { - "line": 46, + "line": 62, "column": 28 } } @@ -2610,22 +2688,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 46, + "line": 62, "column": 30 }, "end": { - "line": 46, + "line": 62, "column": 36 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 27 }, "end": { - "line": 46, + "line": 62, "column": 37 } } @@ -2641,11 +2719,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 38 }, "end": { - "line": 46, + "line": 62, "column": 39 } } @@ -2654,22 +2732,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 46, + "line": 62, "column": 41 }, "end": { - "line": 46, + "line": 62, "column": 47 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 38 }, "end": { - "line": 46, + "line": 62, "column": 49 } } @@ -2677,11 +2755,11 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 25 }, "end": { - "line": 46, + "line": 62, "column": 49 } } @@ -2689,24 +2767,37 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 22 }, "end": { - "line": 46, + "line": 62, "column": 23 } } } ], + "returnType": { + "type": "TSBooleanKeyword", + "loc": { + "start": { + "line": 62, + "column": 52 + }, + "end": { + "line": 62, + "column": 59 + } + } + }, "loc": { "start": { - "line": 46, + "line": 62, "column": 5 }, "end": { - "line": 46, - "column": 51 + "line": 62, + "column": 60 } } }, @@ -2722,22 +2813,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 47, + "line": 63, "column": 12 }, "end": { - "line": 47, + "line": 63, "column": 18 } } }, "loc": { "start": { - "line": 47, + "line": 63, "column": 12 }, "end": { - "line": 47, + "line": 63, "column": 20 } } @@ -2745,11 +2836,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 9 }, "end": { - "line": 47, + "line": 63, "column": 10 } } @@ -2771,11 +2862,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 27 }, "end": { - "line": 47, + "line": 63, "column": 28 } } @@ -2784,22 +2875,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 47, + "line": 63, "column": 30 }, "end": { - "line": 47, + "line": 63, "column": 36 } } }, "loc": { "start": { - "line": 47, + "line": 63, "column": 27 }, "end": { - "line": 47, + "line": 63, "column": 37 } } @@ -2815,11 +2906,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 38 }, "end": { - "line": 47, + "line": 63, "column": 39 } } @@ -2828,22 +2919,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 47, + "line": 63, "column": 41 }, "end": { - "line": 47, + "line": 63, "column": 47 } } }, "loc": { "start": { - "line": 47, + "line": 63, "column": 38 }, "end": { - "line": 47, + "line": 63, "column": 49 } } @@ -2851,11 +2942,11 @@ ], "loc": { "start": { - "line": 47, + "line": 63, "column": 25 }, "end": { - "line": 47, + "line": 63, "column": 49 } } @@ -2863,35 +2954,48 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 22 }, "end": { - "line": 47, + "line": 63, "column": 23 } } } ], + "returnType": { + "type": "TSVoidKeyword", + "loc": { + "start": { + "line": 63, + "column": 52 + }, + "end": { + "line": 63, + "column": 56 + } + } + }, "loc": { "start": { - "line": 47, + "line": 63, "column": 5 }, "end": { - "line": 47, - "column": 51 + "line": 63, + "column": 57 } } } ], "loc": { "start": { - "line": 43, + "line": 59, "column": 22 }, "end": { - "line": 48, + "line": 64, "column": 2 } } @@ -2902,11 +3006,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 11 }, "end": { - "line": 43, + "line": 59, "column": 21 } } @@ -2914,11 +3018,11 @@ "extends": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 2 } } @@ -2938,11 +3042,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 51, + "line": 67, "column": 9 }, "end": { - "line": 51, + "line": 67, "column": 15 } } @@ -2950,11 +3054,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 6 }, "end": { - "line": 51, + "line": 67, "column": 7 } } @@ -2966,11 +3070,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 51, + "line": 67, "column": 20 }, "end": { - "line": 51, + "line": 67, "column": 26 } } @@ -2978,24 +3082,37 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 17 }, "end": { - "line": 51, + "line": 67, "column": 18 } } } ], + "returnType": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 67, + "column": 29 + }, + "end": { + "line": 67, + "column": 35 + } + } + }, "loc": { "start": { - "line": 51, + "line": 67, "column": 5 }, "end": { - "line": 51, - "column": 28 + "line": 67, + "column": 36 } } }, @@ -3009,11 +3126,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 9 }, "end": { - "line": 52, + "line": 68, "column": 15 } } @@ -3021,11 +3138,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 6 }, "end": { - "line": 52, + "line": 68, "column": 7 } } @@ -3037,11 +3154,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 20 }, "end": { - "line": 52, + "line": 68, "column": 26 } } @@ -3049,24 +3166,37 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 17 }, "end": { - "line": 52, + "line": 68, "column": 18 } } } ], + "returnType": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 68, + "column": 29 + }, + "end": { + "line": 68, + "column": 35 + } + } + }, "loc": { "start": { - "line": 52, + "line": 68, "column": 5 }, "end": { - "line": 52, - "column": 28 + "line": 68, + "column": 36 } } }, @@ -3082,22 +3212,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 12 }, "end": { - "line": 53, + "line": 69, "column": 18 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 12 }, "end": { - "line": 53, + "line": 69, "column": 20 } } @@ -3105,11 +3235,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 9 }, "end": { - "line": 53, + "line": 69, "column": 10 } } @@ -3131,11 +3261,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 27 }, "end": { - "line": 53, + "line": 69, "column": 28 } } @@ -3144,22 +3274,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 30 }, "end": { - "line": 53, + "line": 69, "column": 36 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 27 }, "end": { - "line": 53, + "line": 69, "column": 37 } } @@ -3175,11 +3305,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 38 }, "end": { - "line": 53, + "line": 69, "column": 39 } } @@ -3188,22 +3318,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 41 }, "end": { - "line": 53, + "line": 69, "column": 47 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 38 }, "end": { - "line": 53, + "line": 69, "column": 49 } } @@ -3211,11 +3341,11 @@ ], "loc": { "start": { - "line": 53, + "line": 69, "column": 25 }, "end": { - "line": 53, + "line": 69, "column": 49 } } @@ -3223,24 +3353,37 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 22 }, "end": { - "line": 53, + "line": 69, "column": 23 } } } ], + "returnType": { + "type": "TSVoidKeyword", + "loc": { + "start": { + "line": 69, + "column": 52 + }, + "end": { + "line": 69, + "column": 56 + } + } + }, "loc": { "start": { - "line": 53, + "line": 69, "column": 5 }, "end": { - "line": 53, - "column": 51 + "line": 69, + "column": 57 } } }, @@ -3256,22 +3399,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 54, + "line": 70, "column": 12 }, "end": { - "line": 54, + "line": 70, "column": 18 } } }, "loc": { "start": { - "line": 54, + "line": 70, "column": 12 }, "end": { - "line": 54, + "line": 70, "column": 20 } } @@ -3279,11 +3422,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 9 }, "end": { - "line": 54, + "line": 70, "column": 10 } } @@ -3305,11 +3448,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 27 }, "end": { - "line": 54, + "line": 70, "column": 28 } } @@ -3318,22 +3461,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 54, + "line": 70, "column": 30 }, "end": { - "line": 54, + "line": 70, "column": 36 } } }, "loc": { "start": { - "line": 54, + "line": 70, "column": 27 }, "end": { - "line": 54, + "line": 70, "column": 37 } } @@ -3349,11 +3492,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 38 }, "end": { - "line": 54, + "line": 70, "column": 39 } } @@ -3362,22 +3505,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 54, + "line": 70, "column": 41 }, "end": { - "line": 54, + "line": 70, "column": 47 } } }, "loc": { "start": { - "line": 54, + "line": 70, "column": 38 }, "end": { - "line": 54, + "line": 70, "column": 49 } } @@ -3385,11 +3528,11 @@ ], "loc": { "start": { - "line": 54, + "line": 70, "column": 25 }, "end": { - "line": 54, + "line": 70, "column": 49 } } @@ -3397,35 +3540,48 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 22 }, "end": { - "line": 54, + "line": 70, "column": 23 } } } ], + "returnType": { + "type": "TSBooleanKeyword", + "loc": { + "start": { + "line": 70, + "column": 52 + }, + "end": { + "line": 70, + "column": 59 + } + } + }, "loc": { "start": { - "line": 54, + "line": 70, "column": 5 }, "end": { - "line": 54, - "column": 51 + "line": 70, + "column": 60 } } } ], "loc": { "start": { - "line": 50, + "line": 66, "column": 22 }, "end": { - "line": 55, + "line": 71, "column": 2 } } @@ -3436,11 +3592,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 11 }, "end": { - "line": 50, + "line": 66, "column": 21 } } @@ -3448,11 +3604,11 @@ "extends": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 1 }, "end": { - "line": 55, + "line": 71, "column": 2 } } @@ -3473,22 +3629,22 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 8 }, "end": { - "line": 57, + "line": 73, "column": 18 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 8 }, "end": { - "line": 57, + "line": 73, "column": 18 } } @@ -3496,11 +3652,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 5 }, "end": { - "line": 57, + "line": 73, "column": 6 } } @@ -3508,11 +3664,11 @@ "init": null, "loc": { "start": { - "line": 57, + "line": 73, "column": 5 }, "end": { - "line": 57, + "line": 73, "column": 6 } } @@ -3521,11 +3677,11 @@ "kind": "var", "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 19 } } @@ -3546,22 +3702,22 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 8 }, "end": { - "line": 58, + "line": 74, "column": 18 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 8 }, "end": { - "line": 58, + "line": 74, "column": 18 } } @@ -3569,11 +3725,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 6 } } @@ -3581,11 +3737,11 @@ "init": null, "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 6 } } @@ -3594,11 +3750,11 @@ "kind": "var", "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 19 } } @@ -3614,11 +3770,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 5 }, "end": { - "line": 60, + "line": 76, "column": 6 } } @@ -3643,22 +3799,22 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 22 }, "end": { - "line": 60, + "line": 76, "column": 32 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 22 }, "end": { - "line": 60, + "line": 76, "column": 32 } } @@ -3666,11 +3822,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 19 }, "end": { - "line": 60, + "line": 76, "column": 20 } } @@ -3684,22 +3840,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 60, + "line": 76, "column": 37 }, "end": { - "line": 60, + "line": 76, "column": 43 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 37 }, "end": { - "line": 60, + "line": 76, "column": 45 } } @@ -3707,11 +3863,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 34 }, "end": { - "line": 60, + "line": 76, "column": 35 } } @@ -3721,11 +3877,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 60, + "line": 76, "column": 48 }, "end": { - "line": 60, + "line": 76, "column": 54 } } @@ -3740,22 +3896,22 @@ "value": 123, "loc": { "start": { - "line": 61, + "line": 77, "column": 12 }, "end": { - "line": 61, + "line": 77, "column": 15 } } }, "loc": { "start": { - "line": 61, + "line": 77, "column": 5 }, "end": { - "line": 61, + "line": 77, "column": 16 } } @@ -3763,44 +3919,44 @@ ], "loc": { "start": { - "line": 60, + "line": 76, "column": 55 }, "end": { - "line": 62, + "line": 78, "column": 2 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 9 }, "end": { - "line": 62, + "line": 78, "column": 2 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 9 }, "end": { - "line": 62, + "line": 78, "column": 2 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 5 }, "end": { - "line": 62, + "line": 78, "column": 2 } } @@ -3809,11 +3965,11 @@ "kind": "var", "loc": { "start": { - "line": 60, + "line": 76, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 2 } } @@ -3840,22 +3996,22 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 12 }, "end": { - "line": 63, + "line": 79, "column": 22 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 12 }, "end": { - "line": 63, + "line": 79, "column": 22 } } @@ -3863,11 +4019,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 9 }, "end": { - "line": 63, + "line": 79, "column": 10 } } @@ -3881,22 +4037,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 63, + "line": 79, "column": 27 }, "end": { - "line": 63, + "line": 79, "column": 33 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 27 }, "end": { - "line": 63, + "line": 79, "column": 35 } } @@ -3904,11 +4060,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 24 }, "end": { - "line": 63, + "line": 79, "column": 25 } } @@ -3918,22 +4074,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 63, + "line": 79, "column": 40 }, "end": { - "line": 63, + "line": 79, "column": 46 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 8 }, "end": { - "line": 63, + "line": 79, "column": 46 } } @@ -3941,11 +4097,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 6 } } @@ -3953,11 +4109,11 @@ "init": null, "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 6 } } @@ -3966,11 +4122,11 @@ "kind": "var", "loc": { "start": { - "line": 63, + "line": 79, "column": 1 }, "end": { - "line": 63, + "line": 79, "column": 47 } } @@ -3986,11 +4142,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 5 }, "end": { - "line": 65, + "line": 81, "column": 8 } } @@ -4009,11 +4165,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 13 }, "end": { - "line": 65, + "line": 81, "column": 14 } } @@ -4023,11 +4179,11 @@ "value": 1, "loc": { "start": { - "line": 65, + "line": 81, "column": 16 }, "end": { - "line": 65, + "line": 81, "column": 17 } } @@ -4035,11 +4191,11 @@ "kind": "init", "loc": { "start": { - "line": 65, + "line": 81, "column": 13 }, "end": { - "line": 65, + "line": 81, "column": 17 } } @@ -4055,11 +4211,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 19 }, "end": { - "line": 65, + "line": 81, "column": 20 } } @@ -4069,11 +4225,11 @@ "value": 2, "loc": { "start": { - "line": 65, + "line": 81, "column": 22 }, "end": { - "line": 65, + "line": 81, "column": 23 } } @@ -4081,11 +4237,11 @@ "kind": "init", "loc": { "start": { - "line": 65, + "line": 81, "column": 19 }, "end": { - "line": 65, + "line": 81, "column": 23 } } @@ -4101,11 +4257,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 25 }, "end": { - "line": 65, + "line": 81, "column": 26 } } @@ -4115,11 +4271,11 @@ "value": 3, "loc": { "start": { - "line": 65, + "line": 81, "column": 28 }, "end": { - "line": 65, + "line": 81, "column": 29 } } @@ -4127,11 +4283,11 @@ "kind": "init", "loc": { "start": { - "line": 65, + "line": 81, "column": 25 }, "end": { - "line": 65, + "line": 81, "column": 29 } } @@ -4139,22 +4295,22 @@ ], "loc": { "start": { - "line": 65, + "line": 81, "column": 11 }, "end": { - "line": 65, + "line": 81, "column": 31 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 5 }, "end": { - "line": 65, + "line": 81, "column": 31 } } @@ -4163,11 +4319,11 @@ "kind": "var", "loc": { "start": { - "line": 65, + "line": 81, "column": 1 }, "end": { - "line": 65, + "line": 81, "column": 32 } } @@ -4183,11 +4339,11 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 5 }, "end": { - "line": 66, + "line": 82, "column": 6 } } @@ -4206,25 +4362,25 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 11 }, "end": { - "line": 66, + "line": 82, "column": 12 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 66, + "line": 82, "column": 14 }, "end": { - "line": 66, + "line": 82, "column": 19 } } @@ -4232,11 +4388,11 @@ "kind": "init", "loc": { "start": { - "line": 66, + "line": 82, "column": 11 }, "end": { - "line": 66, + "line": 82, "column": 19 } } @@ -4252,25 +4408,25 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 21 }, "end": { - "line": 66, + "line": 82, "column": 22 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 66, + "line": 82, "column": 24 }, "end": { - "line": 66, + "line": 82, "column": 29 } } @@ -4278,11 +4434,11 @@ "kind": "init", "loc": { "start": { - "line": 66, + "line": 82, "column": 21 }, "end": { - "line": 66, + "line": 82, "column": 29 } } @@ -4295,22 +4451,22 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 34 }, "end": { - "line": 66, + "line": 82, "column": 37 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 31 }, "end": { - "line": 66, + "line": 82, "column": 37 } } @@ -4318,22 +4474,22 @@ ], "loc": { "start": { - "line": 66, + "line": 82, "column": 9 }, "end": { - "line": 66, + "line": 82, "column": 39 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 5 }, "end": { - "line": 66, + "line": 82, "column": 39 } } @@ -4342,11 +4498,11 @@ "kind": "var", "loc": { "start": { - "line": 66, + "line": 82, "column": 1 }, "end": { - "line": 66, + "line": 82, "column": 40 } } @@ -4373,11 +4529,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 10 }, "end": { - "line": 67, + "line": 83, "column": 11 } } @@ -4386,22 +4542,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 67, + "line": 83, "column": 13 }, "end": { - "line": 67, + "line": 83, "column": 19 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 10 }, "end": { - "line": 67, + "line": 83, "column": 20 } } @@ -4417,11 +4573,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 21 }, "end": { - "line": 67, + "line": 83, "column": 22 } } @@ -4430,22 +4586,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 67, + "line": 83, "column": 24 }, "end": { - "line": 67, + "line": 83, "column": 30 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 21 }, "end": { - "line": 67, + "line": 83, "column": 31 } } @@ -4461,11 +4617,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 32 }, "end": { - "line": 67, + "line": 83, "column": 33 } } @@ -4474,22 +4630,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 67, + "line": 83, "column": 35 }, "end": { - "line": 67, + "line": 83, "column": 41 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 32 }, "end": { - "line": 67, + "line": 83, "column": 42 } } @@ -4505,11 +4661,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 43 }, "end": { - "line": 67, + "line": 83, "column": 44 } } @@ -4518,22 +4674,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 67, + "line": 83, "column": 46 }, "end": { - "line": 67, + "line": 83, "column": 52 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 43 }, "end": { - "line": 67, + "line": 83, "column": 53 } } @@ -4549,11 +4705,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 54 }, "end": { - "line": 67, + "line": 83, "column": 55 } } @@ -4562,22 +4718,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 67, + "line": 83, "column": 57 }, "end": { - "line": 67, + "line": 83, "column": 63 } } }, "loc": { "start": { - "line": 67, + "line": 83, "column": 54 }, "end": { - "line": 67, + "line": 83, "column": 65 } } @@ -4585,11 +4741,11 @@ ], "loc": { "start": { - "line": 67, + "line": 83, "column": 8 }, "end": { - "line": 67, + "line": 83, "column": 65 } } @@ -4597,11 +4753,11 @@ "decorators": [], "loc": { "start": { - "line": 67, + "line": 83, "column": 5 }, "end": { - "line": 67, + "line": 83, "column": 6 } } @@ -4609,11 +4765,11 @@ "init": null, "loc": { "start": { - "line": 67, + "line": 83, "column": 5 }, "end": { - "line": 67, + "line": 83, "column": 6 } } @@ -4622,11 +4778,11 @@ "kind": "var", "loc": { "start": { - "line": 67, + "line": 83, "column": 1 }, "end": { - "line": 67, + "line": 83, "column": 66 } } @@ -4641,11 +4797,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 10 }, "end": { - "line": 69, + "line": 85, "column": 15 } } @@ -4661,11 +4817,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 69, + "line": 85, "column": 19 }, "end": { - "line": 69, + "line": 85, "column": 25 } } @@ -4673,11 +4829,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 16 }, "end": { - "line": 69, + "line": 85, "column": 17 } } @@ -4689,11 +4845,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 69, + "line": 85, "column": 30 }, "end": { - "line": 69, + "line": 85, "column": 36 } } @@ -4701,11 +4857,11 @@ "decorators": [], "loc": { "start": { - "line": 69, + "line": 85, "column": 27 }, "end": { - "line": 69, + "line": 85, "column": 28 } } @@ -4715,25 +4871,25 @@ "type": "TSLiteralType", "literal": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 69, + "line": 85, "column": 39 }, "end": { - "line": 69, + "line": 85, "column": 44 } } }, "loc": { "start": { - "line": 69, + "line": 85, "column": 39 }, "end": { - "line": 69, + "line": 85, "column": 44 } } @@ -4745,25 +4901,25 @@ "type": "ReturnStatement", "argument": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 70, + "line": 86, "column": 12 }, "end": { - "line": 70, + "line": 86, "column": 17 } } }, "loc": { "start": { - "line": 70, + "line": 86, "column": 5 }, "end": { - "line": 70, + "line": 86, "column": 18 } } @@ -4771,33 +4927,33 @@ ], "loc": { "start": { - "line": 69, + "line": 85, "column": 45 }, "end": { - "line": 71, + "line": 87, "column": 2 } } }, "loc": { "start": { - "line": 69, + "line": 85, "column": 1 }, "end": { - "line": 71, + "line": 87, "column": 2 } } }, "loc": { "start": { - "line": 69, + "line": 85, "column": 1 }, "end": { - "line": 71, + "line": 87, "column": 2 } } @@ -4812,11 +4968,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 10 }, "end": { - "line": 72, + "line": 88, "column": 15 } } @@ -4832,11 +4988,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 72, + "line": 88, "column": 19 }, "end": { - "line": 72, + "line": 88, "column": 25 } } @@ -4844,11 +5000,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 16 }, "end": { - "line": 72, + "line": 88, "column": 17 } } @@ -4860,11 +5016,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 72, + "line": 88, "column": 30 }, "end": { - "line": 72, + "line": 88, "column": 36 } } @@ -4872,11 +5028,11 @@ "decorators": [], "loc": { "start": { - "line": 72, + "line": 88, "column": 27 }, "end": { - "line": 72, + "line": 88, "column": 28 } } @@ -4889,22 +5045,22 @@ "value": true, "loc": { "start": { - "line": 72, + "line": 88, "column": 39 }, "end": { - "line": 72, + "line": 88, "column": 43 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 39 }, "end": { - "line": 72, + "line": 88, "column": 43 } } @@ -4919,22 +5075,22 @@ "value": true, "loc": { "start": { - "line": 73, + "line": 89, "column": 12 }, "end": { - "line": 73, + "line": 89, "column": 16 } } }, "loc": { "start": { - "line": 73, + "line": 89, "column": 5 }, "end": { - "line": 73, + "line": 89, "column": 17 } } @@ -4942,33 +5098,33 @@ ], "loc": { "start": { - "line": 72, + "line": 88, "column": 44 }, "end": { - "line": 74, + "line": 90, "column": 2 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 1 }, "end": { - "line": 74, + "line": 90, "column": 2 } } }, "loc": { "start": { - "line": 72, + "line": 88, "column": 1 }, "end": { - "line": 74, + "line": 90, "column": 2 } } @@ -4992,22 +5148,22 @@ "decorators": [], "loc": { "start": { - "line": 75, + "line": 91, "column": 15 }, "end": { - "line": 75, + "line": 91, "column": 20 } } }, "loc": { "start": { - "line": 75, + "line": 91, "column": 8 }, "end": { - "line": 75, + "line": 91, "column": 20 } } @@ -5020,22 +5176,22 @@ "decorators": [], "loc": { "start": { - "line": 75, + "line": 91, "column": 30 }, "end": { - "line": 75, + "line": 91, "column": 35 } } }, "loc": { "start": { - "line": 75, + "line": 91, "column": 23 }, "end": { - "line": 75, + "line": 91, "column": 35 } } @@ -5043,11 +5199,11 @@ ], "loc": { "start": { - "line": 75, + "line": 91, "column": 8 }, "end": { - "line": 75, + "line": 91, "column": 35 } } @@ -5055,11 +5211,11 @@ "decorators": [], "loc": { "start": { - "line": 75, + "line": 91, "column": 5 }, "end": { - "line": 75, + "line": 91, "column": 6 } } @@ -5067,11 +5223,11 @@ "init": null, "loc": { "start": { - "line": 75, + "line": 91, "column": 5 }, "end": { - "line": 75, + "line": 91, "column": 6 } } @@ -5080,11 +5236,11 @@ "kind": "var", "loc": { "start": { - "line": 75, + "line": 91, "column": 1 }, "end": { - "line": 75, + "line": 91, "column": 36 } } @@ -5112,11 +5268,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 76, + "line": 92, "column": 13 }, "end": { - "line": 76, + "line": 92, "column": 19 } } @@ -5124,11 +5280,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 10 }, "end": { - "line": 76, + "line": 92, "column": 11 } } @@ -5140,11 +5296,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 76, + "line": 92, "column": 24 }, "end": { - "line": 76, + "line": 92, "column": 30 } } @@ -5152,11 +5308,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 21 }, "end": { - "line": 76, + "line": 92, "column": 22 } } @@ -5166,47 +5322,47 @@ "type": "TSLiteralType", "literal": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 76, + "line": 92, "column": 35 }, "end": { - "line": 76, + "line": 92, "column": 40 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 35 }, "end": { - "line": 76, + "line": 92, "column": 40 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 9 }, "end": { - "line": 76, + "line": 92, "column": 40 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 8 }, "end": { - "line": 76, + "line": 92, "column": 41 } } @@ -5223,11 +5379,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 76, + "line": 92, "column": 49 }, "end": { - "line": 76, + "line": 92, "column": 55 } } @@ -5235,11 +5391,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 46 }, "end": { - "line": 76, + "line": 92, "column": 47 } } @@ -5251,11 +5407,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 76, + "line": 92, "column": 60 }, "end": { - "line": 76, + "line": 92, "column": 66 } } @@ -5263,11 +5419,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 57 }, "end": { - "line": 76, + "line": 92, "column": 58 } } @@ -5280,44 +5436,44 @@ "value": true, "loc": { "start": { - "line": 76, + "line": 92, "column": 71 }, "end": { - "line": 76, + "line": 92, "column": 75 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 71 }, "end": { - "line": 76, + "line": 92, "column": 75 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 45 }, "end": { - "line": 76, + "line": 92, "column": 75 } } }, "loc": { "start": { - "line": 76, + "line": 92, "column": 44 }, "end": { - "line": 76, + "line": 92, "column": 76 } } @@ -5325,11 +5481,11 @@ ], "loc": { "start": { - "line": 76, + "line": 92, "column": 8 }, "end": { - "line": 76, + "line": 92, "column": 76 } } @@ -5337,11 +5493,11 @@ "decorators": [], "loc": { "start": { - "line": 76, + "line": 92, "column": 5 }, "end": { - "line": 76, + "line": 92, "column": 6 } } @@ -5349,11 +5505,11 @@ "init": null, "loc": { "start": { - "line": 76, + "line": 92, "column": 5 }, "end": { - "line": 76, + "line": 92, "column": 6 } } @@ -5362,11 +5518,11 @@ "kind": "var", "loc": { "start": { - "line": 76, + "line": 92, "column": 1 }, "end": { - "line": 76, + "line": 92, "column": 6 } } @@ -5388,11 +5544,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 78, + "line": 94, "column": 12 }, "end": { - "line": 78, + "line": 94, "column": 18 } } @@ -5403,22 +5559,22 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 9 }, "end": { - "line": 78, + "line": 94, "column": 10 } } }, "loc": { "start": { - "line": 78, + "line": 94, "column": 9 }, "end": { - "line": 78, + "line": 94, "column": 19 } } @@ -5429,11 +5585,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 78, + "line": 94, "column": 23 }, "end": { - "line": 78, + "line": 94, "column": 29 } } @@ -5444,22 +5600,22 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 20 }, "end": { - "line": 78, + "line": 94, "column": 21 } } }, "loc": { "start": { - "line": 78, + "line": 94, "column": 20 }, "end": { - "line": 78, + "line": 94, "column": 30 } } @@ -5470,11 +5626,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 78, + "line": 94, "column": 34 }, "end": { - "line": 78, + "line": 94, "column": 41 } } @@ -5485,22 +5641,22 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 31 }, "end": { - "line": 78, + "line": 94, "column": 32 } } }, "loc": { "start": { - "line": 78, + "line": 94, "column": 31 }, "end": { - "line": 78, + "line": 94, "column": 42 } } @@ -5508,11 +5664,11 @@ ], "loc": { "start": { - "line": 78, + "line": 94, "column": 8 }, "end": { - "line": 78, + "line": 94, "column": 42 } } @@ -5520,11 +5676,11 @@ "decorators": [], "loc": { "start": { - "line": 78, + "line": 94, "column": 5 }, "end": { - "line": 78, + "line": 94, "column": 6 } } @@ -5532,11 +5688,11 @@ "init": null, "loc": { "start": { - "line": 78, + "line": 94, "column": 5 }, "end": { - "line": 78, + "line": 94, "column": 6 } } @@ -5545,11 +5701,11 @@ "kind": "var", "loc": { "start": { - "line": 78, + "line": 94, "column": 1 }, "end": { - "line": 78, + "line": 94, "column": 43 } } @@ -5569,11 +5725,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 79, + "line": 95, "column": 9 }, "end": { - "line": 79, + "line": 95, "column": 16 } } @@ -5582,11 +5738,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 79, + "line": 95, "column": 17 }, "end": { - "line": 79, + "line": 95, "column": 24 } } @@ -5595,11 +5751,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 79, + "line": 95, "column": 25 }, "end": { - "line": 79, + "line": 95, "column": 33 } } @@ -5607,11 +5763,11 @@ ], "loc": { "start": { - "line": 79, + "line": 95, "column": 8 }, "end": { - "line": 79, + "line": 95, "column": 33 } } @@ -5619,11 +5775,11 @@ "decorators": [], "loc": { "start": { - "line": 79, + "line": 95, "column": 5 }, "end": { - "line": 79, + "line": 95, "column": 6 } } @@ -5631,11 +5787,11 @@ "init": null, "loc": { "start": { - "line": 79, + "line": 95, "column": 5 }, "end": { - "line": 79, + "line": 95, "column": 6 } } @@ -5644,11 +5800,11 @@ "kind": "var", "loc": { "start": { - "line": 79, + "line": 95, "column": 1 }, "end": { - "line": 79, + "line": 95, "column": 34 } } @@ -5670,22 +5826,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 81, + "line": 97, "column": 8 }, "end": { - "line": 81, + "line": 97, "column": 14 } } }, "loc": { "start": { - "line": 81, + "line": 97, "column": 8 }, "end": { - "line": 81, + "line": 97, "column": 16 } } @@ -5700,22 +5856,22 @@ "value": 1, "loc": { "start": { - "line": 81, + "line": 97, "column": 20 }, "end": { - "line": 81, + "line": 97, "column": 21 } } }, "loc": { "start": { - "line": 81, + "line": 97, "column": 20 }, "end": { - "line": 81, + "line": 97, "column": 22 } } @@ -5727,22 +5883,22 @@ "value": 2, "loc": { "start": { - "line": 81, + "line": 97, "column": 23 }, "end": { - "line": 81, + "line": 97, "column": 24 } } }, "loc": { "start": { - "line": 81, + "line": 97, "column": 23 }, "end": { - "line": 81, + "line": 97, "column": 25 } } @@ -5754,22 +5910,22 @@ "value": 3, "loc": { "start": { - "line": 81, + "line": 97, "column": 26 }, "end": { - "line": 81, + "line": 97, "column": 27 } } }, "loc": { "start": { - "line": 81, + "line": 97, "column": 26 }, "end": { - "line": 81, + "line": 97, "column": 28 } } @@ -5777,11 +5933,11 @@ ], "loc": { "start": { - "line": 81, + "line": 97, "column": 19 }, "end": { - "line": 81, + "line": 97, "column": 28 } } @@ -5789,11 +5945,11 @@ ], "loc": { "start": { - "line": 81, + "line": 97, "column": 8 }, "end": { - "line": 81, + "line": 97, "column": 28 } } @@ -5801,11 +5957,11 @@ "decorators": [], "loc": { "start": { - "line": 81, + "line": 97, "column": 5 }, "end": { - "line": 81, + "line": 97, "column": 6 } } @@ -5813,11 +5969,11 @@ "init": null, "loc": { "start": { - "line": 81, + "line": 97, "column": 5 }, "end": { - "line": 81, + "line": 97, "column": 6 } } @@ -5826,11 +5982,11 @@ "kind": "var", "loc": { "start": { - "line": 81, + "line": 97, "column": 1 }, "end": { - "line": 81, + "line": 97, "column": 29 } } @@ -5856,22 +6012,22 @@ "value": 1, "loc": { "start": { - "line": 82, + "line": 98, "column": 9 }, "end": { - "line": 82, + "line": 98, "column": 10 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 9 }, "end": { - "line": 82, + "line": 98, "column": 11 } } @@ -5883,22 +6039,22 @@ "value": 2, "loc": { "start": { - "line": 82, + "line": 98, "column": 12 }, "end": { - "line": 82, + "line": 98, "column": 13 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 12 }, "end": { - "line": 82, + "line": 98, "column": 14 } } @@ -5910,22 +6066,22 @@ "value": 3, "loc": { "start": { - "line": 82, + "line": 98, "column": 15 }, "end": { - "line": 82, + "line": 98, "column": 16 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 15 }, "end": { - "line": 82, + "line": 98, "column": 17 } } @@ -5933,11 +6089,11 @@ ], "loc": { "start": { - "line": 82, + "line": 98, "column": 8 }, "end": { - "line": 82, + "line": 98, "column": 17 } } @@ -5948,22 +6104,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 82, + "line": 98, "column": 20 }, "end": { - "line": 82, + "line": 98, "column": 26 } } }, "loc": { "start": { - "line": 82, + "line": 98, "column": 20 }, "end": { - "line": 82, + "line": 98, "column": 28 } } @@ -5971,11 +6127,11 @@ ], "loc": { "start": { - "line": 82, + "line": 98, "column": 8 }, "end": { - "line": 82, + "line": 98, "column": 28 } } @@ -5983,11 +6139,11 @@ "decorators": [], "loc": { "start": { - "line": 82, + "line": 98, "column": 5 }, "end": { - "line": 82, + "line": 98, "column": 6 } } @@ -5995,11 +6151,11 @@ "init": null, "loc": { "start": { - "line": 82, + "line": 98, "column": 5 }, "end": { - "line": 82, + "line": 98, "column": 6 } } @@ -6008,11 +6164,11 @@ "kind": "var", "loc": { "start": { - "line": 82, + "line": 98, "column": 1 }, "end": { - "line": 82, + "line": 98, "column": 29 } } @@ -6033,11 +6189,11 @@ "decorators": [], "loc": { "start": { - "line": 85, + "line": 101, "column": 5 }, "end": { - "line": 85, + "line": 101, "column": 6 } } @@ -6046,22 +6202,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 85, + "line": 101, "column": 8 }, "end": { - "line": 85, + "line": 101, "column": 14 } } }, "loc": { "start": { - "line": 85, + "line": 101, "column": 5 }, "end": { - "line": 85, + "line": 101, "column": 15 } } @@ -6069,11 +6225,11 @@ ], "loc": { "start": { - "line": 84, + "line": 100, "column": 22 }, "end": { - "line": 86, + "line": 102, "column": 2 } } @@ -6084,11 +6240,11 @@ "decorators": [], "loc": { "start": { - "line": 84, + "line": 100, "column": 11 }, "end": { - "line": 84, + "line": 100, "column": 21 } } @@ -6096,11 +6252,11 @@ "extends": [], "loc": { "start": { - "line": 84, + "line": 100, "column": 1 }, "end": { - "line": 86, + "line": 102, "column": 2 } } @@ -6121,11 +6277,11 @@ "decorators": [], "loc": { "start": { - "line": 89, + "line": 105, "column": 5 }, "end": { - "line": 89, + "line": 105, "column": 6 } } @@ -6134,22 +6290,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 89, + "line": 105, "column": 8 }, "end": { - "line": 89, + "line": 105, "column": 14 } } }, "loc": { "start": { - "line": 89, + "line": 105, "column": 5 }, "end": { - "line": 89, + "line": 105, "column": 15 } } @@ -6157,11 +6313,11 @@ ], "loc": { "start": { - "line": 88, + "line": 104, "column": 41 }, "end": { - "line": 90, + "line": 106, "column": 2 } } @@ -6172,11 +6328,11 @@ "decorators": [], "loc": { "start": { - "line": 88, + "line": 104, "column": 11 }, "end": { - "line": 88, + "line": 104, "column": 21 } } @@ -6185,27 +6341,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "interface7", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "interface7", + "decorators": [], + "loc": { + "start": { + "line": 104, + "column": 30 + }, + "end": { + "line": 104, + "column": 40 + } + } + }, "loc": { "start": { - "line": 88, - "column": 30 + "line": 104, + "column": 41 }, "end": { - "line": 88, + "line": 104, "column": 40 } } }, "loc": { "start": { - "line": 88, + "line": 104, "column": 41 }, "end": { - "line": 88, + "line": 104, "column": 40 } } @@ -6213,11 +6382,11 @@ ], "loc": { "start": { - "line": 88, + "line": 104, "column": 1 }, "end": { - "line": 90, + "line": 106, "column": 2 } } @@ -6238,11 +6407,11 @@ "decorators": [], "loc": { "start": { - "line": 93, + "line": 109, "column": 5 }, "end": { - "line": 93, + "line": 109, "column": 6 } } @@ -6251,22 +6420,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 93, + "line": 109, "column": 8 }, "end": { - "line": 93, + "line": 109, "column": 14 } } }, "loc": { "start": { - "line": 93, + "line": 109, "column": 5 }, "end": { - "line": 93, + "line": 109, "column": 15 } } @@ -6274,11 +6443,11 @@ ], "loc": { "start": { - "line": 92, + "line": 108, "column": 22 }, "end": { - "line": 94, + "line": 110, "column": 2 } } @@ -6289,11 +6458,11 @@ "decorators": [], "loc": { "start": { - "line": 92, + "line": 108, "column": 11 }, "end": { - "line": 92, + "line": 108, "column": 21 } } @@ -6301,11 +6470,11 @@ "extends": [], "loc": { "start": { - "line": 92, + "line": 108, "column": 1 }, "end": { - "line": 94, + "line": 110, "column": 2 } } @@ -6326,22 +6495,22 @@ "decorators": [], "loc": { "start": { - "line": 96, + "line": 112, "column": 8 }, "end": { - "line": 96, + "line": 112, "column": 18 } } }, "loc": { "start": { - "line": 96, + "line": 112, "column": 8 }, "end": { - "line": 96, + "line": 112, "column": 18 } } @@ -6349,11 +6518,11 @@ "decorators": [], "loc": { "start": { - "line": 96, + "line": 112, "column": 5 }, "end": { - "line": 96, + "line": 112, "column": 6 } } @@ -6361,11 +6530,11 @@ "init": null, "loc": { "start": { - "line": 96, + "line": 112, "column": 5 }, "end": { - "line": 96, + "line": 112, "column": 6 } } @@ -6374,11 +6543,11 @@ "kind": "var", "loc": { "start": { - "line": 96, + "line": 112, "column": 1 }, "end": { - "line": 96, + "line": 112, "column": 19 } } @@ -6399,22 +6568,22 @@ "decorators": [], "loc": { "start": { - "line": 97, + "line": 113, "column": 8 }, "end": { - "line": 97, + "line": 113, "column": 18 } } }, "loc": { "start": { - "line": 97, + "line": 113, "column": 8 }, "end": { - "line": 97, + "line": 113, "column": 18 } } @@ -6422,11 +6591,11 @@ "decorators": [], "loc": { "start": { - "line": 97, + "line": 113, "column": 5 }, "end": { - "line": 97, + "line": 113, "column": 6 } } @@ -6434,11 +6603,11 @@ "init": null, "loc": { "start": { - "line": 97, + "line": 113, "column": 5 }, "end": { - "line": 97, + "line": 113, "column": 6 } } @@ -6447,11 +6616,11 @@ "kind": "var", "loc": { "start": { - "line": 97, + "line": 113, "column": 1 }, "end": { - "line": 97, + "line": 113, "column": 19 } } @@ -6478,11 +6647,11 @@ "decorators": [], "loc": { "start": { - "line": 99, + "line": 115, "column": 10 }, "end": { - "line": 99, + "line": 115, "column": 11 } } @@ -6491,22 +6660,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 99, + "line": 115, "column": 13 }, "end": { - "line": 99, + "line": 115, "column": 19 } } }, "loc": { "start": { - "line": 99, + "line": 115, "column": 10 }, "end": { - "line": 99, + "line": 115, "column": 20 } } @@ -6522,11 +6691,11 @@ "decorators": [], "loc": { "start": { - "line": 99, + "line": 115, "column": 21 }, "end": { - "line": 99, + "line": 115, "column": 22 } } @@ -6535,22 +6704,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 99, + "line": 115, "column": 24 }, "end": { - "line": 99, + "line": 115, "column": 30 } } }, "loc": { "start": { - "line": 99, + "line": 115, "column": 21 }, "end": { - "line": 99, + "line": 115, "column": 32 } } @@ -6558,11 +6727,11 @@ ], "loc": { "start": { - "line": 99, + "line": 115, "column": 8 }, "end": { - "line": 99, + "line": 115, "column": 32 } } @@ -6570,11 +6739,11 @@ "decorators": [], "loc": { "start": { - "line": 99, + "line": 115, "column": 5 }, "end": { - "line": 99, + "line": 115, "column": 6 } } @@ -6582,11 +6751,11 @@ "init": null, "loc": { "start": { - "line": 99, + "line": 115, "column": 5 }, "end": { - "line": 99, + "line": 115, "column": 6 } } @@ -6595,11 +6764,11 @@ "kind": "var", "loc": { "start": { - "line": 99, + "line": 115, "column": 1 }, "end": { - "line": 99, + "line": 115, "column": 33 } } @@ -6620,22 +6789,22 @@ "decorators": [], "loc": { "start": { - "line": 100, + "line": 116, "column": 15 }, "end": { - "line": 100, + "line": 116, "column": 16 } } }, "loc": { "start": { - "line": 100, + "line": 116, "column": 8 }, "end": { - "line": 100, + "line": 116, "column": 16 } } @@ -6643,11 +6812,11 @@ "decorators": [], "loc": { "start": { - "line": 100, + "line": 116, "column": 5 }, "end": { - "line": 100, + "line": 116, "column": 6 } } @@ -6655,11 +6824,11 @@ "init": null, "loc": { "start": { - "line": 100, + "line": 116, "column": 5 }, "end": { - "line": 100, + "line": 116, "column": 6 } } @@ -6668,11 +6837,11 @@ "kind": "var", "loc": { "start": { - "line": 100, + "line": 116, "column": 1 }, "end": { - "line": 100, + "line": 116, "column": 17 } } @@ -6684,8 +6853,8 @@ "column": 1 }, "end": { - "line": 100, - "column": 17 + "line": 117, + "column": 1 } } } diff --git a/es2panda/test/compiler/ts/varRedeclaration.ts b/es2panda/test/compiler/ts/varRedeclaration.ts index b9c8f12d91e84dee7d93f8fda8221b29d9db194e..8867e5863a3cc75cabca62fe589310b78ac5499c 100644 --- a/es2panda/test/compiler/ts/varRedeclaration.ts +++ b/es2panda/test/compiler/ts/varRedeclaration.ts @@ -14,8 +14,8 @@ */ -var a; -var a; +var a: any; +var a: any; var b: number; var b: number; @@ -57,17 +57,17 @@ var h: interface3; var h: interface4; interface interface5 { - (a: number, b: string), - (a: number, b: string), - new(a: number[], b: { a: number, b: string }), - new(a: number[], b: { a: number, b: string }), + (a: number, b: string): number, + (a: number, b: string): string, + new(a: number[], b: { a: number, b: string }): boolean, + new(a: number[], b: { a: number, b: string }): void, } interface interface6 { - (a: number, b: string), - (a: number, b: string), - new(a: number[], b: { a: number, b: string }), - new(a: number[], b: { a: number, b: string }), + (a: number, b: string): number, + (a: number, b: string): string, + new(a: number[], b: { a: number, b: string }): void, + new(a: number[], b: { a: number, b: string }): boolean, } var i: interface5; @@ -113,4 +113,4 @@ var o: interface9; var o: interface8; var p: { a: number, b: string }; -var p: typeof p; \ No newline at end of file +var p: typeof p; diff --git a/es2panda/test/compiler/ts/varRedeclaration1-expected.txt b/es2panda/test/compiler/ts/varRedeclaration1-expected.txt index 78610e7aaae3b17c6a8ac958c0b8f836c03fbbd5..adbeedd0ccd09979ee6055e55d564e728696bc3d 100644 --- a/es2panda/test/compiler/ts/varRedeclaration1-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration1-expected.txt @@ -9,14 +9,27 @@ "id": { "type": "Identifier", "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -24,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,12 +50,12 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 7 + "line": 17, + "column": 12 } } }, @@ -58,11 +71,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -70,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -82,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -95,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -111,9 +124,9 @@ "column": 1 }, "end": { - "line": 2, - "column": 15 + "line": 19, + "column": 1 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. [varRedeclaration1.ts:2:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'any', but here has type 'number'. [varRedeclaration1.ts:18:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration1.ts b/es2panda/test/compiler/ts/varRedeclaration1.ts index 823dc22a18e7ab894585e02504b91c63ed87125f..d744d5fe54f90fb85ddba7c9abab81cd6881bc27 100644 --- a/es2panda/test/compiler/ts/varRedeclaration1.ts +++ b/es2panda/test/compiler/ts/varRedeclaration1.ts @@ -14,5 +14,5 @@ */ -var a; -var a: number; \ No newline at end of file +var a: any; +var a: number; diff --git a/es2panda/test/compiler/ts/varRedeclaration10-expected.txt b/es2panda/test/compiler/ts/varRedeclaration10-expected.txt index 6944edd94a0def6eded0451499776ec77aa74599..f8c609df09fc821fb6ae09a9aba44fd62444dc63 100644 --- a/es2panda/test/compiler/ts/varRedeclaration10-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration10-expected.txt @@ -9,22 +9,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 3 } } @@ -36,9 +36,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 3 } } } -TypeError: Cannot find name a [varRedeclaration10.ts:6:1] +TypeError: Cannot find name a [varRedeclaration10.ts:22:1] diff --git a/es2panda/test/compiler/ts/varRedeclaration11-expected.txt b/es2panda/test/compiler/ts/varRedeclaration11-expected.txt index 3c9a6156c1455c9d40e8307fbc35348124a2eed6..ec28723db9d6ad0c04a5cd1f53a3f2ee15878adc 100644 --- a/es2panda/test/compiler/ts/varRedeclaration11-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration11-expected.txt @@ -17,11 +17,11 @@ "members": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -40,11 +40,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -53,22 +53,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -84,11 +84,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -97,22 +97,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 29 }, "end": { - "line": 1, + "line": 17, "column": 35 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 26 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -120,11 +120,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 37 } } @@ -133,11 +133,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 40 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -145,11 +145,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -157,11 +157,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -169,11 +169,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -182,11 +182,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -216,11 +216,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -229,22 +229,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -260,11 +260,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -273,22 +273,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 30 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -296,11 +296,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -309,11 +309,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 35 }, "end": { - "line": 2, + "line": 18, "column": 41 } } @@ -323,11 +323,11 @@ "members": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 44 }, "end": { - "line": 2, + "line": 18, "column": 46 } } @@ -335,11 +335,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 46 } } @@ -347,11 +347,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -359,11 +359,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -372,11 +372,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 47 } } @@ -388,9 +388,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 47 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '{ } | { a: number; b: string; } | number', but here has type '{ a: number; b: string; } | string | { }'. [varRedeclaration11.ts:2:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '{ } | { a: number; b: string; } | number', but here has type '{ a: number; b: string; } | string | { }'. [varRedeclaration11.ts:18:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration12-expected.txt b/es2panda/test/compiler/ts/varRedeclaration12-expected.txt index 487aa7ed838d57dbd79cbc2cbcfecdf588168c8b..0340f350a3b3398289a31ee3606dd6ff0e4b34da 100644 --- a/es2panda/test/compiler/ts/varRedeclaration12-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration12-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -28,11 +28,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -44,11 +44,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -56,11 +56,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -70,22 +70,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 29 }, "end": { - "line": 2, + "line": 18, "column": 35 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 36 } } @@ -100,11 +100,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -112,11 +112,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -128,11 +128,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 20 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -140,11 +140,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 18 } } @@ -154,22 +154,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 29 }, "end": { - "line": 3, + "line": 19, "column": 35 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 36 } } @@ -177,11 +177,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -192,11 +192,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -204,11 +204,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 2 } } @@ -228,11 +228,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -240,11 +240,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 6 }, "end": { - "line": 7, + "line": 23, "column": 7 } } @@ -256,11 +256,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 20 }, "end": { - "line": 7, + "line": 23, "column": 26 } } @@ -268,11 +268,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -282,22 +282,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 29 }, "end": { - "line": 7, + "line": 23, "column": 35 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 36 } } @@ -305,11 +305,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 13 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -320,11 +320,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -332,11 +332,11 @@ "extends": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -357,22 +357,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 9 } } @@ -380,11 +380,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -392,11 +392,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -405,11 +405,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 10 } } @@ -430,22 +430,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 9 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 9 } } @@ -453,11 +453,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -465,11 +465,11 @@ "init": null, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -478,11 +478,11 @@ "kind": "var", "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 10 } } @@ -494,9 +494,9 @@ "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 10 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'c' must be of type 'a', but here has type 'b'. [varRedeclaration12.ts:11:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'c' must be of type 'a', but here has type 'b'. [varRedeclaration12.ts:27:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration13-expected.txt b/es2panda/test/compiler/ts/varRedeclaration13-expected.txt index 1d79dbe98542e8aa3eb8844e91fbd34b7dc81467..c5e3379c31414949dff7db32115ac2d0517cca94 100644 --- a/es2panda/test/compiler/ts/varRedeclaration13-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration13-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -53,26 +53,26 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "id": { "type": "Identifier", - "name": "a", + "name": "z", "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -104,11 +104,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 12 }, "end": { - "line": 6, + "line": 22, "column": 18 } } @@ -116,11 +116,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 10 } } @@ -132,11 +132,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 29 } } @@ -144,11 +144,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 20 }, "end": { - "line": 6, + "line": 22, "column": 21 } } @@ -158,22 +158,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 32 }, "end": { - "line": 6, + "line": 22, "column": 38 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -181,11 +181,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -196,11 +196,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -208,11 +208,11 @@ "extends": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -232,11 +232,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 12 }, "end": { - "line": 10, + "line": 26, "column": 18 } } @@ -244,11 +244,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 9 }, "end": { - "line": 10, + "line": 26, "column": 10 } } @@ -260,11 +260,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 23 }, "end": { - "line": 10, + "line": 26, "column": 29 } } @@ -272,11 +272,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 20 }, "end": { - "line": 10, + "line": 26, "column": 21 } } @@ -286,22 +286,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 32 }, "end": { - "line": 10, + "line": 26, "column": 38 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -309,11 +309,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 26 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -324,11 +324,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 11 }, "end": { - "line": 9, + "line": 25, "column": 12 } } @@ -337,27 +337,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "a", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "z", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 21 + }, + "end": { + "line": 25, + "column": 22 + } + } + }, "loc": { "start": { - "line": 9, - "column": 21 + "line": 25, + "column": 22 }, "end": { - "line": 9, + "line": 25, "column": 22 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 22 }, "end": { - "line": 9, + "line": 25, "column": 22 } } @@ -365,27 +378,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "b", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 25 + } + } + }, "loc": { "start": { - "line": 9, - "column": 24 + "line": 25, + "column": 26 }, "end": { - "line": 9, + "line": 25, "column": 25 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 26 }, "end": { - "line": 9, + "line": 25, "column": 25 } } @@ -393,11 +419,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -418,11 +444,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -431,22 +457,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 14 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 15 } } @@ -461,11 +487,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 12 }, "end": { - "line": 15, + "line": 31, "column": 18 } } @@ -473,11 +499,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 10 } } @@ -489,11 +515,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 23 }, "end": { - "line": 15, + "line": 31, "column": 29 } } @@ -501,11 +527,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 20 }, "end": { - "line": 15, + "line": 31, "column": 21 } } @@ -515,22 +541,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 32 }, "end": { - "line": 15, + "line": 31, "column": 38 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -538,11 +564,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 13 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -553,11 +579,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 11 }, "end": { - "line": 13, + "line": 29, "column": 12 } } @@ -565,11 +591,11 @@ "extends": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -590,22 +616,22 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 8 }, "end": { - "line": 18, + "line": 34, "column": 9 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 8 }, "end": { - "line": 18, + "line": 34, "column": 9 } } @@ -613,11 +639,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 5 }, "end": { - "line": 18, + "line": 34, "column": 6 } } @@ -625,11 +651,11 @@ "init": null, "loc": { "start": { - "line": 18, + "line": 34, "column": 5 }, "end": { - "line": 18, + "line": 34, "column": 6 } } @@ -638,11 +664,11 @@ "kind": "var", "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 10 } } @@ -663,22 +689,22 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 8 }, "end": { - "line": 19, + "line": 35, "column": 9 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 8 }, "end": { - "line": 19, + "line": 35, "column": 9 } } @@ -686,11 +712,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 19, + "line": 35, "column": 6 } } @@ -698,11 +724,11 @@ "init": null, "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 19, + "line": 35, "column": 6 } } @@ -711,11 +737,11 @@ "kind": "var", "loc": { "start": { - "line": 19, + "line": 35, "column": 1 }, "end": { - "line": 19, + "line": 35, "column": 10 } } @@ -727,9 +753,9 @@ "column": 1 }, "end": { - "line": 19, - "column": 10 + "line": 36, + "column": 1 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'd', but here has type 'c'. [varRedeclaration13.ts:19:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'd', but here has type 'c'. [varRedeclaration13.ts:35:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration13.ts b/es2panda/test/compiler/ts/varRedeclaration13.ts index a2215161e669af2518c946289135fd8f3577c752..e25a04702796050da38d44a97995b3b9df82a8d2 100644 --- a/es2panda/test/compiler/ts/varRedeclaration13.ts +++ b/es2panda/test/compiler/ts/varRedeclaration13.ts @@ -14,7 +14,7 @@ */ -interface a { +interface z { a: number } @@ -22,7 +22,7 @@ interface b { new(a: number, b: string): number } -interface c extends a, b { +interface c extends z, b { new(a: number, b: string): number } @@ -32,4 +32,4 @@ interface d { } var a: d; -var a: c; \ No newline at end of file +var a: c; diff --git a/es2panda/test/compiler/ts/varRedeclaration14-expected.txt b/es2panda/test/compiler/ts/varRedeclaration14-expected.txt index cad9a1a53a0950f96ef76da08180231704a54af3..c50062e63b9f61554531baed344f59638ffca987 100644 --- a/es2panda/test/compiler/ts/varRedeclaration14-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration14-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -53,26 +53,26 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "id": { "type": "Identifier", - "name": "a", + "name": "k", "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -80,11 +80,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -105,11 +105,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -118,22 +118,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -141,11 +141,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -156,11 +156,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -169,27 +169,40 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "a", - "decorators": [], + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "k", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, "loc": { "start": { - "line": 5, - "column": 21 + "line": 21, + "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -197,11 +210,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -222,11 +235,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -238,11 +251,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 14 } } @@ -251,11 +264,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 17 }, "end": { - "line": 10, + "line": 26, "column": 23 } } @@ -263,22 +276,22 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 23 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 24 } } @@ -286,11 +299,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 13 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -301,11 +314,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 11 }, "end": { - "line": 9, + "line": 25, "column": 12 } } @@ -313,11 +326,11 @@ "extends": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 2 } } @@ -338,22 +351,22 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 9 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 8 }, "end": { - "line": 13, + "line": 29, "column": 9 } } @@ -361,11 +374,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -373,11 +386,11 @@ "init": null, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 6 } } @@ -386,11 +399,11 @@ "kind": "var", "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 13, + "line": 29, "column": 10 } } @@ -411,22 +424,22 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 9 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 9 } } @@ -434,11 +447,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -446,11 +459,11 @@ "init": null, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -459,11 +472,11 @@ "kind": "var", "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 10 } } @@ -475,9 +488,9 @@ "column": 1 }, "end": { - "line": 14, - "column": 10 + "line": 31, + "column": 1 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'c', but here has type 'b'. [varRedeclaration14.ts:14:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'c', but here has type 'b'. [varRedeclaration14.ts:30:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration14.ts b/es2panda/test/compiler/ts/varRedeclaration14.ts index 2c16ec588448ecf0409a2460b66a032bc1889b1a..f68cc88085957dfc4b53fa38947c9ca81c711df3 100644 --- a/es2panda/test/compiler/ts/varRedeclaration14.ts +++ b/es2panda/test/compiler/ts/varRedeclaration14.ts @@ -14,11 +14,11 @@ */ -interface a { +interface k { a: number, } -interface b extends a { +interface b extends k { a: number, } @@ -27,4 +27,4 @@ interface c { } var a: c; -var a: b; \ No newline at end of file +var a: b; diff --git a/es2panda/test/compiler/ts/varRedeclaration15-expected.txt b/es2panda/test/compiler/ts/varRedeclaration15-expected.txt index 1b40f7035cfa1d6d58e940c669eaf0fe4df2baf1..fcaee8ed13c8012bbe0580a844d6412e13aa4aa4 100644 --- a/es2panda/test/compiler/ts/varRedeclaration15-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration15-expected.txt @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -36,22 +36,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -80,22 +80,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 30 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -103,11 +103,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -115,11 +115,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -127,11 +127,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -140,11 +140,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -168,22 +168,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -195,22 +195,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -218,11 +218,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -230,11 +230,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -242,11 +242,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -255,11 +255,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -271,9 +271,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 21 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '{ a: number; b: string; }', but here has type '{ a: number; b: string; } | 5'. [varRedeclaration15.ts:2:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '{ a: number; b: string; }', but here has type '{ a: number; b: string; } | 5'. [varRedeclaration15.ts:18:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration2-expected.txt b/es2panda/test/compiler/ts/varRedeclaration2-expected.txt index f4356e8b7885c0cc0a82bfad12ef02aed7f2acc5..53bc9c310b51d4c983218b660a2a2b66010202df 100644 --- a/es2panda/test/compiler/ts/varRedeclaration2-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration2-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -74,22 +74,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -97,11 +97,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -109,11 +109,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -122,11 +122,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -138,9 +138,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 10 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number', but here has type '5'. [varRedeclaration2.ts:2:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number', but here has type '5'. [varRedeclaration2.ts:18:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration3-expected.txt b/es2panda/test/compiler/ts/varRedeclaration3-expected.txt index b14da0ecba65041ba918de804c84bcf308e3f638..f0b292db20c1617beaf579bd61d312599534f0f1 100644 --- a/es2panda/test/compiler/ts/varRedeclaration3-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration3-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -74,11 +74,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -87,11 +87,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -99,11 +99,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -111,11 +111,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -123,11 +123,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -136,11 +136,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -152,9 +152,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 24 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number', but here has type 'number | string'. [varRedeclaration3.ts:2:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number', but here has type 'number | string'. [varRedeclaration3.ts:18:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration4-expected.txt b/es2panda/test/compiler/ts/varRedeclaration4-expected.txt index 470f912694daa5548fc7e76b9a67e3046186d8da..f9c5b26ce868369dd52771cda90f0b1544daadc8 100644 --- a/es2panda/test/compiler/ts/varRedeclaration4-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration4-expected.txt @@ -15,22 +15,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -38,11 +38,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -86,22 +86,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -109,11 +109,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -121,11 +121,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -134,11 +134,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -150,9 +150,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number[]', but here has type 'string[]'. [varRedeclaration4.ts:2:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type 'number[]', but here has type 'string[]'. [varRedeclaration4.ts:18:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration5-expected.txt b/es2panda/test/compiler/ts/varRedeclaration5-expected.txt index 33b47e61d86a46920fd6069d7465edfc882d89c6..9dca6604fa9c959e6b188bb630a0c2eacbd925d4 100644 --- a/es2panda/test/compiler/ts/varRedeclaration5-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration5-expected.txt @@ -9,22 +9,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 3 } } @@ -36,9 +36,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 3 } } } -TypeError: Cannot find name a [varRedeclaration5.ts:6:1] +TypeError: Cannot find name a [varRedeclaration5.ts:22:1] diff --git a/es2panda/test/compiler/ts/varRedeclaration6-expected.txt b/es2panda/test/compiler/ts/varRedeclaration6-expected.txt index 251ed286e7f498e2fa34d24207c85c8a1134aa5a..9619ac59c8d18942ead585c4fdfcc7f40fd62aff 100644 --- a/es2panda/test/compiler/ts/varRedeclaration6-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration6-expected.txt @@ -16,11 +16,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -29,11 +29,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -42,11 +42,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -54,11 +54,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 32 } } @@ -66,11 +66,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -91,11 +91,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 33 } } @@ -117,11 +117,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -132,22 +132,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -158,11 +158,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -173,22 +173,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -199,11 +199,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 35 }, "end": { - "line": 2, + "line": 18, "column": 41 } } @@ -214,11 +214,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -226,11 +226,11 @@ "optional": true, "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 42 } } @@ -238,11 +238,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 42 } } @@ -250,11 +250,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -262,11 +262,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -275,11 +275,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 43 } } @@ -291,9 +291,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 43 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '[number, string, number]', but here has type '[a: number, b: string, c?: number]'. [varRedeclaration6.ts:2:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '[number, string, number]', but here has type '[a: number, b: string, c?: number]'. [varRedeclaration6.ts:18:5] diff --git a/es2panda/test/compiler/ts/varRedeclaration7-expected.txt b/es2panda/test/compiler/ts/varRedeclaration7-expected.txt index 66b4f4b9523a7a9d32343fa20648493b8a1e2286..dc545bb949a1b738a845547ed760949ad87fc85e 100644 --- a/es2panda/test/compiler/ts/varRedeclaration7-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration7-expected.txt @@ -9,22 +9,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 3 } } @@ -36,9 +36,9 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 3 } } } -TypeError: Cannot find name a [varRedeclaration7.ts:6:1] +TypeError: Cannot find name a [varRedeclaration7.ts:22:1] diff --git a/es2panda/test/compiler/ts/varRedeclaration8-expected.txt b/es2panda/test/compiler/ts/varRedeclaration8-expected.txt index 24c971843d55a8633142aa80a6808b2ec74257aa..16d126a1d09446bb5dcdda7ac4b517a8d1eca952 100644 --- a/es2panda/test/compiler/ts/varRedeclaration8-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration8-expected.txt @@ -9,22 +9,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 3 } } @@ -36,9 +36,9 @@ "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 3 } } } -TypeError: Cannot find name a [varRedeclaration8.ts:8:1] +TypeError: Cannot find name a [varRedeclaration8.ts:24:1] diff --git a/es2panda/test/compiler/ts/varRedeclaration9-expected.txt b/es2panda/test/compiler/ts/varRedeclaration9-expected.txt index 09b12b92abf8d607236982bc1f0b4b7ba6ef2cf1..6e8015c726c3eb8c6659f5618c40dba65298a4e7 100644 --- a/es2panda/test/compiler/ts/varRedeclaration9-expected.txt +++ b/es2panda/test/compiler/ts/varRedeclaration9-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -31,11 +31,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -47,11 +47,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -60,11 +60,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -74,22 +74,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -97,11 +97,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -109,11 +109,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -122,11 +122,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -149,11 +149,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -161,11 +161,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -177,11 +177,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -189,11 +189,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -203,22 +203,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 34 }, "end": { - "line": 2, + "line": 18, "column": 40 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 40 } } @@ -226,11 +226,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -238,11 +238,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -251,11 +251,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 41 } } @@ -267,9 +267,9 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 41 } } } -TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '(a: number, b?: number) => number', but here has type '(a: number, b: number) => number'. [varRedeclaration9.ts:2:5] +TypeError: Subsequent variable declaration must have the same type. Variable 'a' must be of type '(a: number, b?: number) => number', but here has type '(a: number, b: number) => number'. [varRedeclaration9.ts:18:5] diff --git a/es2panda/test/parser/ts/test-arrow-function-expected.txt b/es2panda/test/parser/ts/test-arrow-function-expected.txt index 8b843eaa8bb033140aa2a190cdcef69de8678310..34d258aa630ede8a04ce85b827aaca36cfbfd65b 100644 --- a/es2panda/test/parser/ts/test-arrow-function-expected.txt +++ b/es2panda/test/parser/ts/test-arrow-function-expected.txt @@ -19,11 +19,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -32,11 +32,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -47,44 +47,44 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -107,11 +107,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -119,11 +119,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 2 }, "end": { - "line": 2, + "line": 18, "column": 3 } } @@ -135,11 +135,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -148,11 +148,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -163,44 +163,44 @@ "statements": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 31 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 31 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 31 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -223,11 +223,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -235,11 +235,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 2 }, "end": { - "line": 3, + "line": 19, "column": 3 } } @@ -251,11 +251,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 22 } } @@ -263,11 +263,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -279,11 +279,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 28 }, "end": { - "line": 3, + "line": 19, "column": 35 } } @@ -292,11 +292,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -307,44 +307,44 @@ "statements": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 40 }, "end": { - "line": 3, + "line": 19, "column": 43 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 43 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 43 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 44 } } @@ -356,7 +356,7 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 44 } } diff --git a/es2panda/test/parser/ts/test-as-expression-expected.txt b/es2panda/test/parser/ts/test-as-expression-expected.txt index fe5dd740e4c0c580ec3d2a2ccf86efcffd20c664..3af6025350b21632171ee95a9d4e03f5dc722a94 100644 --- a/es2panda/test/parser/ts/test-as-expression-expected.txt +++ b/es2panda/test/parser/ts/test-as-expression-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-as-expression.ts:1:13] +SyntaxError: Type expected [test-as-expression.ts:17:13] diff --git a/es2panda/test/parser/ts/test-class-constructor-expected.txt b/es2panda/test/parser/ts/test-class-constructor-expected.txt index 56ce85bab51f4b60f1910da09dfabd5fe73410f6..cbeeb8d8e6073ea008fe1b393f1d21099a1772b5 100644 --- a/es2panda/test/parser/ts/test-class-constructor-expected.txt +++ b/es2panda/test/parser/ts/test-class-constructor-expected.txt @@ -10,11 +10,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -29,11 +29,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 20, "column": 5 }, "end": { - "line": 6, + "line": 20, "column": 16 } } @@ -58,11 +58,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 20, "column": 21 }, "end": { - "line": 6, + "line": 20, "column": 27 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 20, "column": 17 }, "end": { - "line": 6, + "line": 20, "column": 18 } } @@ -87,11 +87,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 20, "column": 33 }, "end": { - "line": 6, + "line": 20, "column": 39 } } @@ -100,11 +100,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 20, "column": 29 }, "end": { - "line": 6, + "line": 20, "column": 30 } } @@ -124,11 +124,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 7, + "line": 21, "column": 9 }, "end": { - "line": 7, + "line": 21, "column": 13 } } @@ -139,11 +139,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 21, "column": 14 }, "end": { - "line": 7, + "line": 21, "column": 15 } } @@ -152,11 +152,11 @@ "optional": false, "loc": { "start": { - "line": 7, + "line": 21, "column": 9 }, "end": { - "line": 7, + "line": 21, "column": 15 } } @@ -170,11 +170,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 21, "column": 18 }, "end": { - "line": 7, + "line": 21, "column": 19 } } @@ -184,44 +184,44 @@ "value": "", "loc": { "start": { - "line": 7, + "line": 21, "column": 23 }, "end": { - "line": 7, + "line": 21, "column": 25 } } }, "loc": { "start": { - "line": 7, + "line": 21, "column": 18 }, "end": { - "line": 7, + "line": 21, "column": 25 } } }, "loc": { "start": { - "line": 7, + "line": 21, "column": 9 }, "end": { - "line": 7, + "line": 21, "column": 25 } } }, "loc": { "start": { - "line": 7, + "line": 21, "column": 9 }, "end": { - "line": 7, + "line": 21, "column": 26 } } @@ -237,11 +237,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 8, + "line": 22, "column": 9 }, "end": { - "line": 8, + "line": 22, "column": 13 } } @@ -252,11 +252,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 22, "column": 14 }, "end": { - "line": 8, + "line": 22, "column": 15 } } @@ -265,11 +265,11 @@ "optional": false, "loc": { "start": { - "line": 8, + "line": 22, "column": 9 }, "end": { - "line": 8, + "line": 22, "column": 15 } } @@ -283,11 +283,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 22, "column": 18 }, "end": { - "line": 8, + "line": 22, "column": 19 } } @@ -297,44 +297,44 @@ "value": 0, "loc": { "start": { - "line": 8, + "line": 22, "column": 23 }, "end": { - "line": 8, + "line": 22, "column": 24 } } }, "loc": { "start": { - "line": 8, + "line": 22, "column": 18 }, "end": { - "line": 8, + "line": 22, "column": 24 } } }, "loc": { "start": { - "line": 8, + "line": 22, "column": 9 }, "end": { - "line": 8, + "line": 22, "column": 24 } } }, "loc": { "start": { - "line": 8, + "line": 22, "column": 9 }, "end": { - "line": 8, + "line": 22, "column": 25 } } @@ -349,11 +349,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 9, + "line": 23, "column": 9 }, "end": { - "line": 9, + "line": 23, "column": 13 } } @@ -364,11 +364,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 23, "column": 14 }, "end": { - "line": 9, + "line": 23, "column": 15 } } @@ -377,11 +377,11 @@ "optional": false, "loc": { "start": { - "line": 9, + "line": 23, "column": 9 }, "end": { - "line": 9, + "line": 23, "column": 15 } } @@ -390,22 +390,22 @@ "optional": false, "loc": { "start": { - "line": 9, + "line": 23, "column": 9 }, "end": { - "line": 9, + "line": 23, "column": 17 } } }, "loc": { "start": { - "line": 9, + "line": 23, "column": 9 }, "end": { - "line": 9, + "line": 23, "column": 18 } } @@ -413,207 +413,46 @@ ], "loc": { "start": { - "line": 6, + "line": 20, "column": 41 }, "end": { - "line": 10, + "line": 24, "column": 6 } } }, "loc": { "start": { - "line": 6, + "line": 20, "column": 16 }, "end": { - "line": 10, + "line": 24, "column": 6 } } }, "loc": { "start": { - "line": 6, + "line": 20, "column": 16 }, "end": { - "line": 10, + "line": 24, "column": 6 } } }, - "overloads": [ - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "constructor", - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "kind": "constructor", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "s", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "optional": true, - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "overloads": [], - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "constructor", - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "kind": "constructor", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "overloads": [], - "decorators": [], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], + "overloads": [], "decorators": [], "loc": { "start": { - "line": 6, + "line": 20, "column": 5 }, "end": { - "line": 10, + "line": 24, "column": 6 } } @@ -627,11 +466,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -645,11 +484,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -657,11 +496,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -674,11 +513,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -692,11 +531,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -704,11 +543,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -721,11 +560,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 25, "column": 5 }, "end": { - "line": 11, + "line": 25, "column": 6 } } @@ -747,11 +586,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 11, + "line": 25, "column": 10 }, "end": { - "line": 11, + "line": 25, "column": 14 } } @@ -771,11 +610,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 12, + "line": 26, "column": 9 }, "end": { - "line": 12, + "line": 26, "column": 13 } } @@ -786,11 +625,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 26, "column": 14 }, "end": { - "line": 12, + "line": 26, "column": 15 } } @@ -799,33 +638,33 @@ "optional": false, "loc": { "start": { - "line": 12, + "line": 26, "column": 9 }, "end": { - "line": 12, + "line": 26, "column": 15 } } }, "loc": { "start": { - "line": 12, + "line": 26, "column": 9 }, "end": { - "line": 12, + "line": 26, "column": 17 } } }, "loc": { "start": { - "line": 12, + "line": 26, "column": 9 }, "end": { - "line": 12, + "line": 26, "column": 18 } } @@ -833,33 +672,33 @@ ], "loc": { "start": { - "line": 11, + "line": 25, "column": 15 }, "end": { - "line": 13, + "line": 27, "column": 6 } } }, "loc": { "start": { - "line": 11, + "line": 25, "column": 6 }, "end": { - "line": 13, + "line": 27, "column": 6 } } }, "loc": { "start": { - "line": 11, + "line": 25, "column": 6 }, "end": { - "line": 13, + "line": 27, "column": 6 } } @@ -868,11 +707,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 25, "column": 5 }, "end": { - "line": 13, + "line": 27, "column": 6 } } @@ -881,11 +720,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 14, + "line": 28, "column": 2 } } @@ -893,11 +732,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 14, + "line": 28, "column": 2 } } @@ -909,8 +748,8 @@ "column": 1 }, "end": { - "line": 14, - "column": 2 + "line": 29, + "column": 1 } } } diff --git a/es2panda/test/parser/ts/test-class-constructor.ts b/es2panda/test/parser/ts/test-class-constructor.ts index 82d5e368cda0c5daa69301a2df181d79d6abde88..4d6e46921d9dd0b8bbccdbd965840f09afcdf270 100644 --- a/es2panda/test/parser/ts/test-class-constructor.ts +++ b/es2panda/test/parser/ts/test-class-constructor.ts @@ -17,8 +17,6 @@ class Baz { s: string; n: number; - constructor(s?: string); - constructor(); constructor(s?: string, n?: number) { this.s = s || ""; this.n = n || 0; @@ -27,4 +25,4 @@ class Baz { f(): void { this.n++; }; -} \ No newline at end of file +} diff --git a/es2panda/test/parser/ts/test-class-constructor1-expected.txt b/es2panda/test/parser/ts/test-class-constructor1-expected.txt index aeb92469fa04442d1fbb6c8f59b2c16a73ac0400..b8dc6e627c7254bec4347d3f59fb339a63090739 100644 --- a/es2panda/test/parser/ts/test-class-constructor1-expected.txt +++ b/es2panda/test/parser/ts/test-class-constructor1-expected.txt @@ -1 +1 @@ -SyntaxError: Constructor implementation is missing. [test-class-constructor1.ts:2:5] +SyntaxError: Multiple constructor implementations are not allowed. [test-class-constructor1.ts:20:5] diff --git a/es2panda/test/parser/ts/test-class-constructor2-expected.txt b/es2panda/test/parser/ts/test-class-constructor2-expected.txt index 63be2e9e88aac6c2e99088591dc6f7c788b1049e..3c80b2dbf28749a30875152598ab84a895299415 100644 --- a/es2panda/test/parser/ts/test-class-constructor2-expected.txt +++ b/es2panda/test/parser/ts/test-class-constructor2-expected.txt @@ -1 +1 @@ -SyntaxError: Constructor implementation is missing. [test-class-constructor2.ts:3:5] +SyntaxError: Multiple constructor implementations are not allowed. [test-class-constructor2.ts:19:5] diff --git a/es2panda/test/parser/ts/test-class-constructor3-expected.txt b/es2panda/test/parser/ts/test-class-constructor3-expected.txt index 102229c513bbcb47008c71a211f8d6cf908b621b..f7b8adab63335418b382f6ea47dfa7b651f02414 100644 --- a/es2panda/test/parser/ts/test-class-constructor3-expected.txt +++ b/es2panda/test/parser/ts/test-class-constructor3-expected.txt @@ -1 +1 @@ -SyntaxError: '(' expected [test-class-constructor3.ts:2:16] +SyntaxError: '(' expected [test-class-constructor3.ts:18:16] diff --git a/es2panda/test/parser/ts/test-class-constructor4-expected.txt b/es2panda/test/parser/ts/test-class-constructor4-expected.txt index 4f3dc6d7fa8defefdeb8e037062473a1cf068da0..1d1294954f9adb49309c1fa594457ba46e511966 100644 --- a/es2panda/test/parser/ts/test-class-constructor4-expected.txt +++ b/es2panda/test/parser/ts/test-class-constructor4-expected.txt @@ -1 +1,125 @@ -SyntaxError: Constructor implementation is missing. [test-class-constructor4.ts:2:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + "body": [], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-constructor5-expected.txt b/es2panda/test/parser/ts/test-class-constructor5-expected.txt index 5f7e7b36a4825f07b8d08d07b1a8a6ebfd9724dc..664dd9f46b5320a6a066d9cfc050b0e3daa28c4e 100644 --- a/es2panda/test/parser/ts/test-class-constructor5-expected.txt +++ b/es2panda/test/parser/ts/test-class-constructor5-expected.txt @@ -1 +1 @@ -SyntaxError: Multiple constructor implementations are not allowed. [test-class-constructor5.ts:3:5] +SyntaxError: Multiple constructor implementations are not allowed. [test-class-constructor5.ts:19:5] diff --git a/es2panda/test/parser/ts/test-class-definition-expected.txt b/es2panda/test/parser/ts/test-class-definition-expected.txt index 5867877ee35ed26ed421bd0c144600cb967eaca6..a7a87e011ed4ca55cbc8264b4e1d296904bcebb6 100644 --- a/es2panda/test/parser/ts/test-class-definition-expected.txt +++ b/es2panda/test/parser/ts/test-class-definition-expected.txt @@ -10,11 +10,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -91,11 +91,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -109,11 +109,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 25 } } @@ -140,11 +140,11 @@ "argument": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 30 }, "end": { - "line": 2, + "line": 18, "column": 36 } } @@ -152,33 +152,33 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 28 }, "end": { - "line": 2, + "line": 18, "column": 38 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 38 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 38 } } @@ -187,11 +187,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 38 } } @@ -204,11 +204,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -232,33 +232,33 @@ "statements": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 23 }, "end": { - "line": 3, + "line": 19, "column": 26 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 20 }, "end": { - "line": 3, + "line": 19, "column": 26 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 20 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -267,11 +267,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -283,11 +283,11 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 30 }, "end": { - "line": 4, + "line": 20, "column": 31 } } @@ -300,11 +300,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 31 } } @@ -313,14 +313,14 @@ "type": "ClassProperty", "key": { "type": "StringLiteral", - "value": "", + "value": "b", "loc": { "start": { - "line": 5, + "line": 21, "column": 30 }, "end": { - "line": 5, + "line": 21, "column": 33 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 33 } } @@ -349,11 +349,11 @@ "value": 67, "loc": { "start": { - "line": 6, + "line": 22, "column": 29 }, "end": { - "line": 6, + "line": 22, "column": 31 } } @@ -366,11 +366,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 31 } } @@ -383,11 +383,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 29 }, "end": { - "line": 7, + "line": 23, "column": 30 } } @@ -400,11 +400,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 30 } } @@ -417,11 +417,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 12 } } @@ -434,11 +434,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 12 } } @@ -450,11 +450,11 @@ "value": 1, "loc": { "start": { - "line": 9, + "line": 25, "column": 17 }, "end": { - "line": 9, + "line": 25, "column": 18 } } @@ -478,33 +478,33 @@ "statements": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 22 }, "end": { - "line": 9, + "line": 25, "column": 25 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 19 }, "end": { - "line": 9, + "line": 25, "column": 25 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 19 }, "end": { - "line": 9, + "line": 25, "column": 25 } } @@ -513,11 +513,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 25 } } @@ -530,25 +530,25 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 19 }, "end": { - "line": 10, + "line": 26, "column": 20 } } }, "value": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 10, + "line": 26, "column": 23 }, "end": { - "line": 10, + "line": 26, "column": 28 } } @@ -562,11 +562,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 28 } } @@ -581,11 +581,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 6 }, "end": { - "line": 11, + "line": 27, "column": 7 } } @@ -595,22 +595,22 @@ "value": 4, "loc": { "start": { - "line": 11, + "line": 27, "column": 10 }, "end": { - "line": 11, + "line": 27, "column": 11 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 7 } } @@ -620,11 +620,11 @@ "value": 4, "loc": { "start": { - "line": 11, + "line": 27, "column": 10 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -637,11 +637,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -654,11 +654,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 9 }, "end": { - "line": 12, + "line": 28, "column": 10 } } @@ -683,11 +683,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 14 }, "end": { - "line": 12, + "line": 28, "column": 20 } } @@ -695,11 +695,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 11 }, "end": { - "line": 12, + "line": 28, "column": 12 } } @@ -710,33 +710,33 @@ "statements": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 22 }, "end": { - "line": 12, + "line": 28, "column": 25 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 10 }, "end": { - "line": 12, + "line": 28, "column": 25 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 10 }, "end": { - "line": 12, + "line": 28, "column": 25 } } @@ -745,11 +745,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 25 } } @@ -762,11 +762,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 16 }, "end": { - "line": 13, + "line": 29, "column": 17 } } @@ -795,22 +795,22 @@ "value": 2, "loc": { "start": { - "line": 13, + "line": 29, "column": 29 }, "end": { - "line": 13, + "line": 29, "column": 30 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 22 }, "end": { - "line": 13, + "line": 29, "column": 30 } } @@ -818,33 +818,33 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 20 }, "end": { - "line": 13, + "line": 29, "column": 32 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 32 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 32 } } @@ -853,11 +853,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 32 } } @@ -870,11 +870,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 16 }, "end": { - "line": 14, + "line": 30, "column": 17 } } @@ -903,22 +903,22 @@ "value": 2, "loc": { "start": { - "line": 14, + "line": 30, "column": 29 }, "end": { - "line": 14, + "line": 30, "column": 30 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 22 }, "end": { - "line": 14, + "line": 30, "column": 30 } } @@ -926,33 +926,33 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 20 }, "end": { - "line": 14, + "line": 30, "column": 32 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 17 }, "end": { - "line": 14, + "line": 30, "column": 32 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 17 }, "end": { - "line": 14, + "line": 30, "column": 32 } } @@ -961,11 +961,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 32 } } @@ -978,11 +978,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 19 }, "end": { - "line": 15, + "line": 31, "column": 20 } } @@ -1008,11 +1008,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 24 }, "end": { - "line": 15, + "line": 31, "column": 30 } } @@ -1020,11 +1020,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 21 }, "end": { - "line": 15, + "line": 31, "column": 22 } } @@ -1035,33 +1035,33 @@ "statements": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 32 }, "end": { - "line": 15, + "line": 31, "column": 35 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 20 }, "end": { - "line": 15, + "line": 31, "column": 35 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 20 }, "end": { - "line": 15, + "line": 31, "column": 35 } } @@ -1070,11 +1070,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 35 } } @@ -1083,11 +1083,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -1095,11 +1095,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -1113,11 +1113,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 7 }, "end": { - "line": 18, + "line": 34, "column": 10 } } @@ -1194,11 +1194,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 66 } } @@ -1212,11 +1212,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 13 }, "end": { - "line": 18, + "line": 34, "column": 14 } } @@ -1229,11 +1229,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 13 }, "end": { - "line": 18, + "line": 34, "column": 14 } } @@ -1246,11 +1246,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 16 }, "end": { - "line": 18, + "line": 34, "column": 17 } } @@ -1273,33 +1273,33 @@ "statements": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 20 }, "end": { - "line": 18, + "line": 34, "column": 23 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 17 }, "end": { - "line": 18, + "line": 34, "column": 23 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 17 }, "end": { - "line": 18, + "line": 34, "column": 23 } } @@ -1308,11 +1308,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 16 }, "end": { - "line": 18, + "line": 34, "column": 23 } } @@ -1325,11 +1325,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 24 }, "end": { - "line": 18, + "line": 34, "column": 25 } } @@ -1342,11 +1342,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 24 }, "end": { - "line": 18, + "line": 34, "column": 25 } } @@ -1359,11 +1359,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 27 }, "end": { - "line": 18, + "line": 34, "column": 30 } } @@ -1376,11 +1376,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 27 }, "end": { - "line": 18, + "line": 34, "column": 30 } } @@ -1393,11 +1393,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 32 }, "end": { - "line": 18, + "line": 34, "column": 35 } } @@ -1410,11 +1410,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 32 }, "end": { - "line": 18, + "line": 34, "column": 35 } } @@ -1427,11 +1427,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 37 }, "end": { - "line": 18, + "line": 34, "column": 42 } } @@ -1444,11 +1444,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 37 }, "end": { - "line": 18, + "line": 34, "column": 42 } } @@ -1461,11 +1461,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 44 }, "end": { - "line": 18, + "line": 34, "column": 52 } } @@ -1478,11 +1478,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 44 }, "end": { - "line": 18, + "line": 34, "column": 52 } } @@ -1495,11 +1495,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 54 }, "end": { - "line": 18, + "line": 34, "column": 55 } } @@ -1513,11 +1513,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 18, + "line": 34, "column": 58 }, "end": { - "line": 18, + "line": 34, "column": 64 } } @@ -1526,11 +1526,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 54 }, "end": { - "line": 18, + "line": 34, "column": 55 } } @@ -1539,11 +1539,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 11 }, "end": { - "line": 18, + "line": 34, "column": 66 } } @@ -1551,11 +1551,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 66 } } @@ -1569,11 +1569,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 7 }, "end": { - "line": 20, + "line": 36, "column": 10 } } @@ -1588,11 +1588,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 5 }, "end": { - "line": 22, + "line": 38, "column": 16 } } @@ -1617,11 +1617,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 23 }, "end": { - "line": 22, + "line": 38, "column": 29 } } @@ -1629,11 +1629,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 17 }, "end": { - "line": 22, + "line": 38, "column": 21 } } @@ -1653,11 +1653,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 23, + "line": 39, "column": 9 }, "end": { - "line": 23, + "line": 39, "column": 13 } } @@ -1670,22 +1670,22 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 15 }, "end": { - "line": 23, + "line": 39, "column": 19 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 14 }, "end": { - "line": 23, + "line": 39, "column": 19 } } @@ -1694,11 +1694,11 @@ "optional": false, "loc": { "start": { - "line": 23, + "line": 39, "column": 9 }, "end": { - "line": 23, + "line": 39, "column": 19 } } @@ -1709,33 +1709,33 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 22 }, "end": { - "line": 23, + "line": 39, "column": 26 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 9 }, "end": { - "line": 23, + "line": 39, "column": 26 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 9 }, "end": { - "line": 23, + "line": 39, "column": 27 } } @@ -1743,33 +1743,33 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 31 }, "end": { - "line": 24, + "line": 40, "column": 6 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 16 }, "end": { - "line": 24, + "line": 40, "column": 6 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 16 }, "end": { - "line": 24, + "line": 40, "column": 6 } } @@ -1778,11 +1778,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 5 }, "end": { - "line": 24, + "line": 40, "column": 6 } } @@ -1798,11 +1798,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 6 }, "end": { - "line": 21, + "line": 37, "column": 10 } } @@ -1811,22 +1811,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 12 }, "end": { - "line": 21, + "line": 37, "column": 18 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 10 } } @@ -1840,11 +1840,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 12 }, "end": { - "line": 21, + "line": 37, "column": 18 } } @@ -1852,11 +1852,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 10 } } @@ -1869,11 +1869,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 8 } } @@ -1902,11 +1902,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 25, + "line": 41, "column": 20 }, "end": { - "line": 25, + "line": 41, "column": 24 } } @@ -1919,22 +1919,22 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 26 }, "end": { - "line": 25, + "line": 41, "column": 30 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 25 }, "end": { - "line": 25, + "line": 41, "column": 30 } } @@ -1943,22 +1943,22 @@ "optional": false, "loc": { "start": { - "line": 25, + "line": 41, "column": 20 }, "end": { - "line": 25, + "line": 41, "column": 30 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 13 }, "end": { - "line": 25, + "line": 41, "column": 30 } } @@ -1966,33 +1966,33 @@ ], "loc": { "start": { - "line": 25, + "line": 41, "column": 11 }, "end": { - "line": 25, + "line": 41, "column": 32 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 8 }, "end": { - "line": 25, + "line": 41, "column": 32 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 8 }, "end": { - "line": 25, + "line": 41, "column": 32 } } @@ -2001,11 +2001,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 32 } } @@ -2014,11 +2014,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 11 }, "end": { - "line": 26, + "line": 42, "column": 2 } } @@ -2026,11 +2026,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 2 } } @@ -2044,11 +2044,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 16 }, "end": { - "line": 28, + "line": 44, "column": 20 } } @@ -2125,11 +2125,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 10 }, "end": { - "line": 31, + "line": 47, "column": 2 } } @@ -2143,11 +2143,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 14 }, "end": { - "line": 29, + "line": 45, "column": 15 } } @@ -2167,22 +2167,22 @@ "params": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 15 }, "end": { - "line": 29, + "line": 45, "column": 18 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 15 }, "end": { - "line": 29, + "line": 45, "column": 18 } } @@ -2191,11 +2191,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 18 } } @@ -2208,11 +2208,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 5 }, "end": { - "line": 30, + "line": 46, "column": 7 } } @@ -2235,112 +2235,46 @@ "statements": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 10 }, "end": { - "line": 30, + "line": 46, "column": 13 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 7 }, "end": { - "line": 30, + "line": 46, "column": 13 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 7 }, "end": { - "line": 30, + "line": 46, "column": 13 } } }, - "overloads": [ - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 29, - "column": 14 - }, - "end": { - "line": 29, - "column": 15 - } - } - }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 18 - } - } - }, - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 18 - } - } - }, - "overloads": [], - "decorators": [], - "loc": { - "start": { - "line": 29, - "column": 5 - }, - "end": { - "line": 29, - "column": 18 - } - } - } - ], + "overloads": [], "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 5 }, "end": { - "line": 30, + "line": 46, "column": 13 } } @@ -2349,11 +2283,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 21 }, "end": { - "line": 31, + "line": 47, "column": 2 } } @@ -2361,11 +2295,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 10 }, "end": { - "line": 31, + "line": 47, "column": 2 } } @@ -2377,7 +2311,7 @@ "column": 1 }, "end": { - "line": 32, + "line": 48, "column": 1 } } diff --git a/es2panda/test/parser/ts/test-class-definiton1-expected.txt b/es2panda/test/parser/ts/test-class-definiton1-expected.txt index 26faf8ae33e84674a240c4f461ce21a748d11a80..6b7c48ef816b2b676331e2d8d02a623b8558d3f4 100644 --- a/es2panda/test/parser/ts/test-class-definiton1-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton1-expected.txt @@ -1 +1 @@ -SyntaxError: Static modifier can not appear on a constructor [test-class-definiton1.ts:2:12] +SyntaxError: Static modifier can not appear on a constructor [test-class-definiton1.ts:18:12] diff --git a/es2panda/test/parser/ts/test-class-definiton10-expected.txt b/es2panda/test/parser/ts/test-class-definiton10-expected.txt index 27d0e3d1082197a3b36a5f91230831feb7afdf00..7a36430e0238c98e3e3a0da961df7874564cf13d 100644 --- a/es2panda/test/parser/ts/test-class-definiton10-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton10-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected. [test-class-definiton10.ts:2:63] +SyntaxError: ';' expected. [test-class-definiton10.ts:18:63] diff --git a/es2panda/test/parser/ts/test-class-definiton11-expected.txt b/es2panda/test/parser/ts/test-class-definiton11-expected.txt index ac5c9b5ab05dd2a3515928317465e3b453338ac3..e78e6c73fb2db78d57b5711b187700749c574ade 100644 --- a/es2panda/test/parser/ts/test-class-definiton11-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton11-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected. [test-class-definiton11.ts:2:11] +SyntaxError: ';' expected. [test-class-definiton11.ts:18:11] diff --git a/es2panda/test/parser/ts/test-class-definiton12-expected.txt b/es2panda/test/parser/ts/test-class-definiton12-expected.txt index 8a3cabafd81734f06893cb35dad12170f6bf8ed2..a2f20fffec50b54947b78a569b9751848f9704e2 100644 --- a/es2panda/test/parser/ts/test-class-definiton12-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton12-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected. [test-class-definiton12.ts:2:9] +SyntaxError: ';' expected. [test-class-definiton12.ts:18:9] diff --git a/es2panda/test/parser/ts/test-class-definiton13-expected.txt b/es2panda/test/parser/ts/test-class-definiton13-expected.txt index 896dd0871b7d1c770e7b70c39e7ba0844f69a103..23566b5f09beed4247a773cbea9bab621fd75a92 100644 --- a/es2panda/test/parser/ts/test-class-definiton13-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton13-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected. [test-class-definiton13.ts:2:9] +SyntaxError: ';' expected. [test-class-definiton13.ts:18:9] diff --git a/es2panda/test/parser/ts/test-class-definiton14-expected.txt b/es2panda/test/parser/ts/test-class-definiton14-expected.txt index 7bd6f06568ffb68e648284066f737d49d5070450..ca26645bdfc6aa1b7312dc8db9e31c49e00c183d 100644 --- a/es2panda/test/parser/ts/test-class-definiton14-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton14-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected. [test-class-definiton14.ts:2:14] +SyntaxError: ';' expected. [test-class-definiton14.ts:18:14] diff --git a/es2panda/test/parser/ts/test-class-definiton15-expected.txt b/es2panda/test/parser/ts/test-class-definiton15-expected.txt index b5b7039a81257d7e6555c07407c1e97090ab7372..517f45dd6b45ee69cdce7beb735ecaacbd923502 100644 --- a/es2panda/test/parser/ts/test-class-definiton15-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton15-expected.txt @@ -1 +1 @@ -SyntaxError: A get accessor must be at least as accessible as the setter [test-class-definiton15.ts:2:9] +SyntaxError: A get accessor must be at least as accessible as the setter [test-class-definiton15.ts:18:9] diff --git a/es2panda/test/parser/ts/test-class-definiton16-expected.txt b/es2panda/test/parser/ts/test-class-definiton16-expected.txt index 47837ca26d8e82a91d86d80f91f810b768deb648..66c641cdedd58e34371beef4d7973edde23a9762 100644 --- a/es2panda/test/parser/ts/test-class-definiton16-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton16-expected.txt @@ -1 +1 @@ -SyntaxError: A get accessor must be at least as accessible as the setter [test-class-definiton16.ts:2:17] +SyntaxError: A get accessor must be at least as accessible as the setter [test-class-definiton16.ts:18:17] diff --git a/es2panda/test/parser/ts/test-class-definiton17-expected.txt b/es2panda/test/parser/ts/test-class-definiton17-expected.txt index e0e67d58f4b013aa221cfa4996712f71f4d2a5b0..df07463839a17bf82c966f68f28861a792009a02 100644 --- a/es2panda/test/parser/ts/test-class-definiton17-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton17-expected.txt @@ -1 +1 @@ -SyntaxError: Abstract methods can only appear within an abstract class. [test-class-definiton17.ts:2:14] +SyntaxError: Abstract methods can only appear within an abstract class. [test-class-definiton17.ts:18:14] diff --git a/es2panda/test/parser/ts/test-class-definiton18-expected.txt b/es2panda/test/parser/ts/test-class-definiton18-expected.txt index e8ff92e4a20b068be031bb1e5daca583cc4398c4..a34fa1f1ed16e7148128d858288c7c2ce3c676af 100644 --- a/es2panda/test/parser/ts/test-class-definiton18-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton18-expected.txt @@ -1 +1,270 @@ -SyntaxError: Overload signatures must all be abstract or non-abstract. [test-class-definiton18.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 19, + "column": 15 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 15 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 18 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-definiton2-expected.txt b/es2panda/test/parser/ts/test-class-definiton2-expected.txt index 09f2fdad910a32e7c67e5b8101b5867801c13557..a533431cfa496c07614158bba0bf0795add1b6be 100644 --- a/es2panda/test/parser/ts/test-class-definiton2-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton2-expected.txt @@ -1 +1 @@ -SyntaxError: Class method can not be declare nor readonly [test-class-definiton2.ts:2:25] +SyntaxError: Class method can not be declare nor readonly [test-class-definiton2.ts:18:25] diff --git a/es2panda/test/parser/ts/test-class-definiton3-expected.txt b/es2panda/test/parser/ts/test-class-definiton3-expected.txt index 45b732733138ccc7638ca1eb1d574cda2366cffa..a67927c10ab55cd80be634a25c1929348a17d7e3 100644 --- a/es2panda/test/parser/ts/test-class-definiton3-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton3-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected modifier [test-class-definiton3.ts:2:12] +SyntaxError: Unexpected modifier [test-class-definiton3.ts:18:12] diff --git a/es2panda/test/parser/ts/test-class-definiton4-expected.txt b/es2panda/test/parser/ts/test-class-definiton4-expected.txt index 45ffef742b0ebef4ec27547d8043d943b8f69c4a..7b9e59d5fad005acc4fd4606732ed7c2bc5b437d 100644 --- a/es2panda/test/parser/ts/test-class-definiton4-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton4-expected.txt @@ -1 +1 @@ -SyntaxError: Expected '(' [test-class-definiton4.ts:2:7] +SyntaxError: Expected '(' [test-class-definiton4.ts:18:7] diff --git a/es2panda/test/parser/ts/test-class-definiton5-expected.txt b/es2panda/test/parser/ts/test-class-definiton5-expected.txt index fc73a03ed431f78bc88b457a1b6a0f6154dcf19d..8c98e1d6ee544076940ae2b5ed9f162cf08358e6 100644 --- a/es2panda/test/parser/ts/test-class-definiton5-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton5-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected modifier [test-class-definiton5.ts:2:14] +SyntaxError: Unexpected modifier [test-class-definiton5.ts:18:14] diff --git a/es2panda/test/parser/ts/test-class-definiton6-expected.txt b/es2panda/test/parser/ts/test-class-definiton6-expected.txt index 7ee601b73ef62afa1dbd59d08868e8dc1a6307d0..034d9f2c0053f24d7029fe4e6676f436ec2ed611 100644 --- a/es2panda/test/parser/ts/test-class-definiton6-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton6-expected.txt @@ -1 +1 @@ -SyntaxError: A get accessor must be at least as accessible as the setter [test-class-definiton6.ts:2:17] +SyntaxError: A get accessor must be at least as accessible as the setter [test-class-definiton6.ts:18:17] diff --git a/es2panda/test/parser/ts/test-class-definiton7-expected.txt b/es2panda/test/parser/ts/test-class-definiton7-expected.txt index 175fbd40c47a0fd82f62ceb5e0e44b67989d0a88..c8d46ec2ea9481033685551b6642fd10b70637a0 100644 --- a/es2panda/test/parser/ts/test-class-definiton7-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton7-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected modifier on private identifier [test-class-definiton7.ts:2:12] +SyntaxError: Unexpected modifier on private identifier [test-class-definiton7.ts:18:12] diff --git a/es2panda/test/parser/ts/test-class-definiton8-expected.txt b/es2panda/test/parser/ts/test-class-definiton8-expected.txt index 3024cb4dccb42a798349143d694fb797f8191f92..c28a931252d070755c817ee4adf67129f3dd2d7d 100644 --- a/es2panda/test/parser/ts/test-class-definiton8-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton8-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected. [test-class-definiton8.ts:2:9] +SyntaxError: ';' expected. [test-class-definiton8.ts:18:9] diff --git a/es2panda/test/parser/ts/test-class-definiton9-expected.txt b/es2panda/test/parser/ts/test-class-definiton9-expected.txt index 1c2d06678cadd3ecafbdeaaf87c72af8e8420fd9..eba0ef841cd1d9abf2224e0f0373a94c005848ae 100644 --- a/es2panda/test/parser/ts/test-class-definiton9-expected.txt +++ b/es2panda/test/parser/ts/test-class-definiton9-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected. [test-class-definiton9.ts:2:7] +SyntaxError: ';' expected. [test-class-definiton9.ts:18:7] diff --git a/es2panda/test/parser/ts/test-class-method-overload-expected.txt b/es2panda/test/parser/ts/test-class-method-overload-expected.txt index c2a73a78a9b6a6667461dfe4beff7ed11a4590f1..3532cebfecf25283f9cd97fdc8b769de69e4d839 100644 --- a/es2panda/test/parser/ts/test-class-method-overload-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload-expected.txt @@ -10,11 +10,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -29,12 +29,12 @@ "decorators": [], "loc": { "start": { - "line": 1, - "column": 1 + "line": 18, + "column": 5 }, "end": { - "line": 1, - "column": 1 + "line": 18, + "column": 16 } } }, @@ -50,213 +50,68 @@ "generator": false, "async": false, "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "statements": [], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 1 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 1 - } - } - }, - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 1 - } - } - }, - "overloads": [ - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "constructor", - "decorators": [], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "kind": "constructor", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "overloads": [], - "decorators": [], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "constructor", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "kind": "constructor", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 26 - } - } + "params": [ + { + "type": "Identifier", + "name": "a", + "typeAnnotation": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 18, + "column": 20 }, - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 18 - } + "end": { + "line": 18, + "column": 26 } } - ], + }, + "decorators": [], "loc": { "start": { - "line": 3, - "column": 16 + "line": 18, + "column": 17 }, "end": { - "line": 3, - "column": 28 + "line": 18, + "column": 18 } } - }, - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 28 - } } - }, - "overloads": [], - "decorators": [], + ], "loc": { "start": { - "line": 3, - "column": 5 + "line": 18, + "column": 16 }, "end": { - "line": 3, + "line": 18, "column": 28 } } + }, + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 28 + } } - ], + }, + "overloads": [], "decorators": [], "loc": { "start": { - "line": 1, - "column": 1 + "line": 18, + "column": 5 }, "end": { - "line": 1, - "column": 1 + "line": 18, + "column": 28 } } }, @@ -269,11 +124,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 19, "column": 5 }, "end": { - "line": 4, + "line": 19, "column": 6 } } @@ -293,22 +148,22 @@ "params": [], "loc": { "start": { - "line": 4, + "line": 19, "column": 6 }, "end": { - "line": 4, + "line": 19, "column": 9 } } }, "loc": { "start": { - "line": 4, + "line": 19, "column": 6 }, "end": { - "line": 4, + "line": 19, "column": 9 } } @@ -317,11 +172,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 19, "column": 5 }, "end": { - "line": 4, + "line": 19, "column": 9 } } @@ -334,11 +189,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 20, "column": 5 }, "end": { - "line": 5, + "line": 20, "column": 6 } } @@ -358,22 +213,22 @@ "params": [], "loc": { "start": { - "line": 5, + "line": 20, "column": 6 }, "end": { - "line": 5, + "line": 20, "column": 9 } } }, "loc": { "start": { - "line": 5, + "line": 20, "column": 6 }, "end": { - "line": 5, + "line": 20, "column": 9 } } @@ -382,11 +237,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 20, "column": 5 }, "end": { - "line": 5, + "line": 20, "column": 9 } } @@ -399,11 +254,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 21, "column": 5 }, "end": { - "line": 6, + "line": 21, "column": 6 } } @@ -423,22 +278,22 @@ "params": [], "loc": { "start": { - "line": 6, + "line": 21, "column": 6 }, "end": { - "line": 6, + "line": 21, "column": 9 } } }, "loc": { "start": { - "line": 6, + "line": 21, "column": 6 }, "end": { - "line": 6, + "line": 21, "column": 9 } } @@ -447,11 +302,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 21, "column": 5 }, "end": { - "line": 6, + "line": 21, "column": 9 } } @@ -460,11 +315,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 7, + "line": 22, "column": 2 } } @@ -472,11 +327,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 7, + "line": 22, "column": 2 } } @@ -490,11 +345,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 24, "column": 7 }, "end": { - "line": 9, + "line": 24, "column": 13 } } @@ -571,11 +426,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 24, "column": 1 }, "end": { - "line": 29, + "line": 44, "column": 2 } } @@ -589,11 +444,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 25, "column": 5 }, "end": { - "line": 10, + "line": 25, "column": 6 } } @@ -607,11 +462,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 10, + "line": 25, "column": 8 }, "end": { - "line": 10, + "line": 25, "column": 14 } } @@ -619,11 +474,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 25, "column": 5 }, "end": { - "line": 10, + "line": 25, "column": 6 } } @@ -636,11 +491,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 26, "column": 5 }, "end": { - "line": 11, + "line": 26, "column": 6 } } @@ -654,11 +509,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 26, "column": 8 }, "end": { - "line": 11, + "line": 26, "column": 14 } } @@ -666,11 +521,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 26, "column": 5 }, "end": { - "line": 11, + "line": 26, "column": 6 } } @@ -683,12 +538,76 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 27, "column": 5 }, "end": { - "line": 16, + "line": 27, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 27, + "column": 6 + }, + "end": { + "line": 27, + "column": 9 + } + } + }, + "loc": { + "start": { + "line": 27, "column": 6 + }, + "end": { + "line": 27, + "column": 9 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 9 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "a", + "loc": { + "start": { + "line": 28, + "column": 5 + }, + "end": { + "line": 28, + "column": 8 } } }, @@ -712,41 +631,12 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "optional": true, - "decorators": [], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 8 - } - } - }, - { - "type": "Identifier", - "name": "n", - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 16, - "column": 23 + "line": 28, + "column": 13 }, "end": { - "line": 16, - "column": 29 + "line": 28, + "column": 19 } } }, @@ -754,50 +644,303 @@ "decorators": [], "loc": { "start": { - "line": 16, - "column": 19 + "line": 28, + "column": 9 }, "end": { - "line": 16, - "column": 20 + "line": 28, + "column": 10 } } } ], - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "operator": "=", - "left": { - "type": "MemberExpression", - "object": { - "type": "ThisExpression", - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 17, - "column": 13 - } - } - }, - "property": { - "type": "Identifier", - "name": "s", - "decorators": [], - "loc": { - "start": { - "line": 17, + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 21 + } + } + }, + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 21 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 28, + "column": 5 + }, + "end": { + "line": 28, + "column": 21 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "a", + "loc": { + "start": { + "line": 29, + "column": 5 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 29, + "column": 5 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 30, + "column": 5 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 30, + "column": 6 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "loc": { + "start": { + "line": 30, + "column": 6 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 30, + "column": 5 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 31, + "column": 5 + }, + "end": { + "line": 31, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "name": "s", + "typeAnnotation": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 31, + "column": 11 + }, + "end": { + "line": 31, + "column": 17 + } + } + }, + "optional": true, + "decorators": [], + "loc": { + "start": { + "line": 31, + "column": 7 + }, + "end": { + "line": 31, + "column": 8 + } + } + }, + { + "type": "Identifier", + "name": "n", + "typeAnnotation": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 31, + "column": 23 + }, + "end": { + "line": 31, + "column": 29 + } + } + }, + "optional": true, + "decorators": [], + "loc": { + "start": { + "line": 31, + "column": 19 + }, + "end": { + "line": 31, + "column": 20 + } + } + } + ], + "body": { + "type": "BlockStatement", + "statements": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "operator": "=", + "left": { + "type": "MemberExpression", + "object": { + "type": "ThisExpression", + "loc": { + "start": { + "line": 32, + "column": 9 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + "property": { + "type": "Identifier", + "name": "s", + "decorators": [], + "loc": { + "start": { + "line": 32, "column": 14 }, "end": { - "line": 17, + "line": 32, "column": 15 } } @@ -806,11 +949,11 @@ "optional": false, "loc": { "start": { - "line": 17, + "line": 32, "column": 9 }, "end": { - "line": 17, + "line": 32, "column": 15 } } @@ -824,11 +967,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 32, "column": 18 }, "end": { - "line": 17, + "line": 32, "column": 19 } } @@ -838,44 +981,44 @@ "value": "", "loc": { "start": { - "line": 17, + "line": 32, "column": 23 }, "end": { - "line": 17, + "line": 32, "column": 25 } } }, "loc": { "start": { - "line": 17, + "line": 32, "column": 18 }, "end": { - "line": 17, + "line": 32, "column": 25 } } }, "loc": { "start": { - "line": 17, + "line": 32, "column": 9 }, "end": { - "line": 17, + "line": 32, "column": 25 } } }, "loc": { "start": { - "line": 17, + "line": 32, "column": 9 }, "end": { - "line": 17, + "line": 32, "column": 26 } } @@ -891,11 +1034,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 18, + "line": 33, "column": 9 }, "end": { - "line": 18, + "line": 33, "column": 13 } } @@ -906,11 +1049,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 33, "column": 14 }, "end": { - "line": 18, + "line": 33, "column": 15 } } @@ -919,11 +1062,11 @@ "optional": false, "loc": { "start": { - "line": 18, + "line": 33, "column": 9 }, "end": { - "line": 18, + "line": 33, "column": 15 } } @@ -937,11 +1080,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 33, "column": 18 }, "end": { - "line": 18, + "line": 33, "column": 19 } } @@ -951,44 +1094,44 @@ "value": 0, "loc": { "start": { - "line": 18, + "line": 33, "column": 23 }, "end": { - "line": 18, + "line": 33, "column": 24 } } }, "loc": { "start": { - "line": 18, + "line": 33, "column": 18 }, "end": { - "line": 18, + "line": 33, "column": 24 } } }, "loc": { "start": { - "line": 18, + "line": 33, "column": 9 }, "end": { - "line": 18, + "line": 33, "column": 24 } } }, "loc": { "start": { - "line": 18, + "line": 33, "column": 9 }, "end": { - "line": 18, + "line": 33, "column": 25 } } @@ -1003,11 +1146,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 19, + "line": 34, "column": 9 }, "end": { - "line": 19, + "line": 34, "column": 13 } } @@ -1018,11 +1161,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 34, "column": 14 }, "end": { - "line": 19, + "line": 34, "column": 15 } } @@ -1031,11 +1174,11 @@ "optional": false, "loc": { "start": { - "line": 19, + "line": 34, "column": 9 }, "end": { - "line": 19, + "line": 34, "column": 15 } } @@ -1044,22 +1187,22 @@ "optional": false, "loc": { "start": { - "line": 19, + "line": 34, "column": 9 }, "end": { - "line": 19, + "line": 34, "column": 17 } } }, "loc": { "start": { - "line": 19, + "line": 34, "column": 9 }, "end": { - "line": 19, + "line": 34, "column": 18 } } @@ -1067,336 +1210,175 @@ ], "loc": { "start": { - "line": 16, + "line": 31, "column": 31 }, "end": { - "line": 20, + "line": 35, "column": 6 } } }, "loc": { "start": { - "line": 16, + "line": 31, "column": 6 }, "end": { - "line": 20, + "line": 35, "column": 6 } } }, "loc": { "start": { - "line": 16, + "line": 31, "column": 6 }, "end": { - "line": 20, + "line": 35, "column": 6 } } }, - "overloads": [ - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 6 - } - } - }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "overloads": [], - "decorators": [], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 9 - } - } + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 31, + "column": 5 }, - { - "type": "MethodDefinition", - "key": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "s", - "typeAnnotation": { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "optional": true, - "decorators": [], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - } - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 21 - } - } + "end": { + "line": 35, + "column": 6 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "1", + "loc": { + "start": { + "line": 36, + "column": 5 }, - "overloads": [], - "decorators": [], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 21 - } + "end": { + "line": 36, + "column": 8 } - }, - { - "type": "MethodDefinition", - "key": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 11 - } - } - }, - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 11 - } - } - }, - "overloads": [], - "decorators": [], + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], "loc": { "start": { - "line": 14, - "column": 5 + "line": 36, + "column": 8 }, "end": { - "line": 14, + "line": 36, "column": 11 } } }, - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 6 - } - } + "loc": { + "start": { + "line": 36, + "column": 8 }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 9 - } - } + "end": { + "line": 36, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 36, + "column": 5 + }, + "end": { + "line": 36, + "column": 11 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "NumberLiteral", + "value": 1, + "loc": { + "start": { + "line": 37, + "column": 5 }, - "overloads": [], - "decorators": [], + "end": { + "line": 37, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], "loc": { "start": { - "line": 15, - "column": 5 + "line": 37, + "column": 6 }, "end": { - "line": 15, + "line": 37, "column": 9 } } + }, + "loc": { + "start": { + "line": 37, + "column": 6 + }, + "end": { + "line": 37, + "column": 9 + } } - ], + }, + "overloads": [], "decorators": [], "loc": { "start": { - "line": 16, + "line": 37, "column": 5 }, "end": { - "line": 20, - "column": 6 + "line": 37, + "column": 9 } } }, @@ -1407,11 +1389,11 @@ "value": 1, "loc": { "start": { - "line": 25, + "line": 38, "column": 5 }, "end": { - "line": 25, + "line": 38, "column": 6 } } @@ -1429,308 +1411,179 @@ "async": false, "expression": false, "params": [], - "body": { - "type": "BlockStatement", - "statements": [], - "loc": { - "start": { - "line": 25, - "column": 9 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, "loc": { "start": { - "line": 25, + "line": 38, "column": 6 }, "end": { - "line": 25, - "column": 12 + "line": 38, + "column": 9 } } }, "loc": { "start": { - "line": 25, + "line": 38, "column": 6 }, "end": { - "line": 25, - "column": 12 + "line": 38, + "column": 9 } } }, - "overloads": [ - { - "type": "MethodDefinition", - "key": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 21, - "column": 5 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 21, - "column": 8 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "loc": { - "start": { - "line": 21, - "column": 8 - }, - "end": { - "line": 21, - "column": 11 - } - } + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 38, + "column": 5 + }, + "end": { + "line": 38, + "column": 9 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "1", + "loc": { + "start": { + "line": 39, + "column": 5 }, - "overloads": [], - "decorators": [], + "end": { + "line": 39, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], "loc": { "start": { - "line": 21, - "column": 5 + "line": 39, + "column": 8 }, "end": { - "line": 21, + "line": 39, "column": 11 } } }, - { - "type": "MethodDefinition", - "key": { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 22, - "column": 5 - }, - "end": { - "line": 22, - "column": 6 - } - } - }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 22, - "column": 6 - }, - "end": { - "line": 22, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 22, - "column": 6 - }, - "end": { - "line": 22, - "column": 9 - } - } + "loc": { + "start": { + "line": 39, + "column": 8 }, - "overloads": [], - "decorators": [], - "loc": { - "start": { - "line": 22, - "column": 5 - }, - "end": { - "line": 22, - "column": 9 - } + "end": { + "line": 39, + "column": 11 } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 39, + "column": 5 }, - { - "type": "MethodDefinition", - "key": { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 6 - } - } + "end": { + "line": 39, + "column": 11 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "NumberLiteral", + "value": 1, + "loc": { + "start": { + "line": 40, + "column": 5 }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 9 - } - } - }, + "end": { + "line": 40, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], "loc": { "start": { - "line": 23, - "column": 6 + "line": 40, + "column": 9 }, "end": { - "line": 23, - "column": 9 + "line": 40, + "column": 12 } } }, - "overloads": [], - "decorators": [], "loc": { "start": { - "line": 23, - "column": 5 + "line": 40, + "column": 6 }, "end": { - "line": 23, - "column": 9 + "line": 40, + "column": 12 } } }, - { - "type": "MethodDefinition", - "key": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 11 - } - } - }, - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 11 - } - } + "loc": { + "start": { + "line": 40, + "column": 6 }, - "overloads": [], - "decorators": [], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 11 - } + "end": { + "line": 40, + "column": 12 } } - ], + }, + "overloads": [], "decorators": [], "loc": { "start": { - "line": 25, + "line": 40, "column": 5 }, "end": { - "line": 25, + "line": 40, "column": 12 } } @@ -1743,11 +1596,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 41, "column": 5 }, "end": { - "line": 26, + "line": 41, "column": 6 } } @@ -1769,11 +1622,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 26, + "line": 41, "column": 10 }, "end": { - "line": 26, + "line": 41, "column": 14 } } @@ -1793,11 +1646,11 @@ "type": "ThisExpression", "loc": { "start": { - "line": 27, + "line": 42, "column": 9 }, "end": { - "line": 27, + "line": 42, "column": 13 } } @@ -1808,11 +1661,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 42, "column": 14 }, "end": { - "line": 27, + "line": 42, "column": 15 } } @@ -1821,33 +1674,33 @@ "optional": false, "loc": { "start": { - "line": 27, + "line": 42, "column": 9 }, "end": { - "line": 27, + "line": 42, "column": 15 } } }, "loc": { "start": { - "line": 27, + "line": 42, "column": 9 }, "end": { - "line": 27, + "line": 42, "column": 17 } } }, "loc": { "start": { - "line": 27, + "line": 42, "column": 9 }, "end": { - "line": 27, + "line": 42, "column": 18 } } @@ -1855,33 +1708,33 @@ ], "loc": { "start": { - "line": 26, + "line": 41, "column": 15 }, "end": { - "line": 28, + "line": 43, "column": 6 } } }, "loc": { "start": { - "line": 26, + "line": 41, "column": 6 }, "end": { - "line": 28, + "line": 43, "column": 6 } } }, "loc": { "start": { - "line": 26, + "line": 41, "column": 6 }, "end": { - "line": 28, + "line": 43, "column": 6 } } @@ -1890,11 +1743,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 41, "column": 5 }, "end": { - "line": 28, + "line": 43, "column": 6 } } @@ -1903,11 +1756,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 9, + "line": 24, "column": 14 }, "end": { - "line": 29, + "line": 44, "column": 2 } } @@ -1915,11 +1768,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 24, "column": 1 }, "end": { - "line": 29, + "line": 44, "column": 2 } } @@ -1931,8 +1784,8 @@ "column": 1 }, "end": { - "line": 29, - "column": 2 + "line": 45, + "column": 1 } } } diff --git a/es2panda/test/parser/ts/test-class-method-overload.ts b/es2panda/test/parser/ts/test-class-method-overload.ts index ce37508274d75d46be85c90bc218ab98031a1e2c..69f9ad7450fc55174926d4fdd38bad60f204fed2 100644 --- a/es2panda/test/parser/ts/test-class-method-overload.ts +++ b/es2panda/test/parser/ts/test-class-method-overload.ts @@ -15,7 +15,6 @@ declare class Class1 { - constructor(); constructor(a: number); a(); a(); @@ -42,4 +41,4 @@ class Class2 { f(): void { this.n++; }; -} \ No newline at end of file +} diff --git a/es2panda/test/parser/ts/test-class-method-overload1-expected.txt b/es2panda/test/parser/ts/test-class-method-overload1-expected.txt index 366aa66c3b349a8b09dac7a1c1ae28302be65bf2..d24322f11527c36bd671355a550b325b2d3062db 100644 --- a/es2panda/test/parser/ts/test-class-method-overload1-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload1-expected.txt @@ -1 +1,331 @@ -SyntaxError: Function implementation is missing or not immediately following the declaration. [test-class-method-overload1.ts:2:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "ClassProperty", + "key": { + "type": "Identifier", + "name": "baz", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "static": false, + "readonly": false, + "declare": false, + "optional": false, + "computed": false, + "typeAnnotation": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 16 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload10-expected.txt b/es2panda/test/parser/ts/test-class-method-overload10-expected.txt index 19e5bfedb56cfa256c95719ea82173e5f78d85e1..d13df6e546ef98ead38c207863682847d735ebe7 100644 --- a/es2panda/test/parser/ts/test-class-method-overload10-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload10-expected.txt @@ -1 +1,283 @@ -SyntaxError: Function implementation name must be 'bar'. [test-class-method-overload10.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "bar", + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "baz", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 14 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload11-expected.txt b/es2panda/test/parser/ts/test-class-method-overload11-expected.txt index 77e274b0757e959aa1fa8e7bbfa5052cfa2fd67c..e6191735d831170fb9378421780d197667383500 100644 --- a/es2panda/test/parser/ts/test-class-method-overload11-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload11-expected.txt @@ -1 +1,282 @@ -SyntaxError: Function implementation name must be 'bar'. [test-class-method-overload11.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "bar", + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "NumberLiteral", + "value": 1, + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 12 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload12-expected.txt b/es2panda/test/parser/ts/test-class-method-overload12-expected.txt index 13c09418b30589783774d10b86536f6246d2dac2..69e491538319d8002a7aee072a7ecd098561f9e3 100644 --- a/es2panda/test/parser/ts/test-class-method-overload12-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload12-expected.txt @@ -1 +1,282 @@ -SyntaxError: Function implementation name must be '1'. [test-class-method-overload12.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "NumberLiteral", + "value": 1, + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "2", + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 14 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload13-expected.txt b/es2panda/test/parser/ts/test-class-method-overload13-expected.txt index 840ac021a1492639929524347ff6993815ad4737..612ae602cf9dd45d7394bae0c7e2853aa2d6d479 100644 --- a/es2panda/test/parser/ts/test-class-method-overload13-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload13-expected.txt @@ -1 +1,282 @@ -SyntaxError: Function implementation name must be '1'. [test-class-method-overload13.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "NumberLiteral", + "value": 1, + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "NumberLiteral", + "value": 2, + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 12 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload2-expected.txt b/es2panda/test/parser/ts/test-class-method-overload2-expected.txt index 2588406317ed997da65481c7789464adc0b2fa68..9b9f5143ac0f3a9e6e9b2adbec7152e8e8cab0d8 100644 --- a/es2panda/test/parser/ts/test-class-method-overload2-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload2-expected.txt @@ -1 +1,396 @@ -SyntaxError: Function implementation is missing or not immediately following the declaration. [test-class-method-overload2.ts:5:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + { + "type": "ClassProperty", + "key": { + "type": "Identifier", + "name": "baz", + "decorators": [], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + "static": false, + "readonly": false, + "declare": false, + "optional": false, + "computed": false, + "typeAnnotation": { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 5 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 5 + }, + "end": { + "line": 21, + "column": 11 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload3-expected.txt b/es2panda/test/parser/ts/test-class-method-overload3-expected.txt index cbfdde3fd40fb1bd3bfe9ecdd4d2f6374e8d4cdf..281ce853322161d48fbebd6507355d9257f5ca50 100644 --- a/es2panda/test/parser/ts/test-class-method-overload3-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload3-expected.txt @@ -1 +1,349 @@ -SyntaxError: Overload signatures must all be optional or required. [test-class-method-overload3.ts:2:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": true, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 20, + "column": 12 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "loc": { + "start": { + "line": 20, + "column": 9 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "loc": { + "start": { + "line": 20, + "column": 9 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload4-expected.txt b/es2panda/test/parser/ts/test-class-method-overload4-expected.txt index f21dfe5e2c3f0a4f4dfde0bea6508229f6d144b4..b16e60f615e05a46c46751da5eb4cadeb5298e40 100644 --- a/es2panda/test/parser/ts/test-class-method-overload4-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload4-expected.txt @@ -1 +1,205 @@ -SyntaxError: Function implementation is missing or not immediately following the declaration. [test-class-method-overload4.ts:2:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload5-expected.txt b/es2panda/test/parser/ts/test-class-method-overload5-expected.txt index 65146bd02af2036ba4b4b092bde4afda728183f4..790cfd83b68207c07c90548339dc1e86eca7d674 100644 --- a/es2panda/test/parser/ts/test-class-method-overload5-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload5-expected.txt @@ -1 +1,298 @@ -SyntaxError: Duplicate function implementation. [test-class-method-overload5.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 14 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload6-expected.txt b/es2panda/test/parser/ts/test-class-method-overload6-expected.txt index bfd9aef8aeba7700533b2aade6e5f2a21661e989..bd70c17570651d573fe1f6156c3014daeca4fb66 100644 --- a/es2panda/test/parser/ts/test-class-method-overload6-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload6-expected.txt @@ -1 +1,377 @@ -SyntaxError: Duplicate function implementation. [test-class-method-overload6.ts:4:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "baz", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload7-expected.txt b/es2panda/test/parser/ts/test-class-method-overload7-expected.txt index 415ab886958d33a9044ca0dae26db8ca8d037236..43bebdc71ced279bf5a1faf5ca14895a8745fc02 100644 --- a/es2panda/test/parser/ts/test-class-method-overload7-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload7-expected.txt @@ -1 +1,284 @@ -SyntaxError: Function implementation name must be 'bar'. [test-class-method-overload7.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "baz", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 14 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload8-expected.txt b/es2panda/test/parser/ts/test-class-method-overload8-expected.txt index 9e283498fe5fa0f43ab1f65c299684fd1cf37b03..6e6b458396ac9c8eef8e1a86c58384665242e9bf 100644 --- a/es2panda/test/parser/ts/test-class-method-overload8-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload8-expected.txt @@ -1 +1,283 @@ -SyntaxError: Function implementation name must be 'bar'. [test-class-method-overload8.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "bar", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "baz", + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 13 + }, + "end": { + "line": 19, + "column": 16 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 16 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 16 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 16 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-class-method-overload9-expected.txt b/es2panda/test/parser/ts/test-class-method-overload9-expected.txt index ab32ea0a351263c4bd6c1057150a1b760f8146d4..71423aa5e824f0f8e75468247d82ddf4876adced 100644 --- a/es2panda/test/parser/ts/test-class-method-overload9-expected.txt +++ b/es2panda/test/parser/ts/test-class-method-overload9-expected.txt @@ -1 +1,282 @@ -SyntaxError: Function implementation name must be 'bar'. [test-class-method-overload9.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "constructor", + "decorators": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "bar", + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "baz", + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], + "loc": { + "start": { + "line": 19, + "column": 13 + }, + "end": { + "line": 19, + "column": 16 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 16 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 16 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 16 + } + } + } + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } +} diff --git a/es2panda/test/parser/ts/test-enum-declaration-expected.txt b/es2panda/test/parser/ts/test-enum-declaration-expected.txt index 869d46b393273b13180198904a755cb848bb8737..7f6fa2e0fec9955af43b770ce4bc2e2c4bdc145e 100644 --- a/es2panda/test/parser/ts/test-enum-declaration-expected.txt +++ b/es2panda/test/parser/ts/test-enum-declaration-expected.txt @@ -9,11 +9,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -27,22 +27,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -55,11 +55,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -72,11 +72,11 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -86,33 +86,33 @@ "value": 4, "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -125,22 +125,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 7 } } @@ -153,11 +153,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -171,11 +171,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -186,33 +186,33 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -225,11 +225,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -239,22 +239,22 @@ "value": 6, "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 10 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 11 } } @@ -267,11 +267,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -283,11 +283,11 @@ "value": "123", "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 14 } } @@ -298,11 +298,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 15 }, "end": { - "line": 7, + "line": 23, "column": 21 } } @@ -311,22 +311,22 @@ "optional": false, "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 21 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 22 } } @@ -335,11 +335,11 @@ "const": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -351,7 +351,7 @@ "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } diff --git a/es2panda/test/parser/ts/test-enum-declaration1-expected.txt b/es2panda/test/parser/ts/test-enum-declaration1-expected.txt index e5ccc58059079210b2ad5a8bc09bea870126b5a9..1401555d35bc34c61f88b1ef6f1c7d944309c34c 100644 --- a/es2panda/test/parser/ts/test-enum-declaration1-expected.txt +++ b/es2panda/test/parser/ts/test-enum-declaration1-expected.txt @@ -1 +1,116 @@ -SyntaxError: Variable 'a' has already been declared. [test-enum-declaration1.ts:3:5] +{ + "type": "Program", + "statements": [ + { + "type": "TSEnumDeclaration", + "id": { + "type": "Identifier", + "name": "foo", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "members": [ + { + "type": "TSEnumMember", + "id": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + { + "type": "TSEnumMember", + "id": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + "initializer": { + "type": "StringLiteral", + "value": "bar", + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 15 + } + } + } + ], + "const": false, + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 21, + "column": 1 + } + } +} diff --git a/es2panda/test/parser/ts/test-enum-declaration2-expected.txt b/es2panda/test/parser/ts/test-enum-declaration2-expected.txt index dea9b8365041cdc4b867d24cc30d43c36b528258..3ea32e6599d1b218be50185f3df4467b3604ec00 100644 --- a/es2panda/test/parser/ts/test-enum-declaration2-expected.txt +++ b/es2panda/test/parser/ts/test-enum-declaration2-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token in enum member [test-enum-declaration2.ts:2:5] +SyntaxError: Unexpected token in enum member [test-enum-declaration2.ts:18:5] diff --git a/es2panda/test/parser/ts/test-enum-declaration3-expected.txt b/es2panda/test/parser/ts/test-enum-declaration3-expected.txt index f6847b86bfdffe733dc99bf992c8c73b336b5210..96f233296f7c8e6f00bf38d68ed50a95d7f41496 100644 --- a/es2panda/test/parser/ts/test-enum-declaration3-expected.txt +++ b/es2panda/test/parser/ts/test-enum-declaration3-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token in enum member [test-enum-declaration3.ts:2:12] +SyntaxError: Unexpected token in enum member [test-enum-declaration3.ts:18:12] diff --git a/es2panda/test/parser/ts/test-enum-declaration4-expected.txt b/es2panda/test/parser/ts/test-enum-declaration4-expected.txt index 92b3177c9a512f4f787b9d99540537a340a587fb..255371edc36a3888eb005a7a3d70b0cfa028f499 100644 --- a/es2panda/test/parser/ts/test-enum-declaration4-expected.txt +++ b/es2panda/test/parser/ts/test-enum-declaration4-expected.txt @@ -1 +1 @@ -SyntaxError: Enum declarations can only merge with namespace or other enum declarations. [test-enum-declaration4.ts:4:10] +SyntaxError: Variable 'Foo' has already been declared. [test-enum-declaration4.ts:20:10] diff --git a/es2panda/test/parser/ts/test-enum-declaration5-expected.txt b/es2panda/test/parser/ts/test-enum-declaration5-expected.txt index 4d6db83c5aa9b73c39e5f1697e9d86f92a267a9c..2b1842732b9453c9dd8a5df2f72cdfa989281248 100644 --- a/es2panda/test/parser/ts/test-enum-declaration5-expected.txt +++ b/es2panda/test/parser/ts/test-enum-declaration5-expected.txt @@ -1 +1 @@ -SyntaxError: Enum declarations can only merge with namespace or other enum declarations. [test-enum-declaration5.ts:3:16] +SyntaxError: Variable 'Foo' has already been declared. [test-enum-declaration5.ts:19:16] diff --git a/es2panda/test/parser/ts/test-func-decl1-expected.txt b/es2panda/test/parser/ts/test-func-decl1-expected.txt index 48d47649c9e7aa81d8e51c89b602c9459f2c5b6a..1220808d5012f75bc375048b1af732ba04d1ea7d 100644 --- a/es2panda/test/parser/ts/test-func-decl1-expected.txt +++ b/es2panda/test/parser/ts/test-func-decl1-expected.txt @@ -1 +1 @@ -SyntaxError: Private identifiers are not allowed outside class bodies. [test-func-decl1.ts:2:10] +SyntaxError: Private identifiers are not allowed outside class bodies. [test-func-decl1.ts:18:10] diff --git a/es2panda/test/parser/ts/test-func-param-expected.txt b/es2panda/test/parser/ts/test-func-param-expected.txt index 83355a26e0a86f28d92b7eb2c2019eebaf08a918..6a8699ea817851939714c3ebbcce6c70937ffef3 100644 --- a/es2panda/test/parser/ts/test-func-param-expected.txt +++ b/es2panda/test/parser/ts/test-func-param-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 19 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 30 }, "end": { - "line": 1, + "line": 17, "column": 36 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -86,33 +86,33 @@ "statements": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 38 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 41 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 41 } } @@ -127,11 +127,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -149,11 +149,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -161,11 +161,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -175,22 +175,22 @@ "value": true, "loc": { "start": { - "line": 2, + "line": 18, "column": 29 }, "end": { - "line": 2, + "line": 18, "column": 33 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -206,22 +206,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 41 }, "end": { - "line": 2, + "line": 18, "column": 47 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 41 }, "end": { - "line": 2, + "line": 18, "column": 49 } } @@ -229,22 +229,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 38 }, "end": { - "line": 2, + "line": 18, "column": 39 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 35 }, "end": { - "line": 2, + "line": 18, "column": 39 } } @@ -255,33 +255,33 @@ "statements": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 51 }, "end": { - "line": 2, + "line": 18, "column": 54 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 54 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 54 } } @@ -296,11 +296,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -317,11 +317,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -331,22 +331,22 @@ "value": 6, "loc": { "start": { - "line": 3, + "line": 19, "column": 20 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -360,11 +360,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -375,11 +375,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 27 }, "end": { - "line": 3, + "line": 19, "column": 28 } } @@ -387,11 +387,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 23 }, "end": { - "line": 3, + "line": 19, "column": 29 } } @@ -403,11 +403,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 31 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -418,33 +418,33 @@ "statements": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 35 }, "end": { - "line": 3, + "line": 19, "column": 38 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 38 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 38 } } @@ -459,11 +459,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -479,22 +479,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 21 }, "end": { - "line": 4, + "line": 20, "column": 27 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 16 }, "end": { - "line": 4, + "line": 20, "column": 19 } } @@ -508,11 +508,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 30 }, "end": { - "line": 4, + "line": 20, "column": 31 } } @@ -523,11 +523,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 33 }, "end": { - "line": 4, + "line": 20, "column": 34 } } @@ -539,33 +539,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 37 }, "end": { - "line": 4, + "line": 20, "column": 43 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 37 }, "end": { - "line": 4, + "line": 20, "column": 45 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 29 }, "end": { - "line": 4, + "line": 20, "column": 35 } } @@ -576,33 +576,33 @@ "statements": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 47 }, "end": { - "line": 4, + "line": 20, "column": 50 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 50 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 50 } } @@ -617,11 +617,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -641,11 +641,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 17 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -656,11 +656,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 20 }, "end": { - "line": 5, + "line": 21, "column": 21 } } @@ -673,11 +673,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 25 }, "end": { - "line": 5, + "line": 21, "column": 32 } } @@ -686,11 +686,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 33 }, "end": { - "line": 5, + "line": 21, "column": 40 } } @@ -698,22 +698,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 24 }, "end": { - "line": 5, + "line": 21, "column": 40 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -726,11 +726,11 @@ "value": 1, "loc": { "start": { - "line": 5, + "line": 21, "column": 44 }, "end": { - "line": 5, + "line": 21, "column": 45 } } @@ -740,11 +740,11 @@ "value": "foo", "loc": { "start": { - "line": 5, + "line": 21, "column": 47 }, "end": { - "line": 5, + "line": 21, "column": 52 } } @@ -752,22 +752,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 43 }, "end": { - "line": 5, + "line": 21, "column": 53 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 53 } } @@ -778,33 +778,33 @@ "statements": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 55 }, "end": { - "line": 5, + "line": 21, "column": 58 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 58 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 58 } } @@ -819,11 +819,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 10 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -848,11 +848,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 19 } } @@ -863,11 +863,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 19 } } @@ -875,11 +875,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 19 } } @@ -895,11 +895,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 21 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -910,11 +910,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 21 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -922,11 +922,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 21 }, "end": { - "line": 6, + "line": 22, "column": 22 } } @@ -946,11 +946,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 28 }, "end": { - "line": 6, + "line": 22, "column": 29 } } @@ -959,22 +959,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 31 }, "end": { - "line": 6, + "line": 22, "column": 37 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 28 }, "end": { - "line": 6, + "line": 22, "column": 38 } } @@ -990,11 +990,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 39 }, "end": { - "line": 6, + "line": 22, "column": 40 } } @@ -1003,22 +1003,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 42 }, "end": { - "line": 6, + "line": 22, "column": 48 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 39 }, "end": { - "line": 6, + "line": 22, "column": 50 } } @@ -1026,22 +1026,22 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 26 }, "end": { - "line": 6, + "line": 22, "column": 50 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 16 }, "end": { - "line": 6, + "line": 22, "column": 24 } } @@ -1060,11 +1060,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 55 }, "end": { - "line": 6, + "line": 22, "column": 56 } } @@ -1074,11 +1074,11 @@ "value": 0, "loc": { "start": { - "line": 6, + "line": 22, "column": 58 }, "end": { - "line": 6, + "line": 22, "column": 59 } } @@ -1086,11 +1086,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 55 }, "end": { - "line": 6, + "line": 22, "column": 59 } } @@ -1106,11 +1106,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 61 }, "end": { - "line": 6, + "line": 22, "column": 62 } } @@ -1120,11 +1120,11 @@ "value": 0, "loc": { "start": { - "line": 6, + "line": 22, "column": 64 }, "end": { - "line": 6, + "line": 22, "column": 65 } } @@ -1132,11 +1132,11 @@ "kind": "init", "loc": { "start": { - "line": 6, + "line": 22, "column": 61 }, "end": { - "line": 6, + "line": 22, "column": 65 } } @@ -1144,22 +1144,22 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 53 }, "end": { - "line": 6, + "line": 22, "column": 67 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 16 }, "end": { - "line": 6, + "line": 22, "column": 67 } } @@ -1170,33 +1170,33 @@ "statements": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 69 }, "end": { - "line": 6, + "line": 22, "column": 72 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 72 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 72 } } @@ -1211,11 +1211,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 18 }, "end": { - "line": 7, + "line": 23, "column": 23 } } @@ -1233,11 +1233,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 25 }, "end": { - "line": 7, + "line": 23, "column": 26 } } @@ -1248,11 +1248,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 28 }, "end": { - "line": 7, + "line": 23, "column": 29 } } @@ -1265,11 +1265,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 33 }, "end": { - "line": 7, + "line": 23, "column": 40 } } @@ -1278,11 +1278,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 41 }, "end": { - "line": 7, + "line": 23, "column": 48 } } @@ -1290,22 +1290,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 32 }, "end": { - "line": 7, + "line": 23, "column": 48 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 24 }, "end": { - "line": 7, + "line": 23, "column": 30 } } @@ -1314,22 +1314,22 @@ "declare": true, "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 8, + "line": 24, "column": 8 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 8, + "line": 24, "column": 8 } } @@ -1344,11 +1344,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 18 }, "end": { - "line": 8, + "line": 24, "column": 23 } } @@ -1371,11 +1371,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 26 }, "end": { - "line": 8, + "line": 24, "column": 27 } } @@ -1386,11 +1386,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 26 }, "end": { - "line": 8, + "line": 24, "column": 27 } } @@ -1398,11 +1398,11 @@ "kind": "init", "loc": { "start": { - "line": 8, + "line": 24, "column": 26 }, "end": { - "line": 8, + "line": 24, "column": 27 } } @@ -1418,11 +1418,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 30 } } @@ -1433,11 +1433,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 30 } } @@ -1445,11 +1445,11 @@ "kind": "init", "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 30 } } @@ -1469,11 +1469,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 36 }, "end": { - "line": 8, + "line": 24, "column": 37 } } @@ -1482,22 +1482,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 39 }, "end": { - "line": 8, + "line": 24, "column": 45 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 36 }, "end": { - "line": 8, + "line": 24, "column": 46 } } @@ -1513,11 +1513,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 47 }, "end": { - "line": 8, + "line": 24, "column": 48 } } @@ -1526,22 +1526,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 50 }, "end": { - "line": 8, + "line": 24, "column": 56 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 47 }, "end": { - "line": 8, + "line": 24, "column": 58 } } @@ -1549,22 +1549,22 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 34 }, "end": { - "line": 8, + "line": 24, "column": 58 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 24 }, "end": { - "line": 8, + "line": 24, "column": 32 } } @@ -1573,22 +1573,22 @@ "declare": true, "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 9, + "line": 25, "column": 8 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 9, + "line": 25, "column": 8 } } @@ -1603,11 +1603,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 18 }, "end": { - "line": 9, + "line": 25, "column": 23 } } @@ -1625,11 +1625,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 26 } } @@ -1640,11 +1640,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 28 }, "end": { - "line": 9, + "line": 25, "column": 29 } } @@ -1657,11 +1657,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 34 }, "end": { - "line": 9, + "line": 25, "column": 41 } } @@ -1670,11 +1670,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 42 }, "end": { - "line": 9, + "line": 25, "column": 49 } } @@ -1682,11 +1682,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 33 }, "end": { - "line": 9, + "line": 25, "column": 49 } } @@ -1694,11 +1694,11 @@ "optional": true, "loc": { "start": { - "line": 9, + "line": 25, "column": 24 }, "end": { - "line": 9, + "line": 25, "column": 30 } } @@ -1707,22 +1707,22 @@ "declare": true, "loc": { "start": { - "line": 9, + "line": 25, "column": 9 }, "end": { - "line": 10, + "line": 26, "column": 8 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 9 }, "end": { - "line": 10, + "line": 26, "column": 8 } } @@ -1737,11 +1737,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 18 }, "end": { - "line": 10, + "line": 26, "column": 24 } } @@ -1764,11 +1764,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 27 }, "end": { - "line": 10, + "line": 26, "column": 28 } } @@ -1779,11 +1779,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 27 }, "end": { - "line": 10, + "line": 26, "column": 28 } } @@ -1791,11 +1791,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 27 }, "end": { - "line": 10, + "line": 26, "column": 28 } } @@ -1811,11 +1811,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 30 }, "end": { - "line": 10, + "line": 26, "column": 31 } } @@ -1826,11 +1826,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 30 }, "end": { - "line": 10, + "line": 26, "column": 31 } } @@ -1838,11 +1838,11 @@ "kind": "init", "loc": { "start": { - "line": 10, + "line": 26, "column": 30 }, "end": { - "line": 10, + "line": 26, "column": 31 } } @@ -1862,11 +1862,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 38 }, "end": { - "line": 10, + "line": 26, "column": 39 } } @@ -1875,22 +1875,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 41 }, "end": { - "line": 10, + "line": 26, "column": 47 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 38 }, "end": { - "line": 10, + "line": 26, "column": 48 } } @@ -1906,11 +1906,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 49 }, "end": { - "line": 10, + "line": 26, "column": 50 } } @@ -1919,22 +1919,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 52 }, "end": { - "line": 10, + "line": 26, "column": 58 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 49 }, "end": { - "line": 10, + "line": 26, "column": 60 } } @@ -1942,11 +1942,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 36 }, "end": { - "line": 10, + "line": 26, "column": 60 } } @@ -1954,11 +1954,11 @@ "optional": true, "loc": { "start": { - "line": 10, + "line": 26, "column": 25 }, "end": { - "line": 10, + "line": 26, "column": 33 } } @@ -1967,22 +1967,22 @@ "declare": true, "loc": { "start": { - "line": 10, + "line": 26, "column": 9 }, "end": { - "line": 12, + "line": 28, "column": 10 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 9 }, "end": { - "line": 12, + "line": 28, "column": 10 } } @@ -2002,11 +2002,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 9 }, "end": { - "line": 13, + "line": 29, "column": 15 } } @@ -2014,11 +2014,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 6 }, "end": { - "line": 13, + "line": 29, "column": 7 } } @@ -2037,11 +2037,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 19 }, "end": { - "line": 13, + "line": 29, "column": 20 } } @@ -2052,11 +2052,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 19 }, "end": { - "line": 13, + "line": 29, "column": 20 } } @@ -2064,11 +2064,11 @@ "kind": "init", "loc": { "start": { - "line": 13, + "line": 29, "column": 19 }, "end": { - "line": 13, + "line": 29, "column": 20 } } @@ -2084,11 +2084,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 22 }, "end": { - "line": 13, + "line": 29, "column": 23 } } @@ -2099,11 +2099,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 22 }, "end": { - "line": 13, + "line": 29, "column": 23 } } @@ -2111,11 +2111,11 @@ "kind": "init", "loc": { "start": { - "line": 13, + "line": 29, "column": 22 }, "end": { - "line": 13, + "line": 29, "column": 23 } } @@ -2135,11 +2135,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 9 }, "end": { - "line": 14, + "line": 30, "column": 10 } } @@ -2148,22 +2148,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 13 }, "end": { - "line": 14, + "line": 30, "column": 20 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 9 }, "end": { - "line": 14, + "line": 30, "column": 21 } } @@ -2179,11 +2179,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 10 } } @@ -2192,22 +2192,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 13 }, "end": { - "line": 15, + "line": 31, "column": 16 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 17 } } @@ -2215,11 +2215,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 28 }, "end": { - "line": 16, + "line": 32, "column": 6 } } @@ -2227,11 +2227,11 @@ "optional": true, "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 25 } } @@ -2241,22 +2241,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 9 }, "end": { - "line": 16, + "line": 32, "column": 15 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 16, + "line": 32, "column": 16 } } @@ -2264,11 +2264,11 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 22 }, "end": { - "line": 17, + "line": 33, "column": 2 } } @@ -2279,11 +2279,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 11 }, "end": { - "line": 12, + "line": 28, "column": 21 } } @@ -2291,11 +2291,11 @@ "extends": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 2 } } @@ -2307,7 +2307,7 @@ "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 2 } } diff --git a/es2panda/test/parser/ts/test-func-param1-expected.txt b/es2panda/test/parser/ts/test-func-param1-expected.txt index d4f99f634c1151dbf68a3481480dc14637067ddf..ba224fb3f4fac9782e8a95ce436c0cac5c729c74 100644 --- a/es2panda/test/parser/ts/test-func-param1-expected.txt +++ b/es2panda/test/parser/ts/test-func-param1-expected.txt @@ -1 +1 @@ -SyntaxError: A required parameter cannot follow an optional parameter [test-func-param1.ts:1:22] +SyntaxError: A required parameter cannot follow an optional parameter [test-func-param1.ts:17:22] diff --git a/es2panda/test/parser/ts/test-func-param2-expected.txt b/es2panda/test/parser/ts/test-func-param2-expected.txt index b47543d6819af7de6b36099230bfcb27be17f955..dd6edfacd1357e50b57835088d2b4abfb758fdd4 100644 --- a/es2panda/test/parser/ts/test-func-param2-expected.txt +++ b/es2panda/test/parser/ts/test-func-param2-expected.txt @@ -1 +1 @@ -SyntaxError: A 'this' parameter must be the first parameter [test-func-param2.ts:1:21] +SyntaxError: A 'this' parameter must be the first parameter [test-func-param2.ts:17:21] diff --git a/es2panda/test/parser/ts/test-func-param3-expected.txt b/es2panda/test/parser/ts/test-func-param3-expected.txt index 8154cbc74bfcd79293df2c5188d4db0eb10b3d24..8c0b648190aa25b228493f6b649343157de0553b 100644 --- a/es2panda/test/parser/ts/test-func-param3-expected.txt +++ b/es2panda/test/parser/ts/test-func-param3-expected.txt @@ -1 +1 @@ -SyntaxError: A constructor cannot have a 'this' parameter [test-func-param3.ts:2:21] +SyntaxError: A constructor cannot have a 'this' parameter [test-func-param3.ts:18:21] diff --git a/es2panda/test/parser/ts/test-func-param4-expected.txt b/es2panda/test/parser/ts/test-func-param4-expected.txt index 3745244a85f614c5d680b4024bf90168b868cf41..a9eb4575fc942cf9adb17461f87181004182b550 100644 --- a/es2panda/test/parser/ts/test-func-param4-expected.txt +++ b/es2panda/test/parser/ts/test-func-param4-expected.txt @@ -1 +1 @@ -SyntaxError: 'get' and 'set' accessors cannot declare 'this' parameters [test-func-param4.ts:2:17] +SyntaxError: 'get' and 'set' accessors cannot declare 'this' parameters [test-func-param4.ts:18:17] diff --git a/es2panda/test/parser/ts/test-func-param5-expected.txt b/es2panda/test/parser/ts/test-func-param5-expected.txt index 3fc4bd7736b16f580938dfa76547d9e3757d84d8..d70b2b42b96e1193a45a81279261a801dce192a0 100644 --- a/es2panda/test/parser/ts/test-func-param5-expected.txt +++ b/es2panda/test/parser/ts/test-func-param5-expected.txt @@ -1 +1 @@ -SyntaxError: 'constructor' cannot be used as a parameter property name [test-func-param5.ts:2:28] +SyntaxError: 'constructor' cannot be used as a parameter property name [test-func-param5.ts:18:28] diff --git a/es2panda/test/parser/ts/test-func-param6-expected.txt b/es2panda/test/parser/ts/test-func-param6-expected.txt index bb805a334d0f816b31adfaa01e9b17e6909d7899..18aa65c63ed65b048f6bf808089e149985434c25 100644 --- a/es2panda/test/parser/ts/test-func-param6-expected.txt +++ b/es2panda/test/parser/ts/test-func-param6-expected.txt @@ -1 +1 @@ -SyntaxError: A binding pattern parameter cannot be optional in an implementation signature [test-func-param6.ts:1:16] +SyntaxError: A binding pattern parameter cannot be optional in an implementation signature [test-func-param6.ts:17:16] diff --git a/es2panda/test/parser/ts/test-func-param7-expected.txt b/es2panda/test/parser/ts/test-func-param7-expected.txt index 3d814bf5976b8784f920cdd0b7fd96a1182eac7f..51cc6c35e33f78901c622bb633407718364a3e15 100644 --- a/es2panda/test/parser/ts/test-func-param7-expected.txt +++ b/es2panda/test/parser/ts/test-func-param7-expected.txt @@ -1 +1 @@ -SyntaxError: A rest parameter cannot be optional [test-func-param7.ts:1:18] +SyntaxError: A rest parameter cannot be optional [test-func-param7.ts:17:18] diff --git a/es2panda/test/parser/ts/test-func-param8-expected.txt b/es2panda/test/parser/ts/test-func-param8-expected.txt index a5bf39e304d3cf04fa787b8a60e6358b6b9ffe3e..f364c1096a4cfa0ec48338e0b4ad8ed25e3efc22 100644 --- a/es2panda/test/parser/ts/test-func-param8-expected.txt +++ b/es2panda/test/parser/ts/test-func-param8-expected.txt @@ -1 +1 @@ -SyntaxError: Parameter cannot have question mark and initializer [test-func-param8.ts:1:16] +SyntaxError: Parameter cannot have question mark and initializer [test-func-param8.ts:17:16] diff --git a/es2panda/test/parser/ts/test-function-overload-expected.txt b/es2panda/test/parser/ts/test-function-overload-expected.txt index 6d8375d7314a4071e7b5525d89f3623763f2e91f..3efd1608355df9782e46510d638867641fdff69c 100644 --- a/es2panda/test/parser/ts/test-function-overload-expected.txt +++ b/es2panda/test/parser/ts/test-function-overload-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -31,11 +31,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -43,11 +43,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -85,33 +85,33 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 44 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 45 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -146,11 +146,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -158,11 +158,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -174,11 +174,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 29 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -187,11 +187,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -201,33 +201,33 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 38 }, "end": { - "line": 2, + "line": 18, "column": 45 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 46 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 46 } } @@ -242,11 +242,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -262,11 +262,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -275,11 +275,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -291,11 +291,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 30 }, "end": { - "line": 3, + "line": 19, "column": 36 } } @@ -304,11 +304,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 27 } } @@ -318,11 +318,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 39 }, "end": { - "line": 3, + "line": 19, "column": 46 } } @@ -337,22 +337,22 @@ "value": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 16 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 17 } } @@ -360,33 +360,33 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 47 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 2 } } @@ -401,11 +401,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 10 }, "end": { - "line": 7, + "line": 23, "column": 13 } } @@ -419,33 +419,33 @@ "statements": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 16 }, "end": { - "line": 7, + "line": 23, "column": 19 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 19 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 19 } } @@ -457,7 +457,7 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 19 } } diff --git a/es2panda/test/parser/ts/test-function-overload1-expected.txt b/es2panda/test/parser/ts/test-function-overload1-expected.txt index a51369d3c0ceebe44abf1af46654a200434e2561..3a6805f524b4c21cf651447477c685280cec6b1d 100644 --- a/es2panda/test/parser/ts/test-function-overload1-expected.txt +++ b/es2panda/test/parser/ts/test-function-overload1-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -26,22 +26,22 @@ "params": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -56,11 +56,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -71,22 +71,22 @@ "params": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -116,22 +116,22 @@ "params": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -143,7 +143,7 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 16 } } diff --git a/es2panda/test/parser/ts/test-function-overload2-expected.txt b/es2panda/test/parser/ts/test-function-overload2-expected.txt index 55199d46325a0fcc0f3479cbf7973e36a9c69e0b..1a58f2a3c02d88d2410112fee0cd99803c00ad41 100644 --- a/es2panda/test/parser/ts/test-function-overload2-expected.txt +++ b/es2panda/test/parser/ts/test-function-overload2-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 13 } } @@ -26,22 +26,22 @@ "params": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 16 } } @@ -56,11 +56,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -71,22 +71,22 @@ "params": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -119,33 +119,33 @@ "statements": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -157,7 +157,7 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 19 } } diff --git a/es2panda/test/parser/ts/test-if-expected.txt b/es2panda/test/parser/ts/test-if-expected.txt index 879c5e75d6d788c418df8c2e621cd14e52626b5b..d0ae5c613eb768573f41d17477ef352024391759 100644 --- a/es2panda/test/parser/ts/test-if-expected.txt +++ b/es2panda/test/parser/ts/test-if-expected.txt @@ -8,11 +8,11 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -38,11 +38,11 @@ "const": true, "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -54,11 +54,11 @@ "value": 2, "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 16 }, "end": { - "line": 4, + "line": 20, "column": 17 } } @@ -84,11 +84,11 @@ "const": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 21 } } @@ -101,11 +101,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 16 }, "end": { - "line": 6, + "line": 22, "column": 17 } } @@ -114,33 +114,33 @@ "const": true, "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 6, + "line": 22, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 21 } } @@ -152,7 +152,7 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 1 } } diff --git a/es2panda/test/parser/ts/test-interface-expected.txt b/es2panda/test/parser/ts/test-interface-expected.txt index 6de8367b36eb6227035eeb38a34777c2ab6471be..c7be463c43f74e829e3f4d399023a056ee01d0b3 100644 --- a/es2panda/test/parser/ts/test-interface-expected.txt +++ b/es2panda/test/parser/ts/test-interface-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -30,22 +30,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -61,11 +61,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -77,11 +77,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -90,11 +90,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -102,22 +102,22 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 25 } } @@ -132,11 +132,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -155,11 +155,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 14 }, "end": { - "line": 4, + "line": 20, "column": 20 } } @@ -167,11 +167,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -183,11 +183,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 25 }, "end": { - "line": 4, + "line": 20, "column": 29 } } @@ -195,11 +195,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 22 }, "end": { - "line": 4, + "line": 20, "column": 23 } } @@ -209,22 +209,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 34 }, "end": { - "line": 4, + "line": 20, "column": 40 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 40 } } @@ -232,11 +232,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 7 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -250,22 +250,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 52 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 54 } } @@ -274,11 +274,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 42 }, "end": { - "line": 4, + "line": 20, "column": 43 } } @@ -288,22 +288,22 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 57 }, "end": { - "line": 4, + "line": 20, "column": 66 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 67 } } @@ -318,11 +318,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -330,11 +330,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -344,22 +344,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 5, + "line": 21, "column": 24 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -374,11 +374,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -386,11 +386,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 6 }, "end": { - "line": 6, + "line": 22, "column": 7 } } @@ -400,22 +400,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 24 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -430,11 +430,11 @@ "type": "TSNullKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 16 } } @@ -442,11 +442,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 10 } } @@ -458,11 +458,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 22 }, "end": { - "line": 7, + "line": 23, "column": 28 } } @@ -471,11 +471,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 18 }, "end": { - "line": 7, + "line": 23, "column": 19 } } @@ -495,11 +495,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 33 }, "end": { - "line": 7, + "line": 23, "column": 34 } } @@ -508,22 +508,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 36 }, "end": { - "line": 7, + "line": 23, "column": 42 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 33 }, "end": { - "line": 7, + "line": 23, "column": 43 } } @@ -539,11 +539,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 44 }, "end": { - "line": 7, + "line": 23, "column": 45 } } @@ -552,22 +552,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 47 }, "end": { - "line": 7, + "line": 23, "column": 53 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 44 }, "end": { - "line": 7, + "line": 23, "column": 54 } } @@ -582,11 +582,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 55 }, "end": { - "line": 7, + "line": 23, "column": 56 } } @@ -601,11 +601,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 59 }, "end": { - "line": 7, + "line": 23, "column": 60 } } @@ -616,11 +616,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 62 }, "end": { - "line": 7, + "line": 23, "column": 63 } } @@ -628,11 +628,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 58 }, "end": { - "line": 7, + "line": 23, "column": 64 } } @@ -642,22 +642,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 67 }, "end": { - "line": 7, + "line": 23, "column": 73 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 55 }, "end": { - "line": 7, + "line": 23, "column": 75 } } @@ -665,22 +665,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 31 }, "end": { - "line": 7, + "line": 23, "column": 75 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -688,11 +688,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -703,11 +703,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -716,55 +716,68 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "TSQualifiedName", - "left": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 24 + "type": "TSTypeReference", + "typeName": { + "type": "TSQualifiedName", + "left": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 24 + } } - } - }, - "right": { - "type": "Identifier", - "name": "b", - "decorators": [], + }, + "right": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 17, + "column": 25 + }, + "end": { + "line": 17, + "column": 26 + } + } + }, "loc": { "start": { - "line": 1, - "column": 25 + "line": 17, + "column": 23 }, "end": { - "line": 1, - "column": 26 + "line": 17, + "column": 28 } } }, "loc": { "start": { - "line": 1, - "column": 23 + "line": 17, + "column": 27 }, "end": { - "line": 1, - "column": 28 + "line": 17, + "column": 24 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -772,11 +785,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -788,7 +801,7 @@ "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 2 } } diff --git a/es2panda/test/parser/ts/test-interface1-expected.txt b/es2panda/test/parser/ts/test-interface1-expected.txt index 3caa47169ab4848515702894aa1110e8979e3e6b..4275ded626b9aa2164508bc2ac2fb0a3b74a7bdd 100644 --- a/es2panda/test/parser/ts/test-interface1-expected.txt +++ b/es2panda/test/parser/ts/test-interface1-expected.txt @@ -1 +1 @@ -SyntaxError: Interface name cannot be 'boolean' [test-interface1.ts:1:11] +SyntaxError: Interface name cannot be 'boolean' [test-interface1.ts:17:11] diff --git a/es2panda/test/parser/ts/test-interface2-expected.txt b/es2panda/test/parser/ts/test-interface2-expected.txt index e2c28ba2982f06dfee9d9448d2aae5ca4e74cbab..dcdfdaa0b032b6e330398ed2cb72a37400384217 100644 --- a/es2panda/test/parser/ts/test-interface2-expected.txt +++ b/es2panda/test/parser/ts/test-interface2-expected.txt @@ -1 +1 @@ -SyntaxError: Identifier expected [test-interface2.ts:1:11] +SyntaxError: Identifier expected [test-interface2.ts:17:11] diff --git a/es2panda/test/parser/ts/test-interface3-expected.txt b/es2panda/test/parser/ts/test-interface3-expected.txt index 970b9173339da53f0c0cc72ed2364e9a2438a9bf..aee0ef40e2527f1d1bcf7eaba1622b7019b4ebc7 100644 --- a/es2panda/test/parser/ts/test-interface3-expected.txt +++ b/es2panda/test/parser/ts/test-interface3-expected.txt @@ -1 +1 @@ -SyntaxError: Identifier expected [test-interface3.ts:1:23] +SyntaxError: Identifier expected [test-interface3.ts:17:23] diff --git a/es2panda/test/parser/ts/test-intersection-expected.txt b/es2panda/test/parser/ts/test-intersection-expected.txt index 036ecb44e0dce69aa39e3e562760b09b257c884e..65a1c66d5e04b40056dd7d2f748041ecf11389bd 100644 --- a/es2panda/test/parser/ts/test-intersection-expected.txt +++ b/es2panda/test/parser/ts/test-intersection-expected.txt @@ -9,11 +9,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 7 } } @@ -22,22 +22,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 16 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -46,11 +46,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 17 } } @@ -63,11 +63,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -76,22 +76,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -100,11 +100,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 2, + "line": 18, "column": 16 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -117,11 +117,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 7 } } @@ -130,22 +130,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 16 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -154,11 +154,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 3, + "line": 19, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -171,11 +171,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 7 } } @@ -184,22 +184,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 16 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 17 } } @@ -208,11 +208,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 4, + "line": 20, "column": 16 }, "end": { - "line": 4, + "line": 20, "column": 17 } } @@ -225,11 +225,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -238,22 +238,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 16 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -262,11 +262,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -279,11 +279,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 6 }, "end": { - "line": 6, + "line": 22, "column": 7 } } @@ -292,22 +292,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 10 }, "end": { - "line": 6, + "line": 22, "column": 16 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 17 } } @@ -316,11 +316,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 6, + "line": 22, "column": 16 }, "end": { - "line": 6, + "line": 22, "column": 17 } } @@ -333,11 +333,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 6 }, "end": { - "line": 8, + "line": 24, "column": 11 } } @@ -358,22 +358,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 15 }, "end": { - "line": 8, + "line": 24, "column": 16 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 15 }, "end": { - "line": 8, + "line": 24, "column": 16 } } @@ -389,22 +389,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 21 }, "end": { - "line": 8, + "line": 24, "column": 22 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 21 }, "end": { - "line": 8, + "line": 24, "column": 22 } } @@ -412,11 +412,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 19 }, "end": { - "line": 8, + "line": 24, "column": 22 } } @@ -424,22 +424,22 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 15 }, "end": { - "line": 8, + "line": 24, "column": 22 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 14 }, "end": { - "line": 8, + "line": 24, "column": 23 } } @@ -460,22 +460,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 30 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 30 } } @@ -483,11 +483,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 27 }, "end": { - "line": 8, + "line": 24, "column": 30 } } @@ -500,22 +500,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 33 }, "end": { - "line": 8, + "line": 24, "column": 34 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 33 }, "end": { - "line": 8, + "line": 24, "column": 34 } } @@ -523,22 +523,22 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 27 }, "end": { - "line": 8, + "line": 24, "column": 34 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 26 }, "end": { - "line": 8, + "line": 24, "column": 35 } } @@ -546,22 +546,22 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 14 }, "end": { - "line": 8, + "line": 24, "column": 35 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 36 } } @@ -570,11 +570,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 8, + "line": 24, "column": 35 }, "end": { - "line": 8, + "line": 24, "column": 36 } } @@ -587,11 +587,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 6 }, "end": { - "line": 9, + "line": 25, "column": 11 } } @@ -610,22 +610,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 14 }, "end": { - "line": 9, + "line": 25, "column": 15 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 14 }, "end": { - "line": 9, + "line": 25, "column": 15 } } @@ -643,22 +643,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 21 }, "end": { - "line": 9, + "line": 25, "column": 22 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 21 }, "end": { - "line": 9, + "line": 25, "column": 22 } } @@ -671,22 +671,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 26 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 26 } } @@ -694,22 +694,22 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 19 }, "end": { - "line": 9, + "line": 25, "column": 26 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 18 }, "end": { - "line": 9, + "line": 25, "column": 27 } } @@ -717,11 +717,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 14 }, "end": { - "line": 9, + "line": 25, "column": 27 } } @@ -737,22 +737,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 30 }, "end": { - "line": 9, + "line": 25, "column": 31 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 30 }, "end": { - "line": 9, + "line": 25, "column": 31 } } @@ -770,22 +770,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 35 }, "end": { - "line": 9, + "line": 25, "column": 36 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 35 }, "end": { - "line": 9, + "line": 25, "column": 36 } } @@ -798,22 +798,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 39 }, "end": { - "line": 9, + "line": 25, "column": 40 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 39 }, "end": { - "line": 9, + "line": 25, "column": 40 } } @@ -821,22 +821,22 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 35 }, "end": { - "line": 9, + "line": 25, "column": 40 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 34 }, "end": { - "line": 9, + "line": 25, "column": 41 } } @@ -844,11 +844,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 30 }, "end": { - "line": 9, + "line": 25, "column": 41 } } @@ -856,22 +856,22 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 14 }, "end": { - "line": 9, + "line": 25, "column": 41 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 5 } } @@ -884,11 +884,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 6 }, "end": { - "line": 10, + "line": 26, "column": 11 } } @@ -907,22 +907,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 14 }, "end": { - "line": 10, + "line": 26, "column": 15 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 14 }, "end": { - "line": 10, + "line": 26, "column": 15 } } @@ -935,22 +935,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 18 }, "end": { - "line": 10, + "line": 26, "column": 19 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 18 }, "end": { - "line": 10, + "line": 26, "column": 19 } } @@ -958,11 +958,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 14 }, "end": { - "line": 10, + "line": 26, "column": 19 } } @@ -978,22 +978,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 22 }, "end": { - "line": 10, + "line": 26, "column": 23 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 22 }, "end": { - "line": 10, + "line": 26, "column": 23 } } @@ -1006,22 +1006,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 26 }, "end": { - "line": 10, + "line": 26, "column": 27 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 26 }, "end": { - "line": 10, + "line": 26, "column": 27 } } @@ -1029,11 +1029,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 22 }, "end": { - "line": 10, + "line": 26, "column": 27 } } @@ -1049,22 +1049,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 30 }, "end": { - "line": 10, + "line": 26, "column": 31 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 30 }, "end": { - "line": 10, + "line": 26, "column": 31 } } @@ -1077,22 +1077,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 34 }, "end": { - "line": 10, + "line": 26, "column": 35 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 34 }, "end": { - "line": 10, + "line": 26, "column": 35 } } @@ -1100,11 +1100,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 30 }, "end": { - "line": 10, + "line": 26, "column": 35 } } @@ -1120,22 +1120,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 38 }, "end": { - "line": 10, + "line": 26, "column": 39 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 38 }, "end": { - "line": 10, + "line": 26, "column": 39 } } @@ -1148,22 +1148,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 42 }, "end": { - "line": 10, + "line": 26, "column": 43 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 42 }, "end": { - "line": 10, + "line": 26, "column": 43 } } @@ -1171,11 +1171,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 38 }, "end": { - "line": 10, + "line": 26, "column": 43 } } @@ -1183,22 +1183,22 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 14 }, "end": { - "line": 10, + "line": 26, "column": 43 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 44 } } @@ -1207,11 +1207,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 10, + "line": 26, "column": 43 }, "end": { - "line": 10, + "line": 26, "column": 44 } } @@ -1224,11 +1224,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 6 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -1244,22 +1244,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 15 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 15 } } @@ -1277,22 +1277,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 19 }, "end": { - "line": 11, + "line": 27, "column": 20 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 19 }, "end": { - "line": 11, + "line": 27, "column": 20 } } @@ -1305,22 +1305,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 23 }, "end": { - "line": 11, + "line": 27, "column": 24 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 23 }, "end": { - "line": 11, + "line": 27, "column": 24 } } @@ -1328,22 +1328,22 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 19 }, "end": { - "line": 11, + "line": 27, "column": 24 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 18 }, "end": { - "line": 11, + "line": 27, "column": 25 } } @@ -1356,22 +1356,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 28 }, "end": { - "line": 11, + "line": 27, "column": 29 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 28 }, "end": { - "line": 11, + "line": 27, "column": 29 } } @@ -1379,22 +1379,22 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 29 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 30 } } @@ -1403,11 +1403,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 11, + "line": 27, "column": 29 }, "end": { - "line": 11, + "line": 27, "column": 30 } } @@ -1420,11 +1420,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 6 }, "end": { - "line": 12, + "line": 28, "column": 11 } } @@ -1448,22 +1448,22 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 16 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 16 } } @@ -1484,22 +1484,22 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 20 }, "end": { - "line": 12, + "line": 28, "column": 21 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 20 }, "end": { - "line": 12, + "line": 28, "column": 21 } } @@ -1512,22 +1512,22 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 24 }, "end": { - "line": 12, + "line": 28, "column": 25 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 24 }, "end": { - "line": 12, + "line": 28, "column": 25 } } @@ -1535,22 +1535,22 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 20 }, "end": { - "line": 12, + "line": 28, "column": 25 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 19 }, "end": { - "line": 12, + "line": 28, "column": 26 } } @@ -1563,22 +1563,22 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 29 }, "end": { - "line": 12, + "line": 28, "column": 30 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 29 }, "end": { - "line": 12, + "line": 28, "column": 30 } } @@ -1586,11 +1586,11 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 19 }, "end": { - "line": 12, + "line": 28, "column": 30 } } @@ -1598,22 +1598,22 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 30 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 14 }, "end": { - "line": 12, + "line": 28, "column": 31 } } @@ -1626,22 +1626,22 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 34 }, "end": { - "line": 12, + "line": 28, "column": 35 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 34 }, "end": { - "line": 12, + "line": 28, "column": 35 } } @@ -1649,11 +1649,11 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 14 }, "end": { - "line": 12, + "line": 28, "column": 35 } } @@ -1666,22 +1666,22 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 38 }, "end": { - "line": 12, + "line": 28, "column": 39 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 38 }, "end": { - "line": 12, + "line": 28, "column": 39 } } @@ -1689,22 +1689,22 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 14 }, "end": { - "line": 12, + "line": 28, "column": 39 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 40 } } @@ -1713,11 +1713,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 12, + "line": 28, "column": 39 }, "end": { - "line": 12, + "line": 28, "column": 40 } } @@ -1740,11 +1740,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 12 }, "end": { - "line": 14, + "line": 30, "column": 18 } } @@ -1752,11 +1752,11 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 10 }, "end": { - "line": 14, + "line": 30, "column": 18 } } @@ -1764,11 +1764,11 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 18 } } @@ -1776,11 +1776,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -1788,11 +1788,11 @@ "init": null, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -1801,11 +1801,11 @@ "kind": "var", "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 19 } } @@ -1817,7 +1817,7 @@ "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 19 } } diff --git a/es2panda/test/parser/ts/test-intersection1-expected.txt b/es2panda/test/parser/ts/test-intersection1-expected.txt index b9ee98ca1e06ed3a69968affa5e568967e5b22bc..b1a3b334fae0bc0c7c74b45b92e46c3b3b69f980 100644 --- a/es2panda/test/parser/ts/test-intersection1-expected.txt +++ b/es2panda/test/parser/ts/test-intersection1-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-intersection1.ts:1:10] +SyntaxError: Type expected [test-intersection1.ts:17:10] diff --git a/es2panda/test/parser/ts/test-intersection2-expected.txt b/es2panda/test/parser/ts/test-intersection2-expected.txt index b25e9985fd4bd30c5a00f2d28474a1cfc7b2327a..cdc7e28cffaa5fc48ac62cd34df577162d66d4f9 100644 --- a/es2panda/test/parser/ts/test-intersection2-expected.txt +++ b/es2panda/test/parser/ts/test-intersection2-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-intersection2.ts:1:10] +SyntaxError: Type expected [test-intersection2.ts:17:10] diff --git a/es2panda/test/parser/ts/test-intersection3-expected.txt b/es2panda/test/parser/ts/test-intersection3-expected.txt index afe0ede959c37e2dd71a3301da733e8ac2783954..0f4cc23c5ee4d6ed1269c918ea3b6b026fa2c2ad 100644 --- a/es2panda/test/parser/ts/test-intersection3-expected.txt +++ b/es2panda/test/parser/ts/test-intersection3-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-intersection3.ts:1:16] +SyntaxError: Type expected [test-intersection3.ts:17:16] diff --git a/es2panda/test/parser/ts/test-keyword-declare-expected.txt b/es2panda/test/parser/ts/test-keyword-declare-expected.txt index 17d1f36fe50184b7fdd02623f32ccb42bab9a7b9..7f6134c906b6935b563eb89726503f265fe4f282 100644 --- a/es2panda/test/parser/ts/test-keyword-declare-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -24,11 +24,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -37,11 +37,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -57,11 +57,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -69,11 +69,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -83,11 +83,11 @@ "declare": true, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -103,11 +103,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 9 } } @@ -115,11 +115,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 9 } } @@ -128,11 +128,11 @@ "kind": "let", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 10 } } @@ -148,11 +148,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -160,11 +160,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -174,11 +174,11 @@ "declare": true, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -194,11 +194,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 7 }, "end": { - "line": 7, + "line": 23, "column": 11 } } @@ -208,22 +208,22 @@ "value": 1, "loc": { "start": { - "line": 7, + "line": 23, "column": 14 }, "end": { - "line": 7, + "line": 23, "column": 15 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 7 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -232,11 +232,11 @@ "kind": "const", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 16 } } @@ -252,11 +252,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 15 }, "end": { - "line": 8, + "line": 24, "column": 19 } } @@ -266,22 +266,22 @@ "value": 4, "loc": { "start": { - "line": 8, + "line": 24, "column": 22 }, "end": { - "line": 8, + "line": 24, "column": 23 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 15 }, "end": { - "line": 8, + "line": 24, "column": 23 } } @@ -291,11 +291,11 @@ "declare": true, "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 8, + "line": 24, "column": 24 } } @@ -311,11 +311,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 15 }, "end": { - "line": 9, + "line": 25, "column": 19 } } @@ -323,11 +323,11 @@ "init": null, "loc": { "start": { - "line": 9, + "line": 25, "column": 15 }, "end": { - "line": 9, + "line": 25, "column": 19 } } @@ -337,11 +337,11 @@ "declare": true, "loc": { "start": { - "line": 9, + "line": 25, "column": 9 }, "end": { - "line": 9, + "line": 25, "column": 20 } } @@ -354,11 +354,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 6 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -370,11 +370,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 20 } } @@ -383,11 +383,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 23 }, "end": { - "line": 11, + "line": 27, "column": 29 } } @@ -395,22 +395,22 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 29 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 30 } } @@ -419,11 +419,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 11, + "line": 27, "column": 29 }, "end": { - "line": 11, + "line": 27, "column": 30 } } @@ -436,11 +436,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 14 }, "end": { - "line": 12, + "line": 28, "column": 19 } } @@ -452,11 +452,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 22 }, "end": { - "line": 12, + "line": 28, "column": 28 } } @@ -465,11 +465,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 31 }, "end": { - "line": 12, + "line": 28, "column": 37 } } @@ -477,11 +477,11 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 22 }, "end": { - "line": 12, + "line": 28, "column": 37 } } @@ -489,11 +489,11 @@ "declare": true, "loc": { "start": { - "line": 12, + "line": 28, "column": 9 }, "end": { - "line": 12, + "line": 28, "column": 38 } } @@ -502,11 +502,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 12, + "line": 28, "column": 37 }, "end": { - "line": 12, + "line": 28, "column": 38 } } @@ -521,11 +521,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 10 }, "end": { - "line": 14, + "line": 30, "column": 15 } } @@ -539,33 +539,33 @@ "statements": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 18 }, "end": { - "line": 14, + "line": 30, "column": 21 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 21 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 21 } } @@ -574,11 +574,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 14, + "line": 30, "column": 21 }, "end": { - "line": 14, + "line": 30, "column": 22 } } @@ -593,11 +593,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 18 }, "end": { - "line": 15, + "line": 31, "column": 23 } } @@ -609,22 +609,22 @@ "declare": true, "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 26 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 26 } } @@ -639,11 +639,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 6 } } @@ -652,22 +652,22 @@ "optional": false, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 8 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 9 } } @@ -681,11 +681,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 15 }, "end": { - "line": 18, + "line": 34, "column": 21 } } @@ -762,11 +762,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 9 }, "end": { - "line": 29, + "line": 45, "column": 2 } } @@ -780,11 +780,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 24 }, "end": { - "line": 19, + "line": 35, "column": 25 } } @@ -805,22 +805,22 @@ "params": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 25 }, "end": { - "line": 20, + "line": 36, "column": 11 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 25 }, "end": { - "line": 20, + "line": 36, "column": 11 } } @@ -829,11 +829,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 11 } } @@ -846,11 +846,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 12 }, "end": { - "line": 20, + "line": 36, "column": 13 } } @@ -871,22 +871,22 @@ "params": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 13 }, "end": { - "line": 21, + "line": 37, "column": 11 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 13 }, "end": { - "line": 21, + "line": 37, "column": 11 } } @@ -895,11 +895,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 11 } } @@ -911,11 +911,11 @@ "value": 5, "loc": { "start": { - "line": 21, + "line": 37, "column": 30 }, "end": { - "line": 21, + "line": 37, "column": 31 } } @@ -928,11 +928,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 31 } } @@ -941,14 +941,14 @@ "type": "ClassProperty", "key": { "type": "StringLiteral", - "value": "", + "value": "b", "loc": { "start": { - "line": 22, + "line": 38, "column": 30 }, "end": { - "line": 22, + "line": 38, "column": 33 } } @@ -961,11 +961,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 5 }, "end": { - "line": 22, + "line": 38, "column": 33 } } @@ -977,11 +977,11 @@ "value": 67, "loc": { "start": { - "line": 23, + "line": 39, "column": 29 }, "end": { - "line": 23, + "line": 39, "column": 31 } } @@ -994,11 +994,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 5 }, "end": { - "line": 23, + "line": 39, "column": 31 } } @@ -1011,11 +1011,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 29 }, "end": { - "line": 24, + "line": 40, "column": 30 } } @@ -1028,11 +1028,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 5 }, "end": { - "line": 24, + "line": 40, "column": 30 } } @@ -1045,11 +1045,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 12 } } @@ -1062,11 +1062,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 12 } } @@ -1078,11 +1078,11 @@ "value": 1, "loc": { "start": { - "line": 26, + "line": 42, "column": 16 }, "end": { - "line": 26, + "line": 42, "column": 17 } } @@ -1103,22 +1103,22 @@ "params": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 18 }, "end": { - "line": 27, + "line": 43, "column": 11 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 18 }, "end": { - "line": 27, + "line": 43, "column": 11 } } @@ -1127,11 +1127,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 27, + "line": 43, "column": 11 } } @@ -1144,11 +1144,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 19 }, "end": { - "line": 27, + "line": 43, "column": 20 } } @@ -1162,11 +1162,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 5 }, "end": { - "line": 27, + "line": 43, "column": 20 } } @@ -1181,22 +1181,22 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 6 }, "end": { - "line": 28, + "line": 44, "column": 7 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 5 }, "end": { - "line": 28, + "line": 44, "column": 7 } } @@ -1209,11 +1209,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 5 }, "end": { - "line": 28, + "line": 44, "column": 7 } } @@ -1222,11 +1222,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 22 }, "end": { - "line": 29, + "line": 45, "column": 2 } } @@ -1234,11 +1234,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 9 }, "end": { - "line": 29, + "line": 45, "column": 2 } } @@ -1250,7 +1250,7 @@ "column": 1 }, "end": { - "line": 29, + "line": 45, "column": 2 } } diff --git a/es2panda/test/parser/ts/test-keyword-declare1-expected.txt b/es2panda/test/parser/ts/test-keyword-declare1-expected.txt index d6958452d732bd25b1f099bebe899b6fd7b27b8e..cfdb0d2b674a3fa898dc213e4687955387264bcf 100644 --- a/es2panda/test/parser/ts/test-keyword-declare1-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare1-expected.txt @@ -1 +1 @@ -SyntaxError: Initializers are not allowed in ambient contexts. [test-keyword-declare1.ts:1:17] +SyntaxError: Initializers are not allowed in ambient contexts. [test-keyword-declare1.ts:17:17] diff --git a/es2panda/test/parser/ts/test-keyword-declare10-expected.txt b/es2panda/test/parser/ts/test-keyword-declare10-expected.txt index 616187a17bdd9cf1664017fb4d684e36528026d5..7fffe814b0450b62ded4df640025f2d40b089442 100644 --- a/es2panda/test/parser/ts/test-keyword-declare10-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare10-expected.txt @@ -1 +1 @@ -SyntaxError: Generators are not allowed in an ambient context. [test-keyword-declare10.ts:2:14] +SyntaxError: Generators are not allowed in an ambient context. [test-keyword-declare10.ts:18:14] diff --git a/es2panda/test/parser/ts/test-keyword-declare11-expected.txt b/es2panda/test/parser/ts/test-keyword-declare11-expected.txt index 2e172d450b6bbf0af82ee5a713316ca8b2f362ec..4a985e6d7fafd34250fdc354810048c55bfd2bac 100644 --- a/es2panda/test/parser/ts/test-keyword-declare11-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare11-expected.txt @@ -1 +1 @@ -SyntaxError: An implementation cannot be declared in ambient contexts. [test-keyword-declare11.ts:2:16] +SyntaxError: An implementation cannot be declared in ambient contexts. [test-keyword-declare11.ts:18:16] diff --git a/es2panda/test/parser/ts/test-keyword-declare12-expected.txt b/es2panda/test/parser/ts/test-keyword-declare12-expected.txt index 8d798133319779d8db498fa81fee9d44885954d9..58ce56ba582b722b9aa3e9c0bc189e4282043563 100644 --- a/es2panda/test/parser/ts/test-keyword-declare12-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare12-expected.txt @@ -1 +1 @@ -SyntaxError: Initializers are not allowed in ambient contexts. [test-keyword-declare12.ts:2:24] +SyntaxError: Initializers are not allowed in ambient contexts. [test-keyword-declare12.ts:18:24] diff --git a/es2panda/test/parser/ts/test-keyword-declare13-expected.txt b/es2panda/test/parser/ts/test-keyword-declare13-expected.txt index a823f7452dba46f8f3e8e081d29b0d9a753af094..e35b271086582867188d37abcc11f6a20526ee81 100644 --- a/es2panda/test/parser/ts/test-keyword-declare13-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare13-expected.txt @@ -1 +1 @@ -SyntaxError: Initializers are not allowed in ambient contexts. [test-keyword-declare13.ts:2:32] +SyntaxError: Initializers are not allowed in ambient contexts. [test-keyword-declare13.ts:18:32] diff --git a/es2panda/test/parser/ts/test-keyword-declare2-expected.txt b/es2panda/test/parser/ts/test-keyword-declare2-expected.txt index cab2da2354d86118fe32171983f60ea439bbf920..528c41316e2f81e635ae49a9818b71efcfdc00a3 100644 --- a/es2panda/test/parser/ts/test-keyword-declare2-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare2-expected.txt @@ -1 +1 @@ -SyntaxError: Initializers are not allowed in ambient contexts. [test-keyword-declare2.ts:1:17] +SyntaxError: Initializers are not allowed in ambient contexts. [test-keyword-declare2.ts:17:17] diff --git a/es2panda/test/parser/ts/test-keyword-declare3-expected.txt b/es2panda/test/parser/ts/test-keyword-declare3-expected.txt index 10a9c2cb0a06888a86e0f0072081478a8dfb4c1e..6d723d9d429cf95e71866292bd2f11c37a223bfc 100644 --- a/es2panda/test/parser/ts/test-keyword-declare3-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare3-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token. [test-keyword-declare3.ts:1:9] +SyntaxError: Unexpected token. [test-keyword-declare3.ts:17:9] diff --git a/es2panda/test/parser/ts/test-keyword-declare4-expected.txt b/es2panda/test/parser/ts/test-keyword-declare4-expected.txt index db367c69a7f27bf6ea25060c95b425cfb6c18dc9..b18f1ce556aba6a48a1a1ff1399e71931a494ce2 100644 --- a/es2panda/test/parser/ts/test-keyword-declare4-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare4-expected.txt @@ -1 +1 @@ -SyntaxError: An implementation cannot be declared in ambient contexts. [test-keyword-declare4.ts:1:22] +SyntaxError: An implementation cannot be declared in ambient contexts. [test-keyword-declare4.ts:17:22] diff --git a/es2panda/test/parser/ts/test-keyword-declare5-expected.txt b/es2panda/test/parser/ts/test-keyword-declare5-expected.txt index 517cc4f30032445f910d823a948f77dafceddcb0..bb8cc9f668b25de4dedfc4d1048471a77fd55ebe 100644 --- a/es2panda/test/parser/ts/test-keyword-declare5-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare5-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -26,22 +26,22 @@ "params": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -56,11 +56,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 19 } } @@ -72,22 +72,22 @@ "declare": true, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 22 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -99,7 +99,7 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 22 } } diff --git a/es2panda/test/parser/ts/test-keyword-declare6-expected.txt b/es2panda/test/parser/ts/test-keyword-declare6-expected.txt index c99ec39c5601f36aa98c51ebc338b41a3193f71f..672d7012369ccbfe6ca28acfea0dbc5025c2c553 100644 --- a/es2panda/test/parser/ts/test-keyword-declare6-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare6-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -27,35 +27,22 @@ "declare": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, - "column": 22 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -70,11 +57,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -88,33 +75,33 @@ "statements": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 14 }, "end": { - "line": 2, + "line": 18, "column": 17 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -123,11 +110,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 18 } } @@ -139,7 +126,7 @@ "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 18 } } diff --git a/es2panda/test/parser/ts/test-keyword-declare7-expected.txt b/es2panda/test/parser/ts/test-keyword-declare7-expected.txt index 70dc5407991a285fb37009ceba2d9bae017939f7..869cb27c92febb83040f47b52738fc923a602eae 100644 --- a/es2panda/test/parser/ts/test-keyword-declare7-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare7-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -27,22 +27,22 @@ "declare": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 22 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -72,22 +72,22 @@ "value": 5, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -96,11 +96,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -115,11 +115,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -133,33 +133,33 @@ "statements": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 17 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 17 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 17 } } @@ -168,11 +168,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 3, + "line": 19, "column": 17 }, "end": { - "line": 3, + "line": 19, "column": 18 } } @@ -184,7 +184,7 @@ "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 18 } } diff --git a/es2panda/test/parser/ts/test-keyword-declare8-expected.txt b/es2panda/test/parser/ts/test-keyword-declare8-expected.txt index 20abeb87a2c00fb1fd3d31fb1c6b6951ba0563e8..75a07c73c27ec385c35ba8b8228e6453dff67615 100644 --- a/es2panda/test/parser/ts/test-keyword-declare8-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare8-expected.txt @@ -1 +1 @@ -SyntaxError: An implementation cannot be declared in ambient contexts. [test-keyword-declare8.ts:2:28] +SyntaxError: An implementation cannot be declared in ambient contexts. [test-keyword-declare8.ts:18:28] diff --git a/es2panda/test/parser/ts/test-keyword-declare9-expected.txt b/es2panda/test/parser/ts/test-keyword-declare9-expected.txt index 559c6dc3621417668831062c9e7e14e05c9ea487..53d4a528bd6d3a504969df2e7fadd2f498cca194 100644 --- a/es2panda/test/parser/ts/test-keyword-declare9-expected.txt +++ b/es2panda/test/parser/ts/test-keyword-declare9-expected.txt @@ -1 +1 @@ -SyntaxError: 'async' modifier cannot be used in an ambient context. [test-keyword-declare9.ts:2:19] +SyntaxError: 'async' modifier cannot be used in an ambient context. [test-keyword-declare9.ts:18:19] diff --git a/es2panda/test/parser/ts/test-member-expression1-expected.txt b/es2panda/test/parser/ts/test-member-expression1-expected.txt index 89bb37a42ef893b1f76a259e988d5b1f44d38dfa..16bddefa1101c77812875dc2d41bbfbd16fdcd84 100644 --- a/es2panda/test/parser/ts/test-member-expression1-expected.txt +++ b/es2panda/test/parser/ts/test-member-expression1-expected.txt @@ -1 +1 @@ -SyntaxError: Invalid left-hand side in assignment expression [test-member-expression1.ts:2:18] +SyntaxError: Invalid left-hand side in assignment expression [test-member-expression1.ts:18:18] diff --git a/es2panda/test/parser/ts/test-member-expression2-expected.txt b/es2panda/test/parser/ts/test-member-expression2-expected.txt index a015d3225681e42e62da377963ea6f62766d3bfa..e166cdd966871ef786f6b64bf77fbea81229bd6f 100644 --- a/es2panda/test/parser/ts/test-member-expression2-expected.txt +++ b/es2panda/test/parser/ts/test-member-expression2-expected.txt @@ -1 +1 @@ -SyntaxError: Invalid left-hand side in assignment expression [test-member-expression2.ts:2:8] +SyntaxError: Invalid left-hand side in assignment expression [test-member-expression2.ts:18:8] diff --git a/es2panda/test/parser/ts/test-ts-as-expression-expected.txt b/es2panda/test/parser/ts/test-ts-as-expression-expected.txt index 50da7b2455f3bf4f64844514176c13c8b50b8cd6..ee3c9ba18e3f00e6f69e49ef2f35e5f41b67aa05 100644 --- a/es2panda/test/parser/ts/test-ts-as-expression-expected.txt +++ b/es2panda/test/parser/ts/test-ts-as-expression-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -28,11 +28,11 @@ "value": "x", "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -47,22 +47,22 @@ "value": "x", "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 19 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -74,22 +74,22 @@ "value": "y", "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 25 } } @@ -97,33 +97,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 25 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 26 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -132,11 +132,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -152,11 +152,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -172,11 +172,11 @@ "value": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -185,22 +185,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 20 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -212,11 +212,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -225,11 +225,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 33 }, "end": { - "line": 2, + "line": 18, "column": 42 } } @@ -237,22 +237,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 42 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 45 } } @@ -261,33 +261,33 @@ "type": "TSNeverKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 46 }, "end": { - "line": 2, + "line": 18, "column": 51 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 52 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 52 } } @@ -296,11 +296,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 52 } } @@ -316,11 +316,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -332,11 +332,11 @@ "value": 1, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 10 } } @@ -349,44 +349,44 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 14 }, "end": { - "line": 3, + "line": 19, "column": 19 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -395,11 +395,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -411,7 +411,7 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 1 } } diff --git a/es2panda/test/parser/ts/test-ts-conditional-type-expected.txt b/es2panda/test/parser/ts/test-ts-conditional-type-expected.txt index 5b7c2a518ad5bc2f03872778d72e7d8f4c865434..0600edb3ae406ae8581b262127b45a176bf27434 100644 --- a/es2panda/test/parser/ts/test-ts-conditional-type-expected.txt +++ b/es2panda/test/parser/ts/test-ts-conditional-type-expected.txt @@ -12,11 +12,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -26,22 +26,22 @@ "value": 5, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 10 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 10 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -67,11 +67,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 7 } } @@ -91,11 +91,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -107,11 +107,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 26 } } @@ -120,11 +120,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 29 }, "end": { - "line": 2, + "line": 18, "column": 36 } } @@ -132,11 +132,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 36 } } @@ -144,11 +144,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 36 } } @@ -157,11 +157,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 45 }, "end": { - "line": 2, + "line": 18, "column": 52 } } @@ -170,11 +170,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 55 }, "end": { - "line": 2, + "line": 18, "column": 61 } } @@ -183,44 +183,44 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 64 }, "end": { - "line": 2, + "line": 18, "column": 70 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 70 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 71 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 73 } } @@ -238,11 +238,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 84 }, "end": { - "line": 2, + "line": 18, "column": 91 } } @@ -254,11 +254,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 102 }, "end": { - "line": 2, + "line": 18, "column": 108 } } @@ -266,11 +266,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 100 }, "end": { - "line": 2, + "line": 18, "column": 108 } } @@ -283,22 +283,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 118 }, "end": { - "line": 2, + "line": 18, "column": 119 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 111 }, "end": { - "line": 2, + "line": 18, "column": 119 } } @@ -307,33 +307,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 122 }, "end": { - "line": 2, + "line": 18, "column": 128 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 84 }, "end": { - "line": 2, + "line": 18, "column": 128 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 83 }, "end": { - "line": 2, + "line": 18, "column": 129 } } @@ -342,11 +342,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 132 }, "end": { - "line": 2, + "line": 18, "column": 138 } } @@ -354,22 +354,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 83 }, "end": { - "line": 2, + "line": 18, "column": 138 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 82 }, "end": { - "line": 2, + "line": 18, "column": 139 } } @@ -383,11 +383,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 142 }, "end": { - "line": 2, + "line": 18, "column": 148 } } @@ -396,11 +396,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 151 }, "end": { - "line": 2, + "line": 18, "column": 158 } } @@ -408,11 +408,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 142 }, "end": { - "line": 2, + "line": 18, "column": 158 } } @@ -421,11 +421,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 167 }, "end": { - "line": 2, + "line": 18, "column": 173 } } @@ -434,11 +434,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 176 }, "end": { - "line": 2, + "line": 18, "column": 182 } } @@ -447,22 +447,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 185 }, "end": { - "line": 2, + "line": 18, "column": 191 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 142 }, "end": { - "line": 2, + "line": 18, "column": 191 } } @@ -471,33 +471,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 194 }, "end": { - "line": 2, + "line": 18, "column": 200 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 200 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 201 } } @@ -506,11 +506,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 2, + "line": 18, "column": 200 }, "end": { - "line": 2, + "line": 18, "column": 201 } } @@ -532,11 +532,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -545,11 +545,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 18 }, "end": { - "line": 4, + "line": 20, "column": 24 } } @@ -557,11 +557,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 24 } } @@ -574,22 +574,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 33 }, "end": { - "line": 4, + "line": 20, "column": 34 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 33 }, "end": { - "line": 4, + "line": 20, "column": 34 } } @@ -598,11 +598,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 37 }, "end": { - "line": 4, + "line": 20, "column": 43 } } @@ -611,22 +611,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 52 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 52 } } @@ -634,11 +634,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -646,11 +646,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -659,11 +659,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 53 } } @@ -689,22 +689,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 9 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 9 } } @@ -713,11 +713,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -725,11 +725,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -738,11 +738,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 27 }, "end": { - "line": 5, + "line": 21, "column": 33 } } @@ -751,11 +751,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 36 }, "end": { - "line": 5, + "line": 21, "column": 42 } } @@ -764,22 +764,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 45 }, "end": { - "line": 5, + "line": 21, "column": 51 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 51 } } @@ -787,11 +787,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -799,11 +799,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -812,11 +812,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 52 } } @@ -838,11 +838,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -858,22 +858,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 19 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 19 } } @@ -882,11 +882,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 22 }, "end": { - "line": 6, + "line": 22, "column": 28 } } @@ -894,11 +894,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 28 } } @@ -906,11 +906,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 28 } } @@ -919,11 +919,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 37 }, "end": { - "line": 6, + "line": 22, "column": 43 } } @@ -932,11 +932,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 46 }, "end": { - "line": 6, + "line": 22, "column": 52 } } @@ -945,22 +945,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 55 }, "end": { - "line": 6, + "line": 22, "column": 61 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 61 } } @@ -968,11 +968,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -980,11 +980,11 @@ "init": null, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -993,11 +993,11 @@ "kind": "var", "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 62 } } @@ -1022,11 +1022,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -1035,11 +1035,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 18 }, "end": { - "line": 7, + "line": 23, "column": 24 } } @@ -1047,11 +1047,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 24 } } @@ -1060,11 +1060,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 27 }, "end": { - "line": 7, + "line": 23, "column": 33 } } @@ -1072,11 +1072,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 33 } } @@ -1085,11 +1085,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 42 }, "end": { - "line": 7, + "line": 23, "column": 48 } } @@ -1098,11 +1098,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 51 }, "end": { - "line": 7, + "line": 23, "column": 57 } } @@ -1111,22 +1111,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 60 }, "end": { - "line": 7, + "line": 23, "column": 66 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 66 } } @@ -1134,11 +1134,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -1146,11 +1146,11 @@ "init": null, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -1159,11 +1159,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 67 } } @@ -1176,11 +1176,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 6 }, "end": { - "line": 9, + "line": 25, "column": 9 } } @@ -1195,22 +1195,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 15 }, "end": { - "line": 9, + "line": 25, "column": 16 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 15 }, "end": { - "line": 9, + "line": 25, "column": 16 } } @@ -1229,55 +1229,55 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 32 }, "end": { - "line": 9, + "line": 25, "column": 33 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 32 }, "end": { - "line": 9, + "line": 25, "column": 34 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 26 }, "end": { - "line": 9, + "line": 25, "column": 34 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 34 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 36 } } @@ -1290,22 +1290,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 7 }, "end": { - "line": 10, + "line": 26, "column": 8 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 7 }, "end": { - "line": 10, + "line": 26, "column": 8 } } @@ -1320,22 +1320,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 7 }, "end": { - "line": 11, + "line": 27, "column": 8 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 7 }, "end": { - "line": 11, + "line": 27, "column": 8 } } @@ -1354,22 +1354,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 27 }, "end": { - "line": 11, + "line": 27, "column": 30 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 27 }, "end": { - "line": 11, + "line": 27, "column": 32 } } @@ -1377,22 +1377,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 21 }, "end": { - "line": 11, + "line": 27, "column": 25 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 18 }, "end": { - "line": 11, + "line": 27, "column": 25 } } @@ -1408,44 +1408,44 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 43 }, "end": { - "line": 11, + "line": 27, "column": 44 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 43 }, "end": { - "line": 12, + "line": 28, "column": 6 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 37 }, "end": { - "line": 12, + "line": 28, "column": 6 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 17 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -1458,22 +1458,22 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 7 }, "end": { - "line": 12, + "line": 28, "column": 8 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 7 }, "end": { - "line": 12, + "line": 28, "column": 8 } } @@ -1488,22 +1488,22 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 7 }, "end": { - "line": 13, + "line": 29, "column": 8 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 7 }, "end": { - "line": 13, + "line": 29, "column": 8 } } @@ -1516,11 +1516,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 24 } } @@ -1538,33 +1538,33 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 31 }, "end": { - "line": 13, + "line": 29, "column": 32 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 31 }, "end": { - "line": 13, + "line": 29, "column": 33 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 25 }, "end": { - "line": 13, + "line": 29, "column": 33 } } @@ -1572,22 +1572,22 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 33 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 24 } } @@ -1600,22 +1600,22 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 7 }, "end": { - "line": 14, + "line": 30, "column": 8 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 7 }, "end": { - "line": 14, + "line": 30, "column": 8 } } @@ -1628,55 +1628,55 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 7 }, "end": { - "line": 15, + "line": 31, "column": 8 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 7 }, "end": { - "line": 15, + "line": 31, "column": 8 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 7 }, "end": { - "line": 15, + "line": 31, "column": 8 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 7 }, "end": { - "line": 15, + "line": 31, "column": 8 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 15 }, "end": { - "line": 15, + "line": 31, "column": 8 } } @@ -1692,22 +1692,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 10 }, "end": { - "line": 9, + "line": 25, "column": 11 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 10 }, "end": { - "line": 9, + "line": 25, "column": 12 } } @@ -1715,22 +1715,22 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 9 }, "end": { - "line": 9, + "line": 25, "column": 12 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 9 } } @@ -1739,11 +1739,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 15, + "line": 31, "column": 8 }, "end": { - "line": 15, + "line": 31, "column": 9 } } @@ -1755,7 +1755,7 @@ "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 9 } } diff --git a/es2panda/test/parser/ts/test-ts-conditional-type1-expected.txt b/es2panda/test/parser/ts/test-ts-conditional-type1-expected.txt index b8ba53ba6c353e484980e35ecf2e71533b1863d0..2ca3cfb37585e07322e791943011d4b85f58c461 100644 --- a/es2panda/test/parser/ts/test-ts-conditional-type1-expected.txt +++ b/es2panda/test/parser/ts/test-ts-conditional-type1-expected.txt @@ -1 +1 @@ -SyntaxError: '?' expected. [test-ts-conditional-type1.ts:1:34] +SyntaxError: '?' expected. [test-ts-conditional-type1.ts:17:34] diff --git a/es2panda/test/parser/ts/test-ts-conditional-type2-expected.txt b/es2panda/test/parser/ts/test-ts-conditional-type2-expected.txt index 81076cb884969a286120e3cfe4651b2792172c99..166ebb75fb8bb86d03772104142d78ee2a6fdb5a 100644 --- a/es2panda/test/parser/ts/test-ts-conditional-type2-expected.txt +++ b/es2panda/test/parser/ts/test-ts-conditional-type2-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-ts-conditional-type2.ts:1:51] +SyntaxError: Type expected [test-ts-conditional-type2.ts:17:51] diff --git a/es2panda/test/parser/ts/test-ts-conditional-type3-expected.txt b/es2panda/test/parser/ts/test-ts-conditional-type3-expected.txt index 3d2ef83010f2e37e7bcf65744433baa3bd11f0e9..73d46728b38ca041f827fdfe32bbe21b6db1f1a6 100644 --- a/es2panda/test/parser/ts/test-ts-conditional-type3-expected.txt +++ b/es2panda/test/parser/ts/test-ts-conditional-type3-expected.txt @@ -1 +1 @@ -SyntaxError: ':' expected. [test-ts-conditional-type3.ts:1:43] +SyntaxError: ':' expected. [test-ts-conditional-type3.ts:17:43] diff --git a/es2panda/test/parser/ts/test-ts-conditional-type4-expected.txt b/es2panda/test/parser/ts/test-ts-conditional-type4-expected.txt index 62dcf61f7d3ad95f9bc5c7dbaf9586e22f2e677d..4c9caa24fafe0d1b23d1a540fed6d2429e32884a 100644 --- a/es2panda/test/parser/ts/test-ts-conditional-type4-expected.txt +++ b/es2panda/test/parser/ts/test-ts-conditional-type4-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-ts-conditional-type4.ts:1:59] +SyntaxError: Type expected [test-ts-conditional-type4.ts:17:59] diff --git a/es2panda/test/parser/ts/test-ts-conditional-type5-expected.txt b/es2panda/test/parser/ts/test-ts-conditional-type5-expected.txt index fc4d96e48cc402a44df240b4178577a52fb5ca00..e5d7e4e808eb947deec1c81dfcfdd8bf3a162cf1 100644 --- a/es2panda/test/parser/ts/test-ts-conditional-type5-expected.txt +++ b/es2panda/test/parser/ts/test-ts-conditional-type5-expected.txt @@ -1 +1 @@ -SyntaxError: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. [test-ts-conditional-type5.ts:1:12] +SyntaxError: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. [test-ts-conditional-type5.ts:17:12] diff --git a/es2panda/test/parser/ts/test-ts-conditional-type6-expected.txt b/es2panda/test/parser/ts/test-ts-conditional-type6-expected.txt index 53f3aad80dfceb4156089c6b11bb4b40697a4ce6..05368b61a28f1b2e4ffbda50ae99f6792a69774f 100644 --- a/es2panda/test/parser/ts/test-ts-conditional-type6-expected.txt +++ b/es2panda/test/parser/ts/test-ts-conditional-type6-expected.txt @@ -1 +1 @@ -SyntaxError: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. [test-ts-conditional-type6.ts:1:36] +SyntaxError: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. [test-ts-conditional-type6.ts:17:36] diff --git a/es2panda/test/parser/ts/test-ts-conditional-type7-expected.txt b/es2panda/test/parser/ts/test-ts-conditional-type7-expected.txt index e06a986353c0edfa75ef677e6c12aa955a6ae4b1..a98d40099c8c083e06c1c83248951164096f9498 100644 --- a/es2panda/test/parser/ts/test-ts-conditional-type7-expected.txt +++ b/es2panda/test/parser/ts/test-ts-conditional-type7-expected.txt @@ -1 +1 @@ -SyntaxError: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. [test-ts-conditional-type7.ts:1:45] +SyntaxError: 'infer' declarations are only permitted in the 'extends' clause of a conditional type. [test-ts-conditional-type7.ts:17:45] diff --git a/es2panda/test/parser/ts/test-ts-constructor-type1-expected.txt b/es2panda/test/parser/ts/test-ts-constructor-type1-expected.txt index bfbbfeb41763abb92da63e1e48c7707e87c21a06..c88a2bba40a4eb37d730ed08cb067397a993f2d5 100644 --- a/es2panda/test/parser/ts/test-ts-constructor-type1-expected.txt +++ b/es2panda/test/parser/ts/test-ts-constructor-type1-expected.txt @@ -1 +1 @@ -SyntaxError: '=>' expected [test-ts-constructor-type1.ts:1:37] +SyntaxError: '=>' expected [test-ts-constructor-type1.ts:17:37] diff --git a/es2panda/test/parser/ts/test-ts-constructor-type2-expected.txt b/es2panda/test/parser/ts/test-ts-constructor-type2-expected.txt index 141a4e92799cc4cc35740a71ecf9acce24a6c945..bdf31680118b0e659c6309762eb4282b642b96e1 100644 --- a/es2panda/test/parser/ts/test-ts-constructor-type2-expected.txt +++ b/es2panda/test/parser/ts/test-ts-constructor-type2-expected.txt @@ -1 +1 @@ -SyntaxError: '=>' expected [test-ts-constructor-type2.ts:1:46] +SyntaxError: '=>' expected [test-ts-constructor-type2.ts:17:46] diff --git a/es2panda/test/parser/ts/test-ts-constructor-type3-expected.txt b/es2panda/test/parser/ts/test-ts-constructor-type3-expected.txt index 18cf2c88069f143e563178993bf84017281b746d..f30fe6db311833584a1ac99025997fad394d2edd 100644 --- a/es2panda/test/parser/ts/test-ts-constructor-type3-expected.txt +++ b/es2panda/test/parser/ts/test-ts-constructor-type3-expected.txt @@ -1 +1 @@ -SyntaxError: '(' expected [test-ts-constructor-type3.ts:1:16] +SyntaxError: '(' expected [test-ts-constructor-type3.ts:17:16] diff --git a/es2panda/test/parser/ts/test-ts-constructor-type4-expected.txt b/es2panda/test/parser/ts/test-ts-constructor-type4-expected.txt index fcf4ec0e2bfb88274773e4ef716853be66f925ef..aa4f952e9b4f368fee6599cb9d8fe6cddc1cb952 100644 --- a/es2panda/test/parser/ts/test-ts-constructor-type4-expected.txt +++ b/es2panda/test/parser/ts/test-ts-constructor-type4-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-constructor-type4.ts:1:21] +SyntaxError: Unexpected token [test-ts-constructor-type4.ts:17:21] diff --git a/es2panda/test/parser/ts/test-ts-mapped-type-expected.txt b/es2panda/test/parser/ts/test-ts-mapped-type-expected.txt index 6b67f5e6640294354da361da25276fa64574f841..4896211a9c09be8328b1f5de2ccaf6be529fd9ba 100644 --- a/es2panda/test/parser/ts/test-ts-mapped-type-expected.txt +++ b/es2panda/test/parser/ts/test-ts-mapped-type-expected.txt @@ -9,11 +9,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 11 } } @@ -28,11 +28,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 35 } } @@ -48,44 +48,44 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 47 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 47 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 39 }, "end": { - "line": 1, + "line": 17, "column": 47 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 47 } } @@ -94,11 +94,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 52 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -107,11 +107,11 @@ "optional": "-", "loc": { "start": { - "line": 1, + "line": 17, "column": 18 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -127,22 +127,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 14 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -150,22 +150,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 15 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -174,11 +174,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 1, + "line": 17, "column": 62 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -191,11 +191,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -210,11 +210,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 35 } } @@ -230,44 +230,44 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 45 }, "end": { - "line": 2, + "line": 18, "column": 47 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 45 }, "end": { - "line": 2, + "line": 18, "column": 47 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 39 }, "end": { - "line": 2, + "line": 18, "column": 47 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 47 } } @@ -276,11 +276,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 52 }, "end": { - "line": 2, + "line": 18, "column": 59 } } @@ -289,11 +289,11 @@ "optional": "+", "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 62 } } @@ -309,22 +309,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 14 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -332,22 +332,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 63 } } @@ -356,11 +356,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 2, + "line": 18, "column": 62 }, "end": { - "line": 2, + "line": 18, "column": 63 } } @@ -373,11 +373,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -392,11 +392,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 30 }, "end": { - "line": 3, + "line": 19, "column": 34 } } @@ -412,44 +412,44 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 44 }, "end": { - "line": 3, + "line": 19, "column": 46 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 44 }, "end": { - "line": 3, + "line": 19, "column": 46 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 38 }, "end": { - "line": 3, + "line": 19, "column": 46 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 30 }, "end": { - "line": 3, + "line": 19, "column": 46 } } @@ -458,11 +458,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 50 }, "end": { - "line": 3, + "line": 19, "column": 57 } } @@ -471,11 +471,11 @@ "optional": "+", "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 60 } } @@ -491,22 +491,22 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 14 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -514,22 +514,22 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 61 } } @@ -538,11 +538,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 3, + "line": 19, "column": 60 }, "end": { - "line": 3, + "line": 19, "column": 61 } } @@ -555,11 +555,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -574,11 +574,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 21 }, "end": { - "line": 4, + "line": 20, "column": 25 } } @@ -594,44 +594,44 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 35 }, "end": { - "line": 4, + "line": 20, "column": 37 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 35 }, "end": { - "line": 4, + "line": 20, "column": 37 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 29 }, "end": { - "line": 4, + "line": 20, "column": 37 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 21 }, "end": { - "line": 4, + "line": 20, "column": 37 } } @@ -640,22 +640,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 40 }, "end": { - "line": 4, + "line": 20, "column": 47 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 18 }, "end": { - "line": 4, + "line": 20, "column": 50 } } @@ -671,22 +671,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -694,22 +694,22 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 15 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 51 } } @@ -718,11 +718,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 4, + "line": 20, "column": 50 }, "end": { - "line": 4, + "line": 20, "column": 51 } } @@ -735,11 +735,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 11 } } @@ -754,11 +754,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 21 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -774,44 +774,44 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 35 }, "end": { - "line": 5, + "line": 21, "column": 37 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 35 }, "end": { - "line": 5, + "line": 21, "column": 37 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 29 }, "end": { - "line": 5, + "line": 21, "column": 37 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 21 }, "end": { - "line": 5, + "line": 21, "column": 37 } } @@ -820,22 +820,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 40 }, "end": { - "line": 5, + "line": 21, "column": 47 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 5, + "line": 21, "column": 49 } } @@ -851,22 +851,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 14 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -874,22 +874,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 15 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 50 } } @@ -898,11 +898,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 5, + "line": 21, "column": 49 }, "end": { - "line": 5, + "line": 21, "column": 50 } } @@ -915,11 +915,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 6 }, "end": { - "line": 6, + "line": 22, "column": 11 } } @@ -934,11 +934,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 21 }, "end": { - "line": 6, + "line": 22, "column": 25 } } @@ -954,55 +954,55 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 35 }, "end": { - "line": 6, + "line": 22, "column": 37 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 35 }, "end": { - "line": 6, + "line": 22, "column": 37 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 29 }, "end": { - "line": 6, + "line": 22, "column": 37 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 21 }, "end": { - "line": 6, + "line": 22, "column": 37 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 41 } } @@ -1018,22 +1018,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 12 }, "end": { - "line": 6, + "line": 22, "column": 14 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 12 }, "end": { - "line": 6, + "line": 22, "column": 15 } } @@ -1041,22 +1041,22 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 11 }, "end": { - "line": 6, + "line": 22, "column": 15 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 42 } } @@ -1065,11 +1065,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 6, + "line": 22, "column": 41 }, "end": { - "line": 6, + "line": 22, "column": 42 } } @@ -1082,11 +1082,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 6 }, "end": { - "line": 7, + "line": 23, "column": 11 } } @@ -1101,11 +1101,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 21 }, "end": { - "line": 7, + "line": 23, "column": 25 } } @@ -1121,55 +1121,55 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 35 }, "end": { - "line": 7, + "line": 23, "column": 37 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 35 }, "end": { - "line": 7, + "line": 23, "column": 37 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 29 }, "end": { - "line": 7, + "line": 23, "column": 37 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 21 }, "end": { - "line": 7, + "line": 23, "column": 37 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 18 }, "end": { - "line": 7, + "line": 23, "column": 40 } } @@ -1185,22 +1185,22 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 14 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 12 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -1208,22 +1208,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 11 }, "end": { - "line": 7, + "line": 23, "column": 15 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 41 } } @@ -1232,11 +1232,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 7, + "line": 23, "column": 40 }, "end": { - "line": 7, + "line": 23, "column": 41 } } @@ -1248,7 +1248,7 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 41 } } diff --git a/es2panda/test/parser/ts/test-ts-mapped-type1-expected.txt b/es2panda/test/parser/ts/test-ts-mapped-type1-expected.txt index 7522aa60321b43b8f70a0c7877f1cb812acac732..27d43edc6adbaf9f1e3268a4f85ee3d1a1aac471 100644 --- a/es2panda/test/parser/ts/test-ts-mapped-type1-expected.txt +++ b/es2panda/test/parser/ts/test-ts-mapped-type1-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-mapped-type1.ts:1:17] +SyntaxError: Unexpected token [test-ts-mapped-type1.ts:17:17] diff --git a/es2panda/test/parser/ts/test-ts-mapped-type2-expected.txt b/es2panda/test/parser/ts/test-ts-mapped-type2-expected.txt index 7e62c4a01175cf034fc4bec7171004080e1b1819..fce6576fed97a576bde1653e339f43e3d1e932db 100644 --- a/es2panda/test/parser/ts/test-ts-mapped-type2-expected.txt +++ b/es2panda/test/parser/ts/test-ts-mapped-type2-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-mapped-type2.ts:1:26] +SyntaxError: Unexpected token [test-ts-mapped-type2.ts:17:26] diff --git a/es2panda/test/parser/ts/test-ts-mapped-type3-expected.txt b/es2panda/test/parser/ts/test-ts-mapped-type3-expected.txt index 003fd040c923d10643b071ccbc479a272f6c20b5..61ce032e9418ed9964ade2f25c73fc7a9dc1e0da 100644 --- a/es2panda/test/parser/ts/test-ts-mapped-type3-expected.txt +++ b/es2panda/test/parser/ts/test-ts-mapped-type3-expected.txt @@ -1 +1 @@ -SyntaxError: ']' expected [test-ts-mapped-type3.ts:1:32] +SyntaxError: ']' expected [test-ts-mapped-type3.ts:17:32] diff --git a/es2panda/test/parser/ts/test-ts-mapped-type4-expected.txt b/es2panda/test/parser/ts/test-ts-mapped-type4-expected.txt index d0e7a5a7b06f5472cec84c3988b9c189b38d2ef1..dedff3acbcb3caa2239bcf9a0c62f2059525cd4d 100644 --- a/es2panda/test/parser/ts/test-ts-mapped-type4-expected.txt +++ b/es2panda/test/parser/ts/test-ts-mapped-type4-expected.txt @@ -1 +1 @@ -SyntaxError: ']' expected [test-ts-mapped-type4.ts:1:43] +SyntaxError: ']' expected [test-ts-mapped-type4.ts:17:43] diff --git a/es2panda/test/parser/ts/test-ts-mapped-type5-expected.txt b/es2panda/test/parser/ts/test-ts-mapped-type5-expected.txt index 04f2fe8e9ddf8a838e02f7883af15aa05f18ad63..4473243fdd307bd2fb6cfb4b7883afe890631088 100644 --- a/es2panda/test/parser/ts/test-ts-mapped-type5-expected.txt +++ b/es2panda/test/parser/ts/test-ts-mapped-type5-expected.txt @@ -1 +1 @@ -SyntaxError: '?' expected. [test-ts-mapped-type5.ts:1:44] +SyntaxError: '?' expected. [test-ts-mapped-type5.ts:17:44] diff --git a/es2panda/test/parser/ts/test-ts-mapped-type6-expected.txt b/es2panda/test/parser/ts/test-ts-mapped-type6-expected.txt index f87bf92287e7c5cf386a1a842703720561a2122f..87acd416c9b0ef89f8db7a5fb8af02823e4c6365 100644 --- a/es2panda/test/parser/ts/test-ts-mapped-type6-expected.txt +++ b/es2panda/test/parser/ts/test-ts-mapped-type6-expected.txt @@ -1 +1 @@ -SyntaxError: ';' expected [test-ts-mapped-type6.ts:1:43] +SyntaxError: ';' expected [test-ts-mapped-type6.ts:17:43] diff --git a/es2panda/test/parser/ts/test-ts-mapped-type7-expected.txt b/es2panda/test/parser/ts/test-ts-mapped-type7-expected.txt index fe006a971b6ef809c4c697bdf7c3a1426ed436e2..ead15f46faba12f4d20730ea63af7594c95fb3c6 100644 --- a/es2panda/test/parser/ts/test-ts-mapped-type7-expected.txt +++ b/es2panda/test/parser/ts/test-ts-mapped-type7-expected.txt @@ -1 +1 @@ -SyntaxError: '}' expected [test-ts-mapped-type7.ts:1:44] +SyntaxError: '}' expected [test-ts-mapped-type7.ts:17:44] diff --git a/es2panda/test/parser/ts/test-ts-non-null-expression-expected.txt b/es2panda/test/parser/ts/test-ts-non-null-expression-expected.txt index d805f00309882586c66f9ce32bb55d1d7c5b26b4..b05e14b7aeb0a17d55af3e122a820b6e60a90e77 100644 --- a/es2panda/test/parser/ts/test-ts-non-null-expression-expected.txt +++ b/es2panda/test/parser/ts/test-ts-non-null-expression-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -39,22 +39,22 @@ "value": 1, "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 18 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -63,11 +63,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -86,44 +86,44 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 2 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 3 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 5 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -142,44 +142,44 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 3 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 5 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -198,44 +198,44 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 3 }, "end": { - "line": 4, + "line": 20, "column": 4 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 3 }, "end": { - "line": 4, + "line": 20, "column": 5 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 5 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -254,44 +254,44 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 3 }, "end": { - "line": 5, + "line": 21, "column": 4 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 3 }, "end": { - "line": 5, + "line": 21, "column": 5 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 5 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -307,11 +307,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -327,22 +327,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 7 } } @@ -353,44 +353,44 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 10 }, "end": { - "line": 6, + "line": 22, "column": 11 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 11 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 11 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -402,7 +402,7 @@ "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 12 } } diff --git a/es2panda/test/parser/ts/test-ts-parameter-property-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property-expected.txt index 4bb89a0b9e2bc7fb7f31024e085f5600695438a7..d37f04610a27ee3010f1cf856011a6a0a708cd3d 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property-expected.txt @@ -10,11 +10,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -29,11 +29,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 23 } } @@ -60,11 +60,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -74,22 +74,22 @@ "value": 5, "loc": { "start": { - "line": 3, + "line": 19, "column": 19 }, "end": { - "line": 3, + "line": 19, "column": 20 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -103,11 +103,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 16 }, "end": { - "line": 4, + "line": 20, "column": 22 } } @@ -115,36 +115,36 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 14 } } }, "right": { "type": "StringLiteral", - "value": "", + "value": "async", "loc": { "start": { - "line": 4, + "line": 20, "column": 25 }, "end": { - "line": 4, + "line": 20, "column": 32 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 32 } } @@ -161,22 +161,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 17 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -193,22 +193,22 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 17 }, "end": { - "line": 6, + "line": 22, "column": 18 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 18 } } @@ -225,22 +225,22 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 19 }, "end": { - "line": 7, + "line": 23, "column": 20 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 20 } } @@ -257,22 +257,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 18 }, "end": { - "line": 8, + "line": 24, "column": 19 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 9 }, "end": { - "line": 8, + "line": 24, "column": 19 } } @@ -289,22 +289,22 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 25 }, "end": { - "line": 9, + "line": 25, "column": 26 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 9 }, "end": { - "line": 9, + "line": 25, "column": 26 } } @@ -321,22 +321,22 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 26 }, "end": { - "line": 10, + "line": 26, "column": 27 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 9 }, "end": { - "line": 10, + "line": 26, "column": 27 } } @@ -353,22 +353,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 28 }, "end": { - "line": 11, + "line": 27, "column": 29 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 9 }, "end": { - "line": 11, + "line": 27, "column": 29 } } @@ -388,11 +388,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 35 }, "end": { - "line": 12, + "line": 28, "column": 42 } } @@ -400,11 +400,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 25 }, "end": { - "line": 12, + "line": 28, "column": 33 } } @@ -414,33 +414,33 @@ "value": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 45 }, "end": { - "line": 12, + "line": 28, "column": 50 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 25 }, "end": { - "line": 12, + "line": 28, "column": 50 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 9 }, "end": { - "line": 12, + "line": 28, "column": 50 } } @@ -454,11 +454,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 10 }, "end": { - "line": 13, + "line": 29, "column": 11 } } @@ -466,11 +466,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 9 }, "end": { - "line": 13, + "line": 29, "column": 12 } } @@ -489,11 +489,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 12 } } @@ -504,11 +504,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 12 } } @@ -516,11 +516,11 @@ "kind": "init", "loc": { "start": { - "line": 14, + "line": 30, "column": 11 }, "end": { - "line": 14, + "line": 30, "column": 12 } } @@ -528,11 +528,11 @@ ], "loc": { "start": { - "line": 14, + "line": 30, "column": 9 }, "end": { - "line": 14, + "line": 30, "column": 14 } } @@ -548,11 +548,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 10 }, "end": { - "line": 15, + "line": 31, "column": 11 } } @@ -560,11 +560,11 @@ ], "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 12 } } @@ -574,14 +574,14 @@ "elements": [ { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 15, + "line": 31, "column": 16 }, "end": { - "line": 15, + "line": 31, "column": 21 } } @@ -589,22 +589,22 @@ ], "loc": { "start": { - "line": 15, + "line": 31, "column": 15 }, "end": { - "line": 15, + "line": 31, "column": 22 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 22 } } @@ -625,11 +625,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 11 }, "end": { - "line": 16, + "line": 32, "column": 12 } } @@ -640,11 +640,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 11 }, "end": { - "line": 16, + "line": 32, "column": 12 } } @@ -652,11 +652,11 @@ "kind": "init", "loc": { "start": { - "line": 16, + "line": 32, "column": 11 }, "end": { - "line": 16, + "line": 32, "column": 12 } } @@ -664,11 +664,11 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 9 }, "end": { - "line": 16, + "line": 32, "column": 14 } } @@ -687,11 +687,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 19 }, "end": { - "line": 16, + "line": 32, "column": 20 } } @@ -701,11 +701,11 @@ "value": 5, "loc": { "start": { - "line": 16, + "line": 32, "column": 22 }, "end": { - "line": 16, + "line": 32, "column": 23 } } @@ -713,11 +713,11 @@ "kind": "init", "loc": { "start": { - "line": 16, + "line": 32, "column": 19 }, "end": { - "line": 16, + "line": 32, "column": 23 } } @@ -725,22 +725,22 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 17 }, "end": { - "line": 16, + "line": 32, "column": 25 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 9 }, "end": { - "line": 16, + "line": 32, "column": 25 } } @@ -753,22 +753,22 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 12 }, "end": { - "line": 17, + "line": 33, "column": 16 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 9 }, "end": { - "line": 17, + "line": 33, "column": 16 } } @@ -779,33 +779,33 @@ "statements": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 18 }, "end": { - "line": 17, + "line": 33, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 17, + "line": 33, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 17, + "line": 33, "column": 21 } } @@ -814,11 +814,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 21 } } @@ -827,11 +827,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 18, + "line": 34, "column": 2 } } @@ -839,11 +839,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 18, + "line": 34, "column": 2 } } @@ -857,11 +857,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 7 }, "end": { - "line": 20, + "line": 36, "column": 20 } } @@ -876,11 +876,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 12 }, "end": { - "line": 21, + "line": 37, "column": 23 } } @@ -905,11 +905,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 24 }, "end": { - "line": 21, + "line": 37, "column": 32 } } @@ -920,33 +920,33 @@ "statements": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 34 }, "end": { - "line": 21, + "line": 37, "column": 37 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 23 }, "end": { - "line": 21, + "line": 37, "column": 37 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 23 }, "end": { - "line": 21, + "line": 37, "column": 37 } } @@ -955,11 +955,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 37 } } @@ -968,11 +968,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 21 }, "end": { - "line": 22, + "line": 38, "column": 2 } } @@ -980,11 +980,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 2 } } @@ -998,11 +998,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 7 }, "end": { - "line": 24, + "line": 40, "column": 20 } } @@ -1017,11 +1017,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 12 }, "end": { - "line": 25, + "line": 41, "column": 23 } } @@ -1052,22 +1052,22 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 31 }, "end": { - "line": 25, + "line": 41, "column": 39 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 24 }, "end": { - "line": 25, + "line": 41, "column": 39 } } @@ -1078,33 +1078,33 @@ "statements": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 41 }, "end": { - "line": 25, + "line": 41, "column": 44 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 23 }, "end": { - "line": 25, + "line": 41, "column": 44 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 23 }, "end": { - "line": 25, + "line": 41, "column": 44 } } @@ -1113,11 +1113,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 44 } } @@ -1126,11 +1126,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 21 }, "end": { - "line": 26, + "line": 42, "column": 2 } } @@ -1138,11 +1138,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 2 } } @@ -1156,11 +1156,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 7 }, "end": { - "line": 28, + "line": 44, "column": 20 } } @@ -1175,11 +1175,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 12 }, "end": { - "line": 29, + "line": 45, "column": 23 } } @@ -1210,22 +1210,22 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 33 }, "end": { - "line": 29, + "line": 45, "column": 41 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 24 }, "end": { - "line": 29, + "line": 45, "column": 41 } } @@ -1236,33 +1236,33 @@ "statements": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 43 }, "end": { - "line": 29, + "line": 45, "column": 46 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 23 }, "end": { - "line": 29, + "line": 45, "column": 46 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 23 }, "end": { - "line": 29, + "line": 45, "column": 46 } } @@ -1271,11 +1271,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 46 } } @@ -1284,11 +1284,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 21 }, "end": { - "line": 30, + "line": 46, "column": 2 } } @@ -1296,11 +1296,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 2 } } @@ -1312,7 +1312,7 @@ "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 2 } } diff --git a/es2panda/test/parser/ts/test-ts-parameter-property1-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property1-expected.txt index efde343f5ccf26bece0e82fe5c1c88f6be03f1e6..718579909bfc5203ddf7f31d95b6eeb8715cc9b5 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property1-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property1-expected.txt @@ -1 +1 @@ -SyntaxError: A parameter property is only allowed in a constructor implementation. [test-ts-parameter-property1.ts:1:14] +SyntaxError: A parameter property is only allowed in a constructor implementation. [test-ts-parameter-property1.ts:17:14] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property10-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property10-expected.txt index 98a384f9ec916525f4eade1c58c3ff09b4d75cd9..42ff4482749e7d11e4f36b9ac238902208a1094a 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property10-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property10-expected.txt @@ -1 +1 @@ -SyntaxError: A parameter property may not be declared using a binding pattern. [test-ts-parameter-property10.ts:2:17] +SyntaxError: A parameter property may not be declared using a binding pattern. [test-ts-parameter-property10.ts:18:17] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property11-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property11-expected.txt index be8681978e3b5c5f5c351e6a763adf5b6fa57ab6..f9e4c22408bad9fc6ae4c46afd030a93e5c999cd 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property11-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property11-expected.txt @@ -1 +1 @@ -SyntaxError: A parameter property may not be declared using a binding pattern. [test-ts-parameter-property11.ts:2:17] +SyntaxError: A parameter property may not be declared using a binding pattern. [test-ts-parameter-property11.ts:18:17] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property12-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property12-expected.txt index 11995e0f60ea508cdac91f83bf079b8fa0067d23..c7cf1229dde23227d8122d6e813864bf1388fb0c 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property12-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property12-expected.txt @@ -1 +1 @@ -SyntaxError: A parameter property may not be declared using a binding pattern. [test-ts-parameter-property12.ts:2:17] +SyntaxError: A parameter property may not be declared using a binding pattern. [test-ts-parameter-property12.ts:18:17] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property2-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property2-expected.txt index ddda7c05414a32d93ac3fc5705cc5e8e6455e0d8..b62630136030344bf43a590e6c3fe9170053a405 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property2-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property2-expected.txt @@ -1 +1 @@ -SyntaxError: A parameter property is only allowed in a constructor implementation. [test-ts-parameter-property2.ts:3:7] +SyntaxError: A parameter property is only allowed in a constructor implementation. [test-ts-parameter-property2.ts:19:7] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property3-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property3-expected.txt index c77be0701aba2bc0f8aa3db6c272902e66d598f1..78542c7bdab6d556296b161b827ecb5c85137b9d 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property3-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property3-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected modifier [test-ts-parameter-property3.ts:2:26] +SyntaxError: Unexpected modifier [test-ts-parameter-property3.ts:18:26] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property4-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property4-expected.txt index 8aaa1f3ea06c2169b7aaeaa4c50c0ee9173c999c..8b86d684f507c01000b3f95834de65a1fe666343 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property4-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property4-expected.txt @@ -1 +1 @@ -SyntaxError: 'static' modifier cannot appear on a parameter. [test-ts-parameter-property4.ts:2:25] +SyntaxError: 'static' modifier cannot appear on a parameter. [test-ts-parameter-property4.ts:18:25] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property5-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property5-expected.txt index 056434a4e79f36d4f0b856e96c7a25980726e95d..fab0ce4a19dac2b48b131abba2a64bbd6723127a 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property5-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property5-expected.txt @@ -1 +1 @@ -SyntaxError: 'async' modifier cannot appear on a parameter. [test-ts-parameter-property5.ts:2:25] +SyntaxError: 'async' modifier cannot appear on a parameter. [test-ts-parameter-property5.ts:18:25] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property6-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property6-expected.txt index 41f525a299f1f907b490847c1abc70fd01f346e1..cb4cb24ad1b8b5ad01afea0adb1f87be45f82971 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property6-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property6-expected.txt @@ -1 +1 @@ -SyntaxError: 'declare' modifier cannot appear on a parameter. [test-ts-parameter-property6.ts:2:25] +SyntaxError: 'declare' modifier cannot appear on a parameter. [test-ts-parameter-property6.ts:18:25] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property7-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property7-expected.txt index 5522cad32b6c95f418519060dc3cdc82da2d4271..f6e3ca122428b63c18b32870c29e45904a52c707 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property7-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property7-expected.txt @@ -1 +1 @@ -SyntaxError: Strict mode function may not have duplicate parameter names [test-ts-parameter-property7.ts:2:61] +SyntaxError: Variable 'readonly' has already been declared. [test-ts-parameter-property7.ts:18:44] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property8-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property8-expected.txt index ab7edd86b2b4741e1e1c90a309e198e25412762e..c47c4b8474af3ba4dc51c5a7c20a42c604ae040d 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property8-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property8-expected.txt @@ -1 +1 @@ -SyntaxError: A parameter property cannot be declared using a rest parameter. [test-ts-parameter-property8.ts:2:17] +SyntaxError: A parameter property cannot be declared using a rest parameter. [test-ts-parameter-property8.ts:18:17] diff --git a/es2panda/test/parser/ts/test-ts-parameter-property9-expected.txt b/es2panda/test/parser/ts/test-ts-parameter-property9-expected.txt index f14f80feb3b71d9817d0a2ed9c5c4fc4ef9927fd..b84dbc445f02e538c26a33fe4fc7cbb6b15e7f18 100644 --- a/es2panda/test/parser/ts/test-ts-parameter-property9-expected.txt +++ b/es2panda/test/parser/ts/test-ts-parameter-property9-expected.txt @@ -1 +1 @@ -SyntaxError: A parameter property may not be declared using a binding pattern. [test-ts-parameter-property9.ts:2:17] +SyntaxError: A parameter property may not be declared using a binding pattern. [test-ts-parameter-property9.ts:18:17] diff --git a/es2panda/test/parser/ts/test-ts-type-assertion-expected.txt b/es2panda/test/parser/ts/test-ts-type-assertion-expected.txt index 50d4c5cf5b02ecf1d87b44ab3dd2a3fc5d2830e7..8d6e5575e97fa6ee5f8a8016a7d79a6601b71147 100644 --- a/es2panda/test/parser/ts/test-ts-type-assertion-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-assertion-expected.txt @@ -8,11 +8,11 @@ "body": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -23,11 +23,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -35,11 +35,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -56,11 +56,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -68,11 +68,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -80,11 +80,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 8 } } @@ -93,11 +93,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -113,11 +113,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 8 } } @@ -128,11 +128,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 18 } } @@ -143,33 +143,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 20 }, "end": { - "line": 3, + "line": 19, "column": 23 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 24 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -178,11 +178,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -198,11 +198,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 8 } } @@ -217,22 +217,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 13 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 12 }, "end": { - "line": 4, + "line": 20, "column": 13 } } @@ -243,33 +243,33 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 15 }, "end": { - "line": 4, + "line": 20, "column": 18 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 19 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 19 } } @@ -278,11 +278,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 19 } } @@ -294,7 +294,7 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 19 } } diff --git a/es2panda/test/parser/ts/test-ts-type-predicate-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate-expected.txt index 913f9f148806f114459d83328c273b2d8b2155bd..6089b569b70735907d56228deb5692fabf2123e9 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -34,11 +34,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 32 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 38 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -89,11 +89,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 49 }, "end": { - "line": 1, + "line": 17, "column": 50 } } @@ -102,11 +102,11 @@ "asserts": true, "loc": { "start": { - "line": 1, + "line": 17, "column": 41 }, "end": { - "line": 1, + "line": 17, "column": 50 } } @@ -119,11 +119,11 @@ "argument": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 59 } } @@ -131,33 +131,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 51 }, "end": { - "line": 1, + "line": 17, "column": 61 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 61 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 61 } } @@ -166,11 +166,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 1, + "line": 17, "column": 61 }, "end": { - "line": 1, + "line": 17, "column": 62 } } @@ -196,11 +196,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -209,11 +209,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -221,11 +221,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 30 } } @@ -233,11 +233,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 13 } } @@ -251,11 +251,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 43 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -264,22 +264,22 @@ "asserts": true, "loc": { "start": { - "line": 2, + "line": 18, "column": 35 }, "end": { - "line": 2, + "line": 18, "column": 44 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 11 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -287,11 +287,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -299,11 +299,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -312,11 +312,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 45 } } @@ -339,11 +339,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -352,11 +352,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 18 }, "end": { - "line": 4, + "line": 20, "column": 24 } } @@ -364,11 +364,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 24 } } @@ -376,11 +376,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 6 }, "end": { - "line": 4, + "line": 20, "column": 7 } } @@ -394,11 +394,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 35 }, "end": { - "line": 4, + "line": 20, "column": 36 } } @@ -407,22 +407,22 @@ "asserts": true, "loc": { "start": { - "line": 4, + "line": 20, "column": 27 }, "end": { - "line": 4, + "line": 20, "column": 36 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 37 } } @@ -440,11 +440,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -453,11 +453,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 5, + "line": 21, "column": 24 } } @@ -465,11 +465,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 24 } } @@ -477,11 +477,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -493,11 +493,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 5, + "line": 21, "column": 35 }, "end": { - "line": 5, + "line": 21, "column": 39 } } @@ -506,22 +506,22 @@ "asserts": true, "loc": { "start": { - "line": 5, + "line": 21, "column": 27 }, "end": { - "line": 5, + "line": 21, "column": 39 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 40 } } @@ -529,11 +529,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 22 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -544,11 +544,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -556,11 +556,11 @@ "extends": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -575,11 +575,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 10 }, "end": { - "line": 8, + "line": 24, "column": 19 } } @@ -598,11 +598,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 35 } } @@ -611,11 +611,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 38 }, "end": { - "line": 8, + "line": 24, "column": 44 } } @@ -623,11 +623,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 44 } } @@ -635,11 +635,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 20 }, "end": { - "line": 8, + "line": 24, "column": 27 } } @@ -653,11 +653,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 47 }, "end": { - "line": 8, + "line": 24, "column": 54 } } @@ -666,11 +666,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 58 }, "end": { - "line": 8, + "line": 24, "column": 64 } } @@ -678,11 +678,11 @@ "asserts": false, "loc": { "start": { - "line": 8, + "line": 24, "column": 47 }, "end": { - "line": 8, + "line": 24, "column": 64 } } @@ -695,11 +695,11 @@ "argument": null, "loc": { "start": { - "line": 8, + "line": 24, "column": 67 }, "end": { - "line": 8, + "line": 24, "column": 73 } } @@ -707,33 +707,33 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 65 }, "end": { - "line": 8, + "line": 24, "column": 75 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 75 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 75 } } @@ -742,11 +742,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 8, + "line": 24, "column": 75 }, "end": { - "line": 8, + "line": 24, "column": 76 } } @@ -772,11 +772,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 21 }, "end": { - "line": 9, + "line": 25, "column": 27 } } @@ -785,11 +785,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 30 }, "end": { - "line": 9, + "line": 25, "column": 36 } } @@ -797,11 +797,11 @@ ], "loc": { "start": { - "line": 9, + "line": 25, "column": 21 }, "end": { - "line": 9, + "line": 25, "column": 36 } } @@ -809,11 +809,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 12 }, "end": { - "line": 9, + "line": 25, "column": 19 } } @@ -827,11 +827,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 41 }, "end": { - "line": 9, + "line": 25, "column": 48 } } @@ -840,11 +840,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 52 }, "end": { - "line": 9, + "line": 25, "column": 58 } } @@ -852,22 +852,22 @@ "asserts": false, "loc": { "start": { - "line": 9, + "line": 25, "column": 41 }, "end": { - "line": 9, + "line": 25, "column": 58 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 11 }, "end": { - "line": 9, + "line": 25, "column": 58 } } @@ -875,11 +875,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 9 } } @@ -887,11 +887,11 @@ "init": null, "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 9 } } @@ -900,11 +900,11 @@ "kind": "var", "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 59 } } @@ -925,11 +925,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -938,22 +938,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 14 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 15 } } @@ -971,11 +971,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 21 } } @@ -984,11 +984,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 24 }, "end": { - "line": 12, + "line": 28, "column": 30 } } @@ -996,11 +996,11 @@ ], "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 30 } } @@ -1008,11 +1008,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 6 }, "end": { - "line": 12, + "line": 28, "column": 13 } } @@ -1026,11 +1026,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 33 }, "end": { - "line": 12, + "line": 28, "column": 40 } } @@ -1039,11 +1039,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 44 }, "end": { - "line": 12, + "line": 28, "column": 50 } } @@ -1051,22 +1051,22 @@ "asserts": false, "loc": { "start": { - "line": 12, + "line": 28, "column": 33 }, "end": { - "line": 12, + "line": 28, "column": 50 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 51 } } @@ -1091,11 +1091,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 18 } } @@ -1107,11 +1107,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 20 }, "end": { - "line": 13, + "line": 29, "column": 26 } } @@ -1120,11 +1120,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 29 }, "end": { - "line": 13, + "line": 29, "column": 35 } } @@ -1132,22 +1132,22 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 20 }, "end": { - "line": 13, + "line": 29, "column": 35 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 17 }, "end": { - "line": 13, + "line": 29, "column": 37 } } @@ -1155,11 +1155,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 15 }, "end": { - "line": 13, + "line": 29, "column": 37 } } @@ -1167,11 +1167,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 6 }, "end": { - "line": 13, + "line": 29, "column": 13 } } @@ -1185,11 +1185,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 40 }, "end": { - "line": 13, + "line": 29, "column": 47 } } @@ -1198,11 +1198,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 13, + "line": 29, "column": 51 }, "end": { - "line": 13, + "line": 29, "column": 55 } } @@ -1210,22 +1210,22 @@ "asserts": false, "loc": { "start": { - "line": 13, + "line": 29, "column": 40 }, "end": { - "line": 13, + "line": 29, "column": 55 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 56 } } @@ -1233,11 +1233,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 22 }, "end": { - "line": 14, + "line": 30, "column": 2 } } @@ -1248,11 +1248,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 11 }, "end": { - "line": 10, + "line": 26, "column": 21 } } @@ -1260,11 +1260,11 @@ "extends": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 2 } } @@ -1279,11 +1279,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 10 }, "end": { - "line": 16, + "line": 32, "column": 19 } } @@ -1302,11 +1302,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 24 }, "end": { - "line": 16, + "line": 32, "column": 30 } } @@ -1315,11 +1315,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 33 }, "end": { - "line": 16, + "line": 32, "column": 39 } } @@ -1327,11 +1327,11 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 24 }, "end": { - "line": 16, + "line": 32, "column": 39 } } @@ -1339,11 +1339,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 20 }, "end": { - "line": 16, + "line": 32, "column": 22 } } @@ -1357,11 +1357,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 42 }, "end": { - "line": 16, + "line": 32, "column": 44 } } @@ -1370,11 +1370,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 48 }, "end": { - "line": 16, + "line": 32, "column": 54 } } @@ -1382,11 +1382,11 @@ "asserts": false, "loc": { "start": { - "line": 16, + "line": 32, "column": 42 }, "end": { - "line": 16, + "line": 32, "column": 54 } } @@ -1399,11 +1399,11 @@ "argument": null, "loc": { "start": { - "line": 16, + "line": 32, "column": 57 }, "end": { - "line": 16, + "line": 32, "column": 63 } } @@ -1411,33 +1411,33 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 55 }, "end": { - "line": 16, + "line": 32, "column": 65 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 65 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 65 } } @@ -1446,11 +1446,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 16, + "line": 32, "column": 65 }, "end": { - "line": 16, + "line": 32, "column": 66 } } @@ -1476,11 +1476,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 16 }, "end": { - "line": 17, + "line": 33, "column": 22 } } @@ -1489,11 +1489,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 25 }, "end": { - "line": 17, + "line": 33, "column": 31 } } @@ -1501,11 +1501,11 @@ ], "loc": { "start": { - "line": 17, + "line": 33, "column": 16 }, "end": { - "line": 17, + "line": 33, "column": 31 } } @@ -1513,11 +1513,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 12 }, "end": { - "line": 17, + "line": 33, "column": 14 } } @@ -1531,11 +1531,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 36 }, "end": { - "line": 17, + "line": 33, "column": 38 } } @@ -1544,11 +1544,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 42 }, "end": { - "line": 17, + "line": 33, "column": 48 } } @@ -1556,22 +1556,22 @@ "asserts": false, "loc": { "start": { - "line": 17, + "line": 33, "column": 36 }, "end": { - "line": 17, + "line": 33, "column": 48 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 11 }, "end": { - "line": 17, + "line": 33, "column": 48 } } @@ -1579,11 +1579,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 9 } } @@ -1591,11 +1591,11 @@ "init": null, "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 9 } } @@ -1604,11 +1604,11 @@ "kind": "var", "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 49 } } @@ -1629,11 +1629,11 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 19, + "line": 35, "column": 6 } } @@ -1642,22 +1642,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 19, + "line": 35, "column": 8 }, "end": { - "line": 19, + "line": 35, "column": 14 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 19, + "line": 35, "column": 15 } } @@ -1675,11 +1675,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 10 }, "end": { - "line": 20, + "line": 36, "column": 16 } } @@ -1688,11 +1688,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 19 }, "end": { - "line": 20, + "line": 36, "column": 25 } } @@ -1700,11 +1700,11 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 10 }, "end": { - "line": 20, + "line": 36, "column": 25 } } @@ -1712,11 +1712,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 6 }, "end": { - "line": 20, + "line": 36, "column": 8 } } @@ -1730,11 +1730,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 28 }, "end": { - "line": 20, + "line": 36, "column": 30 } } @@ -1743,11 +1743,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 34 }, "end": { - "line": 20, + "line": 36, "column": 40 } } @@ -1755,22 +1755,22 @@ "asserts": false, "loc": { "start": { - "line": 20, + "line": 36, "column": 28 }, "end": { - "line": 20, + "line": 36, "column": 40 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 41 } } @@ -1795,11 +1795,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 12 }, "end": { - "line": 21, + "line": 37, "column": 13 } } @@ -1811,11 +1811,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 15 }, "end": { - "line": 21, + "line": 37, "column": 21 } } @@ -1824,11 +1824,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 24 }, "end": { - "line": 21, + "line": 37, "column": 30 } } @@ -1836,22 +1836,22 @@ ], "loc": { "start": { - "line": 21, + "line": 37, "column": 15 }, "end": { - "line": 21, + "line": 37, "column": 30 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 12 }, "end": { - "line": 21, + "line": 37, "column": 32 } } @@ -1859,11 +1859,11 @@ ], "loc": { "start": { - "line": 21, + "line": 37, "column": 10 }, "end": { - "line": 21, + "line": 37, "column": 32 } } @@ -1871,11 +1871,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 6 }, "end": { - "line": 21, + "line": 37, "column": 8 } } @@ -1889,11 +1889,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 35 }, "end": { - "line": 21, + "line": 37, "column": 37 } } @@ -1902,11 +1902,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 21, + "line": 37, "column": 41 }, "end": { - "line": 21, + "line": 37, "column": 45 } } @@ -1914,22 +1914,22 @@ "asserts": false, "loc": { "start": { - "line": 21, + "line": 37, "column": 35 }, "end": { - "line": 21, + "line": 37, "column": 45 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 46 } } @@ -1937,11 +1937,11 @@ ], "loc": { "start": { - "line": 18, + "line": 34, "column": 22 }, "end": { - "line": 22, + "line": 38, "column": 2 } } @@ -1952,11 +1952,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 11 }, "end": { - "line": 18, + "line": 34, "column": 21 } } @@ -1964,11 +1964,11 @@ "extends": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 2 } } @@ -1983,11 +1983,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 10 }, "end": { - "line": 24, + "line": 40, "column": 19 } } @@ -2006,11 +2006,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 24, + "line": 40, "column": 23 }, "end": { - "line": 24, + "line": 40, "column": 29 } } @@ -2019,11 +2019,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 24, + "line": 40, "column": 32 }, "end": { - "line": 24, + "line": 40, "column": 38 } } @@ -2031,11 +2031,11 @@ ], "loc": { "start": { - "line": 24, + "line": 40, "column": 23 }, "end": { - "line": 24, + "line": 40, "column": 38 } } @@ -2043,11 +2043,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 20 }, "end": { - "line": 24, + "line": 40, "column": 21 } } @@ -2061,11 +2061,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 41 }, "end": { - "line": 24, + "line": 40, "column": 42 } } @@ -2074,11 +2074,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 24, + "line": 40, "column": 46 }, "end": { - "line": 24, + "line": 40, "column": 52 } } @@ -2086,11 +2086,11 @@ "asserts": false, "loc": { "start": { - "line": 24, + "line": 40, "column": 41 }, "end": { - "line": 24, + "line": 40, "column": 52 } } @@ -2103,11 +2103,11 @@ "argument": null, "loc": { "start": { - "line": 24, + "line": 40, "column": 55 }, "end": { - "line": 24, + "line": 40, "column": 61 } } @@ -2115,33 +2115,33 @@ ], "loc": { "start": { - "line": 24, + "line": 40, "column": 53 }, "end": { - "line": 24, + "line": 40, "column": 63 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 63 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 63 } } @@ -2150,11 +2150,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 24, + "line": 40, "column": 63 }, "end": { - "line": 24, + "line": 40, "column": 64 } } @@ -2180,11 +2180,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 15 }, "end": { - "line": 25, + "line": 41, "column": 21 } } @@ -2193,11 +2193,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 24 }, "end": { - "line": 25, + "line": 41, "column": 30 } } @@ -2205,11 +2205,11 @@ ], "loc": { "start": { - "line": 25, + "line": 41, "column": 15 }, "end": { - "line": 25, + "line": 41, "column": 30 } } @@ -2217,11 +2217,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 12 }, "end": { - "line": 25, + "line": 41, "column": 13 } } @@ -2235,11 +2235,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 35 }, "end": { - "line": 25, + "line": 41, "column": 36 } } @@ -2248,11 +2248,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 40 }, "end": { - "line": 25, + "line": 41, "column": 46 } } @@ -2260,22 +2260,22 @@ "asserts": false, "loc": { "start": { - "line": 25, + "line": 41, "column": 35 }, "end": { - "line": 25, + "line": 41, "column": 46 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 11 }, "end": { - "line": 25, + "line": 41, "column": 46 } } @@ -2283,11 +2283,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 9 } } @@ -2295,11 +2295,11 @@ "init": null, "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 9 } } @@ -2308,11 +2308,11 @@ "kind": "var", "loc": { "start": { - "line": 25, + "line": 41, "column": 1 }, "end": { - "line": 25, + "line": 41, "column": 47 } } @@ -2333,11 +2333,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 5 }, "end": { - "line": 27, + "line": 43, "column": 6 } } @@ -2346,22 +2346,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 27, + "line": 43, "column": 8 }, "end": { - "line": 27, + "line": 43, "column": 14 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 5 }, "end": { - "line": 27, + "line": 43, "column": 15 } } @@ -2379,11 +2379,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 28, + "line": 44, "column": 9 }, "end": { - "line": 28, + "line": 44, "column": 15 } } @@ -2392,11 +2392,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 28, + "line": 44, "column": 18 }, "end": { - "line": 28, + "line": 44, "column": 24 } } @@ -2404,11 +2404,11 @@ ], "loc": { "start": { - "line": 28, + "line": 44, "column": 9 }, "end": { - "line": 28, + "line": 44, "column": 24 } } @@ -2416,11 +2416,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 6 }, "end": { - "line": 28, + "line": 44, "column": 7 } } @@ -2434,11 +2434,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 27 }, "end": { - "line": 28, + "line": 44, "column": 28 } } @@ -2447,11 +2447,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 28, + "line": 44, "column": 32 }, "end": { - "line": 28, + "line": 44, "column": 38 } } @@ -2459,22 +2459,22 @@ "asserts": false, "loc": { "start": { - "line": 28, + "line": 44, "column": 27 }, "end": { - "line": 28, + "line": 44, "column": 38 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 5 }, "end": { - "line": 28, + "line": 44, "column": 39 } } @@ -2499,11 +2499,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 11 }, "end": { - "line": 29, + "line": 45, "column": 12 } } @@ -2515,11 +2515,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 14 }, "end": { - "line": 29, + "line": 45, "column": 20 } } @@ -2528,11 +2528,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 23 }, "end": { - "line": 29, + "line": 45, "column": 29 } } @@ -2540,22 +2540,22 @@ ], "loc": { "start": { - "line": 29, + "line": 45, "column": 14 }, "end": { - "line": 29, + "line": 45, "column": 29 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 11 }, "end": { - "line": 29, + "line": 45, "column": 31 } } @@ -2563,11 +2563,11 @@ ], "loc": { "start": { - "line": 29, + "line": 45, "column": 9 }, "end": { - "line": 29, + "line": 45, "column": 31 } } @@ -2575,11 +2575,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 6 }, "end": { - "line": 29, + "line": 45, "column": 7 } } @@ -2593,11 +2593,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 34 }, "end": { - "line": 29, + "line": 45, "column": 35 } } @@ -2606,11 +2606,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 29, + "line": 45, "column": 39 }, "end": { - "line": 29, + "line": 45, "column": 43 } } @@ -2618,22 +2618,22 @@ "asserts": false, "loc": { "start": { - "line": 29, + "line": 45, "column": 34 }, "end": { - "line": 29, + "line": 45, "column": 43 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 44 } } @@ -2641,11 +2641,11 @@ ], "loc": { "start": { - "line": 26, + "line": 42, "column": 22 }, "end": { - "line": 30, + "line": 46, "column": 2 } } @@ -2656,11 +2656,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 11 }, "end": { - "line": 26, + "line": 42, "column": 21 } } @@ -2668,11 +2668,11 @@ "extends": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 2 } } @@ -2687,11 +2687,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 10 }, "end": { - "line": 32, + "line": 48, "column": 19 } } @@ -2710,11 +2710,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 23 }, "end": { - "line": 32, + "line": 48, "column": 29 } } @@ -2723,11 +2723,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 32 }, "end": { - "line": 32, + "line": 48, "column": 38 } } @@ -2735,11 +2735,11 @@ ], "loc": { "start": { - "line": 32, + "line": 48, "column": 23 }, "end": { - "line": 32, + "line": 48, "column": 38 } } @@ -2747,11 +2747,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 20 }, "end": { - "line": 32, + "line": 48, "column": 21 } } @@ -2765,11 +2765,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 49 }, "end": { - "line": 32, + "line": 48, "column": 50 } } @@ -2778,11 +2778,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 54 }, "end": { - "line": 32, + "line": 48, "column": 60 } } @@ -2790,11 +2790,11 @@ "asserts": true, "loc": { "start": { - "line": 32, + "line": 48, "column": 41 }, "end": { - "line": 32, + "line": 48, "column": 60 } } @@ -2807,11 +2807,11 @@ "argument": null, "loc": { "start": { - "line": 32, + "line": 48, "column": 63 }, "end": { - "line": 32, + "line": 48, "column": 69 } } @@ -2819,33 +2819,33 @@ ], "loc": { "start": { - "line": 32, + "line": 48, "column": 61 }, "end": { - "line": 32, + "line": 48, "column": 71 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 1 }, "end": { - "line": 32, + "line": 48, "column": 71 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 1 }, "end": { - "line": 32, + "line": 48, "column": 71 } } @@ -2854,11 +2854,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 32, + "line": 48, "column": 71 }, "end": { - "line": 32, + "line": 48, "column": 72 } } @@ -2884,11 +2884,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 15 }, "end": { - "line": 33, + "line": 49, "column": 21 } } @@ -2897,11 +2897,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 24 }, "end": { - "line": 33, + "line": 49, "column": 30 } } @@ -2909,11 +2909,11 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 15 }, "end": { - "line": 33, + "line": 49, "column": 30 } } @@ -2921,11 +2921,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 12 }, "end": { - "line": 33, + "line": 49, "column": 13 } } @@ -2939,11 +2939,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 43 }, "end": { - "line": 33, + "line": 49, "column": 44 } } @@ -2952,11 +2952,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 33, + "line": 49, "column": 48 }, "end": { - "line": 33, + "line": 49, "column": 54 } } @@ -2964,22 +2964,22 @@ "asserts": true, "loc": { "start": { - "line": 33, + "line": 49, "column": 35 }, "end": { - "line": 33, + "line": 49, "column": 54 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 11 }, "end": { - "line": 33, + "line": 49, "column": 54 } } @@ -2987,11 +2987,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, + "line": 49, "column": 9 } } @@ -2999,11 +2999,11 @@ "init": null, "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, + "line": 49, "column": 9 } } @@ -3012,11 +3012,11 @@ "kind": "var", "loc": { "start": { - "line": 33, + "line": 49, "column": 1 }, "end": { - "line": 33, + "line": 49, "column": 55 } } @@ -3037,11 +3037,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 6 } } @@ -3050,22 +3050,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 8 }, "end": { - "line": 35, + "line": 51, "column": 14 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 15 } } @@ -3083,11 +3083,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 9 }, "end": { - "line": 36, + "line": 52, "column": 15 } } @@ -3096,11 +3096,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 18 }, "end": { - "line": 36, + "line": 52, "column": 24 } } @@ -3108,11 +3108,11 @@ ], "loc": { "start": { - "line": 36, + "line": 52, "column": 9 }, "end": { - "line": 36, + "line": 52, "column": 24 } } @@ -3120,11 +3120,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 6 }, "end": { - "line": 36, + "line": 52, "column": 7 } } @@ -3138,11 +3138,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 35 }, "end": { - "line": 36, + "line": 52, "column": 36 } } @@ -3151,11 +3151,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 40 }, "end": { - "line": 36, + "line": 52, "column": 46 } } @@ -3163,22 +3163,22 @@ "asserts": true, "loc": { "start": { - "line": 36, + "line": 52, "column": 27 }, "end": { - "line": 36, + "line": 52, "column": 46 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 5 }, "end": { - "line": 36, + "line": 52, "column": 47 } } @@ -3203,11 +3203,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 11 }, "end": { - "line": 37, + "line": 53, "column": 12 } } @@ -3219,11 +3219,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 14 }, "end": { - "line": 37, + "line": 53, "column": 20 } } @@ -3232,11 +3232,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 23 }, "end": { - "line": 37, + "line": 53, "column": 29 } } @@ -3244,22 +3244,22 @@ ], "loc": { "start": { - "line": 37, + "line": 53, "column": 14 }, "end": { - "line": 37, + "line": 53, "column": 29 } } }, "loc": { "start": { - "line": 37, + "line": 53, "column": 11 }, "end": { - "line": 37, + "line": 53, "column": 31 } } @@ -3267,11 +3267,11 @@ ], "loc": { "start": { - "line": 37, + "line": 53, "column": 9 }, "end": { - "line": 37, + "line": 53, "column": 31 } } @@ -3279,11 +3279,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 6 }, "end": { - "line": 37, + "line": 53, "column": 7 } } @@ -3297,11 +3297,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 42 }, "end": { - "line": 37, + "line": 53, "column": 43 } } @@ -3310,11 +3310,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 37, + "line": 53, "column": 47 }, "end": { - "line": 37, + "line": 53, "column": 51 } } @@ -3322,22 +3322,22 @@ "asserts": true, "loc": { "start": { - "line": 37, + "line": 53, "column": 34 }, "end": { - "line": 37, + "line": 53, "column": 51 } } }, "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 52 } } @@ -3345,11 +3345,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 22 }, "end": { - "line": 38, + "line": 54, "column": 2 } } @@ -3360,11 +3360,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 11 }, "end": { - "line": 34, + "line": 50, "column": 21 } } @@ -3372,11 +3372,11 @@ "extends": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 2 } } @@ -3391,11 +3391,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 10 }, "end": { - "line": 40, + "line": 56, "column": 19 } } @@ -3414,11 +3414,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 40, + "line": 56, "column": 29 }, "end": { - "line": 40, + "line": 56, "column": 35 } } @@ -3427,11 +3427,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 40, + "line": 56, "column": 38 }, "end": { - "line": 40, + "line": 56, "column": 44 } } @@ -3439,11 +3439,11 @@ ], "loc": { "start": { - "line": 40, + "line": 56, "column": 29 }, "end": { - "line": 40, + "line": 56, "column": 44 } } @@ -3451,11 +3451,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 20 }, "end": { - "line": 40, + "line": 56, "column": 27 } } @@ -3469,11 +3469,11 @@ "decorators": [], "loc": { "start": { - "line": 40, + "line": 56, "column": 55 }, "end": { - "line": 40, + "line": 56, "column": 62 } } @@ -3482,11 +3482,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 40, + "line": 56, "column": 66 }, "end": { - "line": 40, + "line": 56, "column": 72 } } @@ -3494,11 +3494,11 @@ "asserts": true, "loc": { "start": { - "line": 40, + "line": 56, "column": 47 }, "end": { - "line": 40, + "line": 56, "column": 72 } } @@ -3511,11 +3511,11 @@ "argument": null, "loc": { "start": { - "line": 40, + "line": 56, "column": 75 }, "end": { - "line": 40, + "line": 56, "column": 81 } } @@ -3523,33 +3523,33 @@ ], "loc": { "start": { - "line": 40, + "line": 56, "column": 73 }, "end": { - "line": 40, + "line": 56, "column": 83 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 83 } } }, "loc": { "start": { - "line": 40, + "line": 56, "column": 1 }, "end": { - "line": 40, + "line": 56, "column": 83 } } @@ -3558,11 +3558,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 40, + "line": 56, "column": 83 }, "end": { - "line": 40, + "line": 56, "column": 84 } } @@ -3588,11 +3588,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 41, + "line": 57, "column": 21 }, "end": { - "line": 41, + "line": 57, "column": 27 } } @@ -3601,11 +3601,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 41, + "line": 57, "column": 30 }, "end": { - "line": 41, + "line": 57, "column": 36 } } @@ -3613,11 +3613,11 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 21 }, "end": { - "line": 41, + "line": 57, "column": 36 } } @@ -3625,11 +3625,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 12 }, "end": { - "line": 41, + "line": 57, "column": 19 } } @@ -3643,11 +3643,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 49 }, "end": { - "line": 41, + "line": 57, "column": 56 } } @@ -3656,11 +3656,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 41, + "line": 57, "column": 60 }, "end": { - "line": 41, + "line": 57, "column": 66 } } @@ -3668,22 +3668,22 @@ "asserts": true, "loc": { "start": { - "line": 41, + "line": 57, "column": 41 }, "end": { - "line": 41, + "line": 57, "column": 66 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 11 }, "end": { - "line": 41, + "line": 57, "column": 66 } } @@ -3691,11 +3691,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 5 }, "end": { - "line": 41, + "line": 57, "column": 9 } } @@ -3703,11 +3703,11 @@ "init": null, "loc": { "start": { - "line": 41, + "line": 57, "column": 5 }, "end": { - "line": 41, + "line": 57, "column": 9 } } @@ -3716,11 +3716,11 @@ "kind": "var", "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 41, + "line": 57, "column": 67 } } @@ -3741,11 +3741,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 5 }, "end": { - "line": 43, + "line": 59, "column": 6 } } @@ -3754,22 +3754,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 43, + "line": 59, "column": 8 }, "end": { - "line": 43, + "line": 59, "column": 14 } } }, "loc": { "start": { - "line": 43, + "line": 59, "column": 5 }, "end": { - "line": 43, + "line": 59, "column": 15 } } @@ -3787,11 +3787,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 15 }, "end": { - "line": 44, + "line": 60, "column": 21 } } @@ -3800,11 +3800,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 24 }, "end": { - "line": 44, + "line": 60, "column": 30 } } @@ -3812,11 +3812,11 @@ ], "loc": { "start": { - "line": 44, + "line": 60, "column": 15 }, "end": { - "line": 44, + "line": 60, "column": 30 } } @@ -3824,11 +3824,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 6 }, "end": { - "line": 44, + "line": 60, "column": 13 } } @@ -3842,11 +3842,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 41 }, "end": { - "line": 44, + "line": 60, "column": 48 } } @@ -3855,11 +3855,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 44, + "line": 60, "column": 52 }, "end": { - "line": 44, + "line": 60, "column": 58 } } @@ -3867,22 +3867,22 @@ "asserts": true, "loc": { "start": { - "line": 44, + "line": 60, "column": 33 }, "end": { - "line": 44, + "line": 60, "column": 58 } } }, "loc": { "start": { - "line": 44, + "line": 60, "column": 5 }, "end": { - "line": 44, + "line": 60, "column": 59 } } @@ -3907,11 +3907,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 17 }, "end": { - "line": 45, + "line": 61, "column": 18 } } @@ -3923,11 +3923,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 45, + "line": 61, "column": 20 }, "end": { - "line": 45, + "line": 61, "column": 26 } } @@ -3936,11 +3936,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 45, + "line": 61, "column": 29 }, "end": { - "line": 45, + "line": 61, "column": 35 } } @@ -3948,22 +3948,22 @@ ], "loc": { "start": { - "line": 45, + "line": 61, "column": 20 }, "end": { - "line": 45, + "line": 61, "column": 35 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 17 }, "end": { - "line": 45, + "line": 61, "column": 37 } } @@ -3971,11 +3971,11 @@ ], "loc": { "start": { - "line": 45, + "line": 61, "column": 15 }, "end": { - "line": 45, + "line": 61, "column": 37 } } @@ -3983,11 +3983,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 6 }, "end": { - "line": 45, + "line": 61, "column": 13 } } @@ -4001,11 +4001,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 48 }, "end": { - "line": 45, + "line": 61, "column": 55 } } @@ -4014,11 +4014,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 45, + "line": 61, "column": 59 }, "end": { - "line": 45, + "line": 61, "column": 63 } } @@ -4026,22 +4026,22 @@ "asserts": true, "loc": { "start": { - "line": 45, + "line": 61, "column": 40 }, "end": { - "line": 45, + "line": 61, "column": 63 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 64 } } @@ -4049,11 +4049,11 @@ ], "loc": { "start": { - "line": 42, + "line": 58, "column": 22 }, "end": { - "line": 46, + "line": 62, "column": 2 } } @@ -4064,11 +4064,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 11 }, "end": { - "line": 42, + "line": 58, "column": 21 } } @@ -4076,11 +4076,11 @@ "extends": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 1 }, "end": { - "line": 46, + "line": 62, "column": 2 } } @@ -4093,11 +4093,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 6 }, "end": { - "line": 48, + "line": 64, "column": 8 } } @@ -4109,11 +4109,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 48, + "line": 64, "column": 11 }, "end": { - "line": 48, + "line": 64, "column": 17 } } @@ -4122,11 +4122,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 48, + "line": 64, "column": 20 }, "end": { - "line": 48, + "line": 64, "column": 26 } } @@ -4135,11 +4135,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 48, + "line": 64, "column": 29 }, "end": { - "line": 48, + "line": 64, "column": 36 } } @@ -4147,22 +4147,22 @@ ], "loc": { "start": { - "line": 48, + "line": 64, "column": 11 }, "end": { - "line": 48, + "line": 64, "column": 36 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 37 } } @@ -4171,11 +4171,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 48, + "line": 64, "column": 36 }, "end": { - "line": 48, + "line": 64, "column": 37 } } @@ -4190,11 +4190,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 10 }, "end": { - "line": 50, + "line": 66, "column": 19 } } @@ -4213,11 +4213,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 50, + "line": 66, "column": 24 }, "end": { - "line": 50, + "line": 66, "column": 30 } } @@ -4226,11 +4226,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 50, + "line": 66, "column": 33 }, "end": { - "line": 50, + "line": 66, "column": 39 } } @@ -4243,22 +4243,22 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 42 }, "end": { - "line": 50, + "line": 66, "column": 44 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 42 }, "end": { - "line": 50, + "line": 66, "column": 44 } } @@ -4266,11 +4266,11 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 24 }, "end": { - "line": 50, + "line": 66, "column": 44 } } @@ -4278,11 +4278,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 20 }, "end": { - "line": 50, + "line": 66, "column": 22 } } @@ -4296,11 +4296,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 47 }, "end": { - "line": 50, + "line": 66, "column": 49 } } @@ -4313,22 +4313,22 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 53 }, "end": { - "line": 50, + "line": 66, "column": 55 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 53 }, "end": { - "line": 50, + "line": 66, "column": 55 } } @@ -4336,11 +4336,11 @@ "asserts": false, "loc": { "start": { - "line": 50, + "line": 66, "column": 47 }, "end": { - "line": 50, + "line": 66, "column": 55 } } @@ -4353,11 +4353,11 @@ "argument": null, "loc": { "start": { - "line": 50, + "line": 66, "column": 58 }, "end": { - "line": 50, + "line": 66, "column": 64 } } @@ -4365,33 +4365,33 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 56 }, "end": { - "line": 50, + "line": 66, "column": 66 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 1 }, "end": { - "line": 50, + "line": 66, "column": 66 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 1 }, "end": { - "line": 50, + "line": 66, "column": 66 } } @@ -4400,11 +4400,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 50, + "line": 66, "column": 66 }, "end": { - "line": 50, + "line": 66, "column": 67 } } @@ -4430,11 +4430,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 51, + "line": 67, "column": 16 }, "end": { - "line": 51, + "line": 67, "column": 22 } } @@ -4443,11 +4443,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 51, + "line": 67, "column": 25 }, "end": { - "line": 51, + "line": 67, "column": 31 } } @@ -4460,22 +4460,22 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 34 }, "end": { - "line": 51, + "line": 67, "column": 36 } } }, "loc": { "start": { - "line": 51, + "line": 67, "column": 34 }, "end": { - "line": 51, + "line": 67, "column": 36 } } @@ -4483,11 +4483,11 @@ ], "loc": { "start": { - "line": 51, + "line": 67, "column": 16 }, "end": { - "line": 51, + "line": 67, "column": 36 } } @@ -4495,11 +4495,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 12 }, "end": { - "line": 51, + "line": 67, "column": 14 } } @@ -4513,11 +4513,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 41 }, "end": { - "line": 51, + "line": 67, "column": 43 } } @@ -4530,22 +4530,22 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 47 }, "end": { - "line": 51, + "line": 67, "column": 49 } } }, "loc": { "start": { - "line": 51, + "line": 67, "column": 47 }, "end": { - "line": 51, + "line": 67, "column": 49 } } @@ -4553,22 +4553,22 @@ "asserts": false, "loc": { "start": { - "line": 51, + "line": 67, "column": 41 }, "end": { - "line": 51, + "line": 67, "column": 49 } } }, "loc": { "start": { - "line": 51, + "line": 67, "column": 11 }, "end": { - "line": 51, + "line": 67, "column": 49 } } @@ -4576,11 +4576,11 @@ "decorators": [], "loc": { "start": { - "line": 51, + "line": 67, "column": 5 }, "end": { - "line": 51, + "line": 67, "column": 9 } } @@ -4588,11 +4588,11 @@ "init": null, "loc": { "start": { - "line": 51, + "line": 67, "column": 5 }, "end": { - "line": 51, + "line": 67, "column": 9 } } @@ -4601,11 +4601,11 @@ "kind": "var", "loc": { "start": { - "line": 51, + "line": 67, "column": 1 }, "end": { - "line": 51, + "line": 67, "column": 50 } } @@ -4628,11 +4628,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 10 }, "end": { - "line": 53, + "line": 69, "column": 16 } } @@ -4641,11 +4641,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 19 }, "end": { - "line": 53, + "line": 69, "column": 25 } } @@ -4658,22 +4658,22 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 28 }, "end": { - "line": 53, + "line": 69, "column": 30 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 28 }, "end": { - "line": 53, + "line": 69, "column": 30 } } @@ -4681,11 +4681,11 @@ ], "loc": { "start": { - "line": 53, + "line": 69, "column": 10 }, "end": { - "line": 53, + "line": 69, "column": 30 } } @@ -4693,11 +4693,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 6 }, "end": { - "line": 53, + "line": 69, "column": 8 } } @@ -4711,11 +4711,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 33 }, "end": { - "line": 53, + "line": 69, "column": 35 } } @@ -4728,22 +4728,22 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 39 }, "end": { - "line": 53, + "line": 69, "column": 41 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 39 }, "end": { - "line": 53, + "line": 69, "column": 41 } } @@ -4751,22 +4751,22 @@ "asserts": false, "loc": { "start": { - "line": 53, + "line": 69, "column": 33 }, "end": { - "line": 53, + "line": 69, "column": 41 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 5 }, "end": { - "line": 53, + "line": 69, "column": 42 } } @@ -4774,11 +4774,11 @@ ], "loc": { "start": { - "line": 52, + "line": 68, "column": 22 }, "end": { - "line": 54, + "line": 70, "column": 2 } } @@ -4789,11 +4789,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 11 }, "end": { - "line": 52, + "line": 68, "column": 21 } } @@ -4801,11 +4801,11 @@ "extends": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 1 }, "end": { - "line": 54, + "line": 70, "column": 2 } } @@ -4820,11 +4820,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 10 }, "end": { - "line": 56, + "line": 72, "column": 19 } } @@ -4843,11 +4843,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 56, + "line": 72, "column": 28 }, "end": { - "line": 56, + "line": 72, "column": 34 } } @@ -4856,11 +4856,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 56, + "line": 72, "column": 37 }, "end": { - "line": 56, + "line": 72, "column": 43 } } @@ -4873,22 +4873,22 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 46 }, "end": { - "line": 56, + "line": 72, "column": 48 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 46 }, "end": { - "line": 56, + "line": 72, "column": 48 } } @@ -4896,11 +4896,11 @@ ], "loc": { "start": { - "line": 56, + "line": 72, "column": 28 }, "end": { - "line": 56, + "line": 72, "column": 48 } } @@ -4908,11 +4908,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 20 }, "end": { - "line": 56, + "line": 72, "column": 26 } } @@ -4926,11 +4926,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 51 }, "end": { - "line": 56, + "line": 72, "column": 57 } } @@ -4939,11 +4939,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 56, + "line": 72, "column": 61 }, "end": { - "line": 56, + "line": 72, "column": 67 } } @@ -4951,11 +4951,11 @@ "asserts": false, "loc": { "start": { - "line": 56, + "line": 72, "column": 51 }, "end": { - "line": 56, + "line": 72, "column": 67 } } @@ -4968,11 +4968,11 @@ "argument": null, "loc": { "start": { - "line": 56, + "line": 72, "column": 70 }, "end": { - "line": 56, + "line": 72, "column": 76 } } @@ -4980,33 +4980,33 @@ ], "loc": { "start": { - "line": 56, + "line": 72, "column": 68 }, "end": { - "line": 56, + "line": 72, "column": 78 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 78 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 78 } } @@ -5015,11 +5015,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 56, + "line": 72, "column": 78 }, "end": { - "line": 56, + "line": 72, "column": 79 } } @@ -5045,11 +5045,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 57, + "line": 73, "column": 20 }, "end": { - "line": 57, + "line": 73, "column": 26 } } @@ -5058,11 +5058,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 57, + "line": 73, "column": 29 }, "end": { - "line": 57, + "line": 73, "column": 35 } } @@ -5075,22 +5075,22 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 38 }, "end": { - "line": 57, + "line": 73, "column": 40 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 38 }, "end": { - "line": 57, + "line": 73, "column": 40 } } @@ -5098,11 +5098,11 @@ ], "loc": { "start": { - "line": 57, + "line": 73, "column": 20 }, "end": { - "line": 57, + "line": 73, "column": 40 } } @@ -5110,11 +5110,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 12 }, "end": { - "line": 57, + "line": 73, "column": 18 } } @@ -5128,11 +5128,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 45 }, "end": { - "line": 57, + "line": 73, "column": 51 } } @@ -5141,11 +5141,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 57, + "line": 73, "column": 55 }, "end": { - "line": 57, + "line": 73, "column": 61 } } @@ -5153,22 +5153,22 @@ "asserts": false, "loc": { "start": { - "line": 57, + "line": 73, "column": 45 }, "end": { - "line": 57, + "line": 73, "column": 61 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 11 }, "end": { - "line": 57, + "line": 73, "column": 61 } } @@ -5176,11 +5176,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 5 }, "end": { - "line": 57, + "line": 73, "column": 9 } } @@ -5188,11 +5188,11 @@ "init": null, "loc": { "start": { - "line": 57, + "line": 73, "column": 5 }, "end": { - "line": 57, + "line": 73, "column": 9 } } @@ -5201,11 +5201,11 @@ "kind": "var", "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 62 } } @@ -5226,11 +5226,11 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 5 }, "end": { - "line": 59, + "line": 75, "column": 6 } } @@ -5243,33 +5243,33 @@ "decorators": [], "loc": { "start": { - "line": 59, + "line": 75, "column": 8 }, "end": { - "line": 59, + "line": 75, "column": 10 } } }, "loc": { "start": { - "line": 59, + "line": 75, "column": 8 }, "end": { - "line": 59, + "line": 75, "column": 10 } } }, "loc": { "start": { - "line": 59, + "line": 75, "column": 5 }, "end": { - "line": 59, + "line": 75, "column": 11 } } @@ -5287,11 +5287,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 60, + "line": 76, "column": 14 }, "end": { - "line": 60, + "line": 76, "column": 20 } } @@ -5300,11 +5300,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 60, + "line": 76, "column": 23 }, "end": { - "line": 60, + "line": 76, "column": 29 } } @@ -5317,22 +5317,22 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 32 }, "end": { - "line": 60, + "line": 76, "column": 34 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 32 }, "end": { - "line": 60, + "line": 76, "column": 34 } } @@ -5340,11 +5340,11 @@ ], "loc": { "start": { - "line": 60, + "line": 76, "column": 14 }, "end": { - "line": 60, + "line": 76, "column": 34 } } @@ -5352,11 +5352,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 6 }, "end": { - "line": 60, + "line": 76, "column": 12 } } @@ -5370,11 +5370,11 @@ "decorators": [], "loc": { "start": { - "line": 60, + "line": 76, "column": 37 }, "end": { - "line": 60, + "line": 76, "column": 43 } } @@ -5383,11 +5383,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 60, + "line": 76, "column": 47 }, "end": { - "line": 60, + "line": 76, "column": 53 } } @@ -5395,22 +5395,22 @@ "asserts": false, "loc": { "start": { - "line": 60, + "line": 76, "column": 37 }, "end": { - "line": 60, + "line": 76, "column": 53 } } }, "loc": { "start": { - "line": 60, + "line": 76, "column": 5 }, "end": { - "line": 60, + "line": 76, "column": 54 } } @@ -5435,11 +5435,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 16 }, "end": { - "line": 61, + "line": 77, "column": 17 } } @@ -5451,11 +5451,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 61, + "line": 77, "column": 19 }, "end": { - "line": 61, + "line": 77, "column": 25 } } @@ -5464,11 +5464,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 61, + "line": 77, "column": 28 }, "end": { - "line": 61, + "line": 77, "column": 34 } } @@ -5481,22 +5481,22 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 37 }, "end": { - "line": 61, + "line": 77, "column": 39 } } }, "loc": { "start": { - "line": 61, + "line": 77, "column": 37 }, "end": { - "line": 61, + "line": 77, "column": 39 } } @@ -5504,22 +5504,22 @@ ], "loc": { "start": { - "line": 61, + "line": 77, "column": 19 }, "end": { - "line": 61, + "line": 77, "column": 39 } } }, "loc": { "start": { - "line": 61, + "line": 77, "column": 16 }, "end": { - "line": 61, + "line": 77, "column": 41 } } @@ -5527,11 +5527,11 @@ ], "loc": { "start": { - "line": 61, + "line": 77, "column": 14 }, "end": { - "line": 61, + "line": 77, "column": 41 } } @@ -5539,11 +5539,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 6 }, "end": { - "line": 61, + "line": 77, "column": 12 } } @@ -5557,11 +5557,11 @@ "decorators": [], "loc": { "start": { - "line": 61, + "line": 77, "column": 44 }, "end": { - "line": 61, + "line": 77, "column": 50 } } @@ -5570,11 +5570,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 61, + "line": 77, "column": 54 }, "end": { - "line": 61, + "line": 77, "column": 58 } } @@ -5582,22 +5582,22 @@ "asserts": false, "loc": { "start": { - "line": 61, + "line": 77, "column": 44 }, "end": { - "line": 61, + "line": 77, "column": 58 } } }, "loc": { "start": { - "line": 61, + "line": 77, "column": 5 }, "end": { - "line": 61, + "line": 77, "column": 59 } } @@ -5605,11 +5605,11 @@ ], "loc": { "start": { - "line": 58, + "line": 74, "column": 22 }, "end": { - "line": 62, + "line": 78, "column": 2 } } @@ -5620,11 +5620,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 11 }, "end": { - "line": 58, + "line": 74, "column": 21 } } @@ -5632,11 +5632,11 @@ "extends": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 62, + "line": 78, "column": 2 } } @@ -5657,11 +5657,11 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 5 }, "end": { - "line": 65, + "line": 81, "column": 6 } } @@ -5674,33 +5674,33 @@ "decorators": [], "loc": { "start": { - "line": 65, + "line": 81, "column": 8 }, "end": { - "line": 65, + "line": 81, "column": 10 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 8 }, "end": { - "line": 65, + "line": 81, "column": 10 } } }, "loc": { "start": { - "line": 65, + "line": 81, "column": 5 }, "end": { - "line": 65, + "line": 81, "column": 11 } } @@ -5725,11 +5725,11 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 16 }, "end": { - "line": 66, + "line": 82, "column": 17 } } @@ -5741,11 +5741,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 66, + "line": 82, "column": 19 }, "end": { - "line": 66, + "line": 82, "column": 25 } } @@ -5754,11 +5754,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 66, + "line": 82, "column": 28 }, "end": { - "line": 66, + "line": 82, "column": 34 } } @@ -5771,22 +5771,22 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 37 }, "end": { - "line": 66, + "line": 82, "column": 39 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 37 }, "end": { - "line": 66, + "line": 82, "column": 39 } } @@ -5794,22 +5794,22 @@ ], "loc": { "start": { - "line": 66, + "line": 82, "column": 19 }, "end": { - "line": 66, + "line": 82, "column": 39 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 16 }, "end": { - "line": 66, + "line": 82, "column": 41 } } @@ -5817,11 +5817,11 @@ ], "loc": { "start": { - "line": 66, + "line": 82, "column": 14 }, "end": { - "line": 66, + "line": 82, "column": 41 } } @@ -5829,11 +5829,11 @@ "decorators": [], "loc": { "start": { - "line": 66, + "line": 82, "column": 6 }, "end": { - "line": 66, + "line": 82, "column": 12 } } @@ -5845,11 +5845,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 66, + "line": 82, "column": 44 }, "end": { - "line": 66, + "line": 82, "column": 48 } } @@ -5858,11 +5858,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 66, + "line": 82, "column": 52 }, "end": { - "line": 66, + "line": 82, "column": 56 } } @@ -5870,22 +5870,22 @@ "asserts": false, "loc": { "start": { - "line": 66, + "line": 82, "column": 44 }, "end": { - "line": 66, + "line": 82, "column": 56 } } }, "loc": { "start": { - "line": 66, + "line": 82, "column": 5 }, "end": { - "line": 66, + "line": 82, "column": 57 } } @@ -5893,11 +5893,11 @@ ], "loc": { "start": { - "line": 64, + "line": 80, "column": 22 }, "end": { - "line": 67, + "line": 83, "column": 2 } } @@ -5908,11 +5908,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 11 }, "end": { - "line": 64, + "line": 80, "column": 21 } } @@ -5920,11 +5920,11 @@ "extends": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 1 }, "end": { - "line": 67, + "line": 83, "column": 2 } } @@ -5936,7 +5936,7 @@ "column": 1 }, "end": { - "line": 67, + "line": 83, "column": 2 } } diff --git a/es2panda/test/parser/ts/test-ts-type-predicate1-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate1-expected.txt index 1a91469499f5dff16ed3f0e1781df78bea051956..f6917f0ab977bdc52419d9ea36e6e44bd464dc4b 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate1-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate1-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -34,11 +34,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -47,11 +47,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 33 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -59,11 +59,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 24 }, "end": { - "line": 1, + "line": 17, "column": 39 } } @@ -71,11 +71,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -89,11 +89,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -112,22 +112,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 55 }, "end": { - "line": 1, + "line": 17, "column": 61 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 55 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -135,11 +135,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 53 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -147,46 +147,33 @@ "asserts": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 42 }, "end": { - "line": 1, + "line": 17, "column": 63 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 64 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, - "column": 64 - } - } - }, - { - "type": "EmptyStatement", - "loc": { - "start": { - "line": 1, - "column": 63 - }, - "end": { - "line": 1, + "line": 17, "column": 64 } } @@ -198,7 +185,7 @@ "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 64 } } diff --git a/es2panda/test/parser/ts/test-ts-type-predicate2-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate2-expected.txt index e839f3dec213182d8e6946aeed9f8c45ba7f963a..56b08bb45c1abf0b540cc1c95f117daeaf42c57b 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate2-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate2-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-ts-type-predicate2.ts:1:46] +SyntaxError: Type expected [test-ts-type-predicate2.ts:17:46] diff --git a/es2panda/test/parser/ts/test-ts-type-predicate3-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate3-expected.txt index 6a5c9afc5d4548c205884a51e9a692c25777ed8b..76f66d0b4a836daa65c7894b417c242fc1f358e9 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate3-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate3-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-type-predicate3.ts:1:63] +SyntaxError: Unexpected token [test-ts-type-predicate3.ts:17:63] diff --git a/es2panda/test/parser/ts/test-ts-type-predicate4-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate4-expected.txt index 42c58e288ea8d77cbd7f3b3fbb5dccca3b2cd917..947c6e4cee64cfe620c31331844e5035a58071dc 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate4-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate4-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-type-predicate4.ts:1:50] +SyntaxError: Unexpected token [test-ts-type-predicate4.ts:17:50] diff --git a/es2panda/test/parser/ts/test-ts-type-predicate5-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate5-expected.txt index 4064e85182f93d2671094070a7eb7e8df6fd9356..eed74e19a1a9c1bc667f5eeabe264f50aa014258 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate5-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate5-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-type-predicate5.ts:1:68] +SyntaxError: Unexpected token [test-ts-type-predicate5.ts:17:68] diff --git a/es2panda/test/parser/ts/test-ts-type-predicate6-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate6-expected.txt index d07417cc4ade75fff550d24e306b8abf7bcc56bd..4582883c84afbf770890e0b4f2c414e365a6e58c 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate6-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate6-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-type-predicate6.ts:1:44] +SyntaxError: Unexpected token [test-ts-type-predicate6.ts:17:44] diff --git a/es2panda/test/parser/ts/test-ts-type-predicate7-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate7-expected.txt index 96e1e5070be4da0281f53e8601f9082ba2b02da4..19917b16f90495b68a9ef558f43e053b6484b0b4 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate7-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate7-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-type-predicate7.ts:1:63] +SyntaxError: Unexpected token [test-ts-type-predicate7.ts:17:63] diff --git a/es2panda/test/parser/ts/test-ts-type-predicate8-expected.txt b/es2panda/test/parser/ts/test-ts-type-predicate8-expected.txt index d6b1165a70822d814f3eae6bb560ea07701f7e0b..e0a83e82b439f0f4f7a2b973996e7333382b8dbe 100644 --- a/es2panda/test/parser/ts/test-ts-type-predicate8-expected.txt +++ b/es2panda/test/parser/ts/test-ts-type-predicate8-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token [test-ts-type-predicate8.ts:1:54] +SyntaxError: Unexpected token [test-ts-type-predicate8.ts:17:54] diff --git a/es2panda/test/parser/ts/test-tuple-type-expected.txt b/es2panda/test/parser/ts/test-tuple-type-expected.txt index ac5a60e951a1a0a433b07255de75ea7d055a9235..8e576727c951ff0d75b1857f1ae5cf938fd10e66 100644 --- a/es2panda/test/parser/ts/test-tuple-type-expected.txt +++ b/es2panda/test/parser/ts/test-tuple-type-expected.txt @@ -18,11 +18,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -33,22 +33,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 10 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 9 }, "end": { - "line": 1, + "line": 17, "column": 19 } } @@ -59,11 +59,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 23 }, "end": { - "line": 1, + "line": 17, "column": 29 } } @@ -74,22 +74,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 21 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 20 }, "end": { - "line": 1, + "line": 17, "column": 30 } } @@ -107,11 +107,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 42 } } @@ -120,11 +120,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 49 } } @@ -132,33 +132,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 49 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 34 }, "end": { - "line": 1, + "line": 17, "column": 52 } } @@ -169,22 +169,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 32 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 31 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -192,11 +192,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -204,11 +204,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -216,11 +216,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -229,11 +229,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 54 } } @@ -253,11 +253,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -266,11 +266,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 17 }, "end": { - "line": 2, + "line": 18, "column": 24 } } @@ -279,11 +279,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 25 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -291,11 +291,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -303,11 +303,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -315,11 +315,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -328,11 +328,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -357,11 +357,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 19 } } @@ -372,22 +372,22 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 20 } } @@ -398,11 +398,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 24 }, "end": { - "line": 3, + "line": 19, "column": 30 } } @@ -413,22 +413,22 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 21 }, "end": { - "line": 3, + "line": 19, "column": 22 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 21 }, "end": { - "line": 3, + "line": 19, "column": 31 } } @@ -436,11 +436,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 9 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -455,11 +455,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 37 }, "end": { - "line": 3, + "line": 19, "column": 41 } } @@ -467,11 +467,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 34 }, "end": { - "line": 3, + "line": 19, "column": 35 } } @@ -486,11 +486,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 47 }, "end": { - "line": 3, + "line": 19, "column": 55 } } @@ -499,11 +499,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 56 }, "end": { - "line": 3, + "line": 19, "column": 64 } } @@ -511,11 +511,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 46 }, "end": { - "line": 3, + "line": 19, "column": 64 } } @@ -523,11 +523,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 43 }, "end": { - "line": 3, + "line": 19, "column": 44 } } @@ -537,22 +537,22 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 69 }, "end": { - "line": 3, + "line": 19, "column": 78 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 33 }, "end": { - "line": 3, + "line": 19, "column": 79 } } @@ -560,11 +560,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 79 } } @@ -572,11 +572,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -584,11 +584,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -597,11 +597,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -627,11 +627,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 18 } } @@ -640,11 +640,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 4, + "line": 20, "column": 26 } } @@ -652,11 +652,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 27 } } @@ -665,11 +665,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 28 }, "end": { - "line": 4, + "line": 20, "column": 35 } } @@ -678,11 +678,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 36 }, "end": { - "line": 4, + "line": 20, "column": 43 } } @@ -690,11 +690,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 9 }, "end": { - "line": 4, + "line": 20, "column": 44 } } @@ -703,11 +703,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 45 }, "end": { - "line": 4, + "line": 20, "column": 52 } } @@ -716,11 +716,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 53 }, "end": { - "line": 4, + "line": 20, "column": 60 } } @@ -728,11 +728,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 60 } } @@ -740,11 +740,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -752,11 +752,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -765,11 +765,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -793,11 +793,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -813,22 +813,22 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 11 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -836,22 +836,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 13 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 14 } } @@ -859,11 +859,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 14 } } @@ -871,11 +871,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -883,11 +883,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -896,11 +896,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -912,7 +912,7 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 14 } } diff --git a/es2panda/test/parser/ts/test-tuple-type1-expected.txt b/es2panda/test/parser/ts/test-tuple-type1-expected.txt index 5fb56e938729e111ee07bfaaa0729a2672bfd2ed..b4e644ec5804c3bc4598f810a6d8f07f4dfd4629 100644 --- a/es2panda/test/parser/ts/test-tuple-type1-expected.txt +++ b/es2panda/test/parser/ts/test-tuple-type1-expected.txt @@ -1 +1 @@ -SyntaxError: ',' expected. [test-tuple-type1.ts:1:19] +SyntaxError: ',' expected. [test-tuple-type1.ts:17:19] diff --git a/es2panda/test/parser/ts/test-tuple-type2-expected.txt b/es2panda/test/parser/ts/test-tuple-type2-expected.txt index 69dea6a9b0f1c95a156f2667b74802fd09d910c4..732997195100de77c70a546fe317291d404be3d8 100644 --- a/es2panda/test/parser/ts/test-tuple-type2-expected.txt +++ b/es2panda/test/parser/ts/test-tuple-type2-expected.txt @@ -1 +1 @@ -SyntaxError: Tuple members must all have names or all not have names [test-tuple-type2.ts:1:17] +SyntaxError: Tuple members must all have names or all not have names [test-tuple-type2.ts:17:17] diff --git a/es2panda/test/parser/ts/test-tuple-type3-expected.txt b/es2panda/test/parser/ts/test-tuple-type3-expected.txt index eba61c04003c179d80c611e7a97c3bfd4fba333c..2710c09bf550122e87f42a53218e9a92a2ad9deb 100644 --- a/es2panda/test/parser/ts/test-tuple-type3-expected.txt +++ b/es2panda/test/parser/ts/test-tuple-type3-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-tuple-type3.ts:1:9] +SyntaxError: Type expected [test-tuple-type3.ts:17:9] diff --git a/es2panda/test/parser/ts/test-tuple-type4-expected.txt b/es2panda/test/parser/ts/test-tuple-type4-expected.txt index 8d27f5e17419b2d3d4186d493c723e3e6523acca..2f7fbeb1b2d7c5f5d38b4c0ca8d8281aea25b113 100644 --- a/es2panda/test/parser/ts/test-tuple-type4-expected.txt +++ b/es2panda/test/parser/ts/test-tuple-type4-expected.txt @@ -1 +1 @@ -SyntaxError: A required element cannot follow an optional element [test-tuple-type4.ts:1:22] +SyntaxError: A required element cannot follow an optional element [test-tuple-type4.ts:17:22] diff --git a/es2panda/test/parser/ts/test-type-alias-expected.txt b/es2panda/test/parser/ts/test-type-alias-expected.txt index ca007f2c7459010d8d5950c1df4ec914e35b3269..399d7ea32798d71e5f5c6d694dade991ed7f6d12 100644 --- a/es2panda/test/parser/ts/test-type-alias-expected.txt +++ b/es2panda/test/parser/ts/test-type-alias-expected.txt @@ -9,11 +9,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 6 }, "end": { - "line": 1, + "line": 17, "column": 9 } } @@ -25,11 +25,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 18 } } @@ -38,11 +38,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 21 }, "end": { - "line": 1, + "line": 17, "column": 27 } } @@ -50,22 +50,22 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 12 }, "end": { - "line": 1, + "line": 17, "column": 27 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -74,11 +74,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 1, + "line": 17, "column": 27 }, "end": { - "line": 1, + "line": 17, "column": 28 } } @@ -91,11 +91,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 6 }, "end": { - "line": 2, + "line": 18, "column": 9 } } @@ -111,22 +111,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -143,11 +143,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 23 }, "end": { - "line": 2, + "line": 18, "column": 29 } } @@ -155,11 +155,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 20 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -171,11 +171,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 34 }, "end": { - "line": 2, + "line": 18, "column": 40 } } @@ -183,11 +183,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 31 }, "end": { - "line": 2, + "line": 18, "column": 32 } } @@ -197,33 +197,33 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 45 }, "end": { - "line": 2, + "line": 18, "column": 49 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 19 }, "end": { - "line": 2, + "line": 18, "column": 49 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 18 }, "end": { - "line": 2, + "line": 18, "column": 50 } } @@ -231,22 +231,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 50 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 51 } } @@ -255,11 +255,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 2, + "line": 18, "column": 50 }, "end": { - "line": 2, + "line": 18, "column": 51 } } @@ -272,11 +272,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 6 }, "end": { - "line": 3, + "line": 19, "column": 9 } } @@ -292,22 +292,22 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -322,33 +322,33 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 21 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 23 } } @@ -359,22 +359,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 32 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 34 } } @@ -382,22 +382,22 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 34 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 35 } } @@ -406,11 +406,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 3, + "line": 19, "column": 34 }, "end": { - "line": 3, + "line": 19, "column": 35 } } @@ -431,22 +431,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 11 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 11 } } @@ -454,11 +454,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -466,11 +466,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -479,11 +479,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } @@ -495,7 +495,7 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 12 } } diff --git a/es2panda/test/parser/ts/test-type-alias1-expected.txt b/es2panda/test/parser/ts/test-type-alias1-expected.txt index 6df5f20adfa72a850c6a1926070e23e3b83521ba..93719ca643d9851974a47bcf5b99480fa12ed4ac 100644 --- a/es2panda/test/parser/ts/test-type-alias1-expected.txt +++ b/es2panda/test/parser/ts/test-type-alias1-expected.txt @@ -1 +1 @@ -SyntaxError: Identifier expected [test-type-alias1.ts:1:6] +SyntaxError: Identifier expected [test-type-alias1.ts:17:6] diff --git a/es2panda/test/parser/ts/test-type-alias2-expected.txt b/es2panda/test/parser/ts/test-type-alias2-expected.txt index ae531f60587e7cb7c1fdc7c52ec03a7dc281cf66..56e208aaa39fe2cf11f03c4bd6746fef6fd58918 100644 --- a/es2panda/test/parser/ts/test-type-alias2-expected.txt +++ b/es2panda/test/parser/ts/test-type-alias2-expected.txt @@ -1 +1 @@ -SyntaxError: '=' expected [test-type-alias2.ts:1:10] +SyntaxError: '=' expected [test-type-alias2.ts:17:10] diff --git a/es2panda/test/parser/ts/test-type-alias3-expected.txt b/es2panda/test/parser/ts/test-type-alias3-expected.txt index dc5ba5d594c1dc077b44f9f1dfbf39e9f9ed0bfe..547ff6839ae535c8da0a3797919ec809908ac2ad 100644 --- a/es2panda/test/parser/ts/test-type-alias3-expected.txt +++ b/es2panda/test/parser/ts/test-type-alias3-expected.txt @@ -1 +1 @@ -SyntaxError: Type expected [test-type-alias3.ts:1:12] +SyntaxError: Type expected [test-type-alias3.ts:17:12] diff --git a/es2panda/test/parser/ts/test-type-annotation-expected.txt b/es2panda/test/parser/ts/test-type-annotation-expected.txt index e216af930f9df9ea07ab98c875c4db7800fe81c2..ce73610ed6414292f429a0368e1964583bfb7b8c 100644 --- a/es2panda/test/parser/ts/test-type-annotation-expected.txt +++ b/es2panda/test/parser/ts/test-type-annotation-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 15 } } @@ -71,11 +71,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 14 } } @@ -83,11 +83,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -95,11 +95,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -108,11 +108,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 15 } } @@ -129,11 +129,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 15 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -153,11 +153,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -166,11 +166,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -187,11 +187,11 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 12 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -211,11 +211,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -224,11 +224,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 13 } } @@ -245,11 +245,11 @@ "type": "TSNullKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 12 } } @@ -257,11 +257,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -269,11 +269,11 @@ "init": null, "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -282,11 +282,11 @@ "kind": "var", "loc": { "start": { - "line": 6, + "line": 22, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 13 } } @@ -303,11 +303,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 8 }, "end": { - "line": 7, + "line": 23, "column": 17 } } @@ -315,11 +315,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -327,11 +327,11 @@ "init": null, "loc": { "start": { - "line": 7, + "line": 23, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -340,11 +340,11 @@ "kind": "var", "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 18 } } @@ -361,11 +361,11 @@ "type": "TSUnknownKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 8 }, "end": { - "line": 8, + "line": 24, "column": 15 } } @@ -373,11 +373,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -385,11 +385,11 @@ "init": null, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 6 } } @@ -398,11 +398,11 @@ "kind": "var", "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 8, + "line": 24, "column": 16 } } @@ -419,11 +419,11 @@ "type": "TSNeverKeyword", "loc": { "start": { - "line": 9, + "line": 25, "column": 8 }, "end": { - "line": 9, + "line": 25, "column": 13 } } @@ -431,11 +431,11 @@ "decorators": [], "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 6 } } @@ -443,11 +443,11 @@ "init": null, "loc": { "start": { - "line": 9, + "line": 25, "column": 5 }, "end": { - "line": 9, + "line": 25, "column": 6 } } @@ -456,11 +456,11 @@ "kind": "var", "loc": { "start": { - "line": 9, + "line": 25, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 14 } } @@ -477,11 +477,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 10, + "line": 26, "column": 8 }, "end": { - "line": 10, + "line": 26, "column": 11 } } @@ -489,11 +489,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -501,11 +501,11 @@ "init": null, "loc": { "start": { - "line": 10, + "line": 26, "column": 5 }, "end": { - "line": 10, + "line": 26, "column": 6 } } @@ -514,11 +514,11 @@ "kind": "var", "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 12 } } @@ -535,11 +535,11 @@ "type": "TSBigIntKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 8 }, "end": { - "line": 11, + "line": 27, "column": 14 } } @@ -547,11 +547,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -559,11 +559,11 @@ "init": null, "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 6 } } @@ -572,11 +572,11 @@ "kind": "var", "loc": { "start": { - "line": 11, + "line": 27, "column": 1 }, "end": { - "line": 11, + "line": 27, "column": 15 } } @@ -593,11 +593,11 @@ "type": "TSObjectKeyword", "loc": { "start": { - "line": 12, + "line": 28, "column": 8 }, "end": { - "line": 12, + "line": 28, "column": 14 } } @@ -605,11 +605,11 @@ "decorators": [], "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -617,11 +617,11 @@ "init": null, "loc": { "start": { - "line": 12, + "line": 28, "column": 5 }, "end": { - "line": 12, + "line": 28, "column": 6 } } @@ -630,11 +630,11 @@ "kind": "var", "loc": { "start": { - "line": 12, + "line": 28, "column": 1 }, "end": { - "line": 12, + "line": 28, "column": 15 } } @@ -653,22 +653,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 8 }, "end": { - "line": 15, + "line": 31, "column": 14 } } }, "loc": { "start": { - "line": 15, + "line": 31, "column": 8 }, "end": { - "line": 15, + "line": 31, "column": 16 } } @@ -676,11 +676,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 6 } } @@ -688,11 +688,11 @@ "init": null, "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 6 } } @@ -701,11 +701,11 @@ "kind": "var", "loc": { "start": { - "line": 15, + "line": 31, "column": 1 }, "end": { - "line": 15, + "line": 31, "column": 17 } } @@ -726,33 +726,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 16, + "line": 32, "column": 8 }, "end": { - "line": 16, + "line": 32, "column": 14 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 8 }, "end": { - "line": 16, + "line": 32, "column": 16 } } }, "loc": { "start": { - "line": 16, + "line": 32, "column": 8 }, "end": { - "line": 16, + "line": 32, "column": 18 } } @@ -760,11 +760,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 5 }, "end": { - "line": 16, + "line": 32, "column": 6 } } @@ -772,11 +772,11 @@ "init": null, "loc": { "start": { - "line": 16, + "line": 32, "column": 5 }, "end": { - "line": 16, + "line": 32, "column": 6 } } @@ -785,11 +785,11 @@ "kind": "var", "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 19 } } @@ -811,22 +811,22 @@ "type": "TSUnknownKeyword", "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 15 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 17 } } @@ -840,33 +840,33 @@ "value": "5n", "loc": { "start": { - "line": 17, + "line": 33, "column": 20 }, "end": { - "line": 17, + "line": 33, "column": 22 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 20 }, "end": { - "line": 17, + "line": 33, "column": 22 } } }, "loc": { "start": { - "line": 17, + "line": 33, "column": 20 }, "end": { - "line": 17, + "line": 33, "column": 24 } } @@ -874,11 +874,11 @@ ], "loc": { "start": { - "line": 17, + "line": 33, "column": 8 }, "end": { - "line": 17, + "line": 33, "column": 24 } } @@ -886,11 +886,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 6 } } @@ -898,11 +898,11 @@ "init": null, "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 6 } } @@ -911,11 +911,11 @@ "kind": "var", "loc": { "start": { - "line": 17, + "line": 33, "column": 1 }, "end": { - "line": 17, + "line": 33, "column": 25 } } @@ -942,11 +942,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 9 }, "end": { - "line": 20, + "line": 36, "column": 15 } } @@ -955,11 +955,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 18 }, "end": { - "line": 20, + "line": 36, "column": 24 } } @@ -967,33 +967,33 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 9 }, "end": { - "line": 20, + "line": 36, "column": 24 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 8 }, "end": { - "line": 20, + "line": 36, "column": 25 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 8 }, "end": { - "line": 20, + "line": 36, "column": 27 } } @@ -1005,22 +1005,22 @@ "value": true, "loc": { "start": { - "line": 20, + "line": 36, "column": 30 }, "end": { - "line": 20, + "line": 36, "column": 34 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 30 }, "end": { - "line": 20, + "line": 36, "column": 34 } } @@ -1045,22 +1045,22 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 39 }, "end": { - "line": 20, + "line": 36, "column": 48 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 39 }, "end": { - "line": 20, + "line": 36, "column": 50 } } @@ -1069,11 +1069,11 @@ "type": "TSUnknownKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 53 }, "end": { - "line": 20, + "line": 36, "column": 60 } } @@ -1081,33 +1081,33 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 39 }, "end": { - "line": 20, + "line": 36, "column": 60 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 38 }, "end": { - "line": 20, + "line": 36, "column": 61 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 38 }, "end": { - "line": 20, + "line": 36, "column": 63 } } @@ -1119,22 +1119,22 @@ "value": "foo", "loc": { "start": { - "line": 20, + "line": 36, "column": 66 }, "end": { - "line": 20, + "line": 36, "column": 71 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 66 }, "end": { - "line": 20, + "line": 36, "column": 71 } } @@ -1142,33 +1142,33 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 38 }, "end": { - "line": 20, + "line": 36, "column": 71 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 37 }, "end": { - "line": 20, + "line": 36, "column": 72 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 37 }, "end": { - "line": 20, + "line": 36, "column": 74 } } @@ -1176,11 +1176,11 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 8 }, "end": { - "line": 20, + "line": 36, "column": 74 } } @@ -1188,11 +1188,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 6 } } @@ -1200,11 +1200,11 @@ "init": null, "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 6 } } @@ -1213,11 +1213,11 @@ "kind": "var", "loc": { "start": { - "line": 20, + "line": 36, "column": 1 }, "end": { - "line": 20, + "line": 36, "column": 75 } } @@ -1244,11 +1244,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 9 }, "end": { - "line": 21, + "line": 37, "column": 15 } } @@ -1257,11 +1257,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 18 }, "end": { - "line": 21, + "line": 37, "column": 24 } } @@ -1269,33 +1269,33 @@ ], "loc": { "start": { - "line": 21, + "line": 37, "column": 9 }, "end": { - "line": 21, + "line": 37, "column": 24 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 8 }, "end": { - "line": 21, + "line": 37, "column": 25 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 8 }, "end": { - "line": 21, + "line": 37, "column": 27 } } @@ -1311,11 +1311,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 31 }, "end": { - "line": 21, + "line": 37, "column": 37 } } @@ -1324,11 +1324,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 21, + "line": 37, "column": 40 }, "end": { - "line": 21, + "line": 37, "column": 46 } } @@ -1336,33 +1336,33 @@ ], "loc": { "start": { - "line": 21, + "line": 37, "column": 31 }, "end": { - "line": 21, + "line": 37, "column": 46 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 30 }, "end": { - "line": 21, + "line": 37, "column": 47 } } }, "loc": { "start": { - "line": 21, + "line": 37, "column": 30 }, "end": { - "line": 21, + "line": 37, "column": 49 } } @@ -1370,11 +1370,11 @@ ], "loc": { "start": { - "line": 21, + "line": 37, "column": 8 }, "end": { - "line": 21, + "line": 37, "column": 49 } } @@ -1382,11 +1382,11 @@ "decorators": [], "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 6 } } @@ -1394,11 +1394,11 @@ "init": null, "loc": { "start": { - "line": 21, + "line": 37, "column": 5 }, "end": { - "line": 21, + "line": 37, "column": 6 } } @@ -1407,11 +1407,11 @@ "kind": "var", "loc": { "start": { - "line": 21, + "line": 37, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 50 } } @@ -1443,11 +1443,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 10 }, "end": { - "line": 22, + "line": 38, "column": 16 } } @@ -1456,11 +1456,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 19 }, "end": { - "line": 22, + "line": 38, "column": 25 } } @@ -1468,33 +1468,33 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 10 }, "end": { - "line": 22, + "line": 38, "column": 25 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 9 }, "end": { - "line": 22, + "line": 38, "column": 26 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 9 }, "end": { - "line": 22, + "line": 38, "column": 28 } } @@ -1510,11 +1510,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 32 }, "end": { - "line": 22, + "line": 38, "column": 38 } } @@ -1523,11 +1523,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 41 }, "end": { - "line": 22, + "line": 38, "column": 47 } } @@ -1535,33 +1535,33 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 32 }, "end": { - "line": 22, + "line": 38, "column": 47 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 31 }, "end": { - "line": 22, + "line": 38, "column": 48 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 31 }, "end": { - "line": 22, + "line": 38, "column": 50 } } @@ -1569,22 +1569,22 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 9 }, "end": { - "line": 22, + "line": 38, "column": 50 } } }, "loc": { "start": { - "line": 22, + "line": 38, "column": 8 }, "end": { - "line": 22, + "line": 38, "column": 51 } } @@ -1593,11 +1593,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 22, + "line": 38, "column": 54 }, "end": { - "line": 22, + "line": 38, "column": 60 } } @@ -1605,11 +1605,11 @@ ], "loc": { "start": { - "line": 22, + "line": 38, "column": 8 }, "end": { - "line": 22, + "line": 38, "column": 60 } } @@ -1617,11 +1617,11 @@ "decorators": [], "loc": { "start": { - "line": 22, + "line": 38, "column": 5 }, "end": { - "line": 22, + "line": 38, "column": 6 } } @@ -1629,11 +1629,11 @@ "init": null, "loc": { "start": { - "line": 22, + "line": 38, "column": 5 }, "end": { - "line": 22, + "line": 38, "column": 6 } } @@ -1642,11 +1642,11 @@ "kind": "var", "loc": { "start": { - "line": 22, + "line": 38, "column": 1 }, "end": { - "line": 22, + "line": 38, "column": 61 } } @@ -1673,66 +1673,66 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 25, + "line": 41, "column": 12 }, "end": { - "line": 25, + "line": 41, "column": 18 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 11 }, "end": { - "line": 25, + "line": 41, "column": 19 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 10 }, "end": { - "line": 25, + "line": 41, "column": 20 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 9 }, "end": { - "line": 25, + "line": 41, "column": 21 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 8 }, "end": { - "line": 25, + "line": 41, "column": 22 } } }, "loc": { "start": { - "line": 25, + "line": 41, "column": 8 }, "end": { - "line": 25, + "line": 41, "column": 24 } } @@ -1740,11 +1740,11 @@ "decorators": [], "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 6 } } @@ -1752,11 +1752,11 @@ "init": null, "loc": { "start": { - "line": 25, + "line": 41, "column": 5 }, "end": { - "line": 25, + "line": 41, "column": 6 } } @@ -1765,11 +1765,11 @@ "kind": "var", "loc": { "start": { - "line": 25, + "line": 41, "column": 1 }, "end": { - "line": 25, + "line": 41, "column": 25 } } @@ -1799,11 +1799,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 26, + "line": 42, "column": 10 }, "end": { - "line": 26, + "line": 42, "column": 16 } } @@ -1812,11 +1812,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 26, + "line": 42, "column": 19 }, "end": { - "line": 26, + "line": 42, "column": 26 } } @@ -1824,22 +1824,22 @@ ], "loc": { "start": { - "line": 26, + "line": 42, "column": 10 }, "end": { - "line": 26, + "line": 42, "column": 26 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 9 }, "end": { - "line": 26, + "line": 42, "column": 27 } } @@ -1856,22 +1856,22 @@ "value": 5, "loc": { "start": { - "line": 26, + "line": 42, "column": 31 }, "end": { - "line": 26, + "line": 42, "column": 32 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 31 }, "end": { - "line": 26, + "line": 42, "column": 32 } } @@ -1883,22 +1883,22 @@ "value": true, "loc": { "start": { - "line": 26, + "line": 42, "column": 35 }, "end": { - "line": 26, + "line": 42, "column": 39 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 35 }, "end": { - "line": 26, + "line": 42, "column": 39 } } @@ -1906,22 +1906,22 @@ ], "loc": { "start": { - "line": 26, + "line": 42, "column": 31 }, "end": { - "line": 26, + "line": 42, "column": 39 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 30 }, "end": { - "line": 26, + "line": 42, "column": 40 } } @@ -1929,22 +1929,22 @@ ], "loc": { "start": { - "line": 26, + "line": 42, "column": 9 }, "end": { - "line": 26, + "line": 42, "column": 40 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 8 }, "end": { - "line": 26, + "line": 42, "column": 41 } } @@ -1955,22 +1955,22 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 26, + "line": 42, "column": 45 }, "end": { - "line": 26, + "line": 42, "column": 49 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 44 }, "end": { - "line": 26, + "line": 42, "column": 50 } } @@ -1978,11 +1978,11 @@ ], "loc": { "start": { - "line": 26, + "line": 42, "column": 8 }, "end": { - "line": 26, + "line": 42, "column": 50 } } @@ -1990,11 +1990,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 26, + "line": 42, "column": 6 } } @@ -2002,11 +2002,11 @@ "init": null, "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 26, + "line": 42, "column": 6 } } @@ -2015,11 +2015,11 @@ "kind": "var", "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 26, + "line": 42, "column": 51 } } @@ -2042,11 +2042,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 16 }, "end": { - "line": 29, + "line": 45, "column": 22 } } @@ -2054,11 +2054,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 13 }, "end": { - "line": 29, + "line": 45, "column": 14 } } @@ -2070,11 +2070,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 27 }, "end": { - "line": 29, + "line": 45, "column": 33 } } @@ -2082,11 +2082,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 24 }, "end": { - "line": 29, + "line": 45, "column": 25 } } @@ -2096,22 +2096,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 29, + "line": 45, "column": 38 }, "end": { - "line": 29, + "line": 45, "column": 44 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 12 }, "end": { - "line": 29, + "line": 45, "column": 44 } } @@ -2119,11 +2119,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 10 } } @@ -2131,11 +2131,11 @@ "init": null, "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 10 } } @@ -2144,11 +2144,11 @@ "kind": "var", "loc": { "start": { - "line": 29, + "line": 45, "column": 1 }, "end": { - "line": 29, + "line": 45, "column": 45 } } @@ -2176,22 +2176,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 30, + "line": 46, "column": 16 }, "end": { - "line": 30, + "line": 46, "column": 22 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 16 }, "end": { - "line": 30, + "line": 46, "column": 24 } } @@ -2200,11 +2200,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 30, + "line": 46, "column": 27 }, "end": { - "line": 30, + "line": 46, "column": 33 } } @@ -2212,11 +2212,11 @@ ], "loc": { "start": { - "line": 30, + "line": 46, "column": 16 }, "end": { - "line": 30, + "line": 46, "column": 33 } } @@ -2224,11 +2224,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 13 }, "end": { - "line": 30, + "line": 46, "column": 14 } } @@ -2243,22 +2243,22 @@ "value": 5, "loc": { "start": { - "line": 30, + "line": 46, "column": 39 }, "end": { - "line": 30, + "line": 46, "column": 40 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 39 }, "end": { - "line": 30, + "line": 46, "column": 40 } } @@ -2267,11 +2267,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 35 }, "end": { - "line": 30, + "line": 46, "column": 36 } } @@ -2284,11 +2284,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 30, + "line": 46, "column": 45 }, "end": { - "line": 30, + "line": 46, "column": 51 } } @@ -2297,11 +2297,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 30, + "line": 46, "column": 54 }, "end": { - "line": 30, + "line": 46, "column": 60 } } @@ -2309,22 +2309,22 @@ ], "loc": { "start": { - "line": 30, + "line": 46, "column": 45 }, "end": { - "line": 30, + "line": 46, "column": 60 } } }, "loc": { "start": { - "line": 30, + "line": 46, "column": 12 }, "end": { - "line": 30, + "line": 46, "column": 60 } } @@ -2332,11 +2332,11 @@ "decorators": [], "loc": { "start": { - "line": 30, + "line": 46, "column": 5 }, "end": { - "line": 30, + "line": 46, "column": 10 } } @@ -2344,11 +2344,11 @@ "init": null, "loc": { "start": { - "line": 30, + "line": 46, "column": 5 }, "end": { - "line": 30, + "line": 46, "column": 10 } } @@ -2357,11 +2357,11 @@ "kind": "var", "loc": { "start": { - "line": 30, + "line": 46, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 61 } } @@ -2390,11 +2390,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 20 }, "end": { - "line": 31, + "line": 47, "column": 26 } } @@ -2402,11 +2402,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 17 }, "end": { - "line": 31, + "line": 47, "column": 18 } } @@ -2418,11 +2418,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 31 }, "end": { - "line": 31, + "line": 47, "column": 37 } } @@ -2430,11 +2430,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 28 }, "end": { - "line": 31, + "line": 47, "column": 29 } } @@ -2446,33 +2446,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 42 }, "end": { - "line": 31, + "line": 47, "column": 48 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 42 }, "end": { - "line": 31, + "line": 47, "column": 50 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 16 }, "end": { - "line": 31, + "line": 47, "column": 50 } } @@ -2480,11 +2480,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 13 }, "end": { - "line": 31, + "line": 47, "column": 14 } } @@ -2498,11 +2498,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 53 }, "end": { - "line": 31, + "line": 47, "column": 54 } } @@ -2513,11 +2513,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 56 }, "end": { - "line": 31, + "line": 47, "column": 57 } } @@ -2529,33 +2529,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 60 }, "end": { - "line": 31, + "line": 47, "column": 66 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 60 }, "end": { - "line": 31, + "line": 47, "column": 68 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 52 }, "end": { - "line": 31, + "line": 47, "column": 58 } } @@ -2571,11 +2571,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 77 }, "end": { - "line": 31, + "line": 47, "column": 83 } } @@ -2583,11 +2583,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 74 }, "end": { - "line": 31, + "line": 47, "column": 75 } } @@ -2599,11 +2599,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 31, + "line": 47, "column": 88 }, "end": { - "line": 31, + "line": 47, "column": 95 } } @@ -2611,11 +2611,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 85 }, "end": { - "line": 31, + "line": 47, "column": 86 } } @@ -2628,44 +2628,44 @@ "value": true, "loc": { "start": { - "line": 31, + "line": 47, "column": 100 }, "end": { - "line": 31, + "line": 47, "column": 104 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 100 }, "end": { - "line": 31, + "line": 47, "column": 104 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 73 }, "end": { - "line": 31, + "line": 47, "column": 104 } } }, "loc": { "start": { - "line": 31, + "line": 47, "column": 12 }, "end": { - "line": 31, + "line": 47, "column": 104 } } @@ -2673,11 +2673,11 @@ "decorators": [], "loc": { "start": { - "line": 31, + "line": 47, "column": 5 }, "end": { - "line": 31, + "line": 47, "column": 10 } } @@ -2685,11 +2685,11 @@ "init": null, "loc": { "start": { - "line": 31, + "line": 47, "column": 5 }, "end": { - "line": 31, + "line": 47, "column": 10 } } @@ -2698,11 +2698,11 @@ "kind": "var", "loc": { "start": { - "line": 31, + "line": 47, "column": 1 }, "end": { - "line": 31, + "line": 47, "column": 105 } } @@ -2725,11 +2725,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 20 }, "end": { - "line": 34, + "line": 50, "column": 26 } } @@ -2737,11 +2737,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 17 }, "end": { - "line": 34, + "line": 50, "column": 18 } } @@ -2753,11 +2753,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 31 }, "end": { - "line": 34, + "line": 50, "column": 37 } } @@ -2765,11 +2765,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 28 }, "end": { - "line": 34, + "line": 50, "column": 29 } } @@ -2779,22 +2779,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 42 }, "end": { - "line": 34, + "line": 50, "column": 48 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 12 }, "end": { - "line": 34, + "line": 50, "column": 48 } } @@ -2802,11 +2802,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 5 }, "end": { - "line": 34, + "line": 50, "column": 10 } } @@ -2814,11 +2814,11 @@ "init": null, "loc": { "start": { - "line": 34, + "line": 50, "column": 5 }, "end": { - "line": 34, + "line": 50, "column": 10 } } @@ -2827,11 +2827,11 @@ "kind": "var", "loc": { "start": { - "line": 34, + "line": 50, "column": 1 }, "end": { - "line": 34, + "line": 50, "column": 49 } } @@ -2859,22 +2859,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 20 }, "end": { - "line": 35, + "line": 51, "column": 26 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 20 }, "end": { - "line": 35, + "line": 51, "column": 28 } } @@ -2883,11 +2883,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 31 }, "end": { - "line": 35, + "line": 51, "column": 37 } } @@ -2895,11 +2895,11 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 20 }, "end": { - "line": 35, + "line": 51, "column": 37 } } @@ -2907,11 +2907,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 17 }, "end": { - "line": 35, + "line": 51, "column": 18 } } @@ -2926,22 +2926,22 @@ "value": 5, "loc": { "start": { - "line": 35, + "line": 51, "column": 43 }, "end": { - "line": 35, + "line": 51, "column": 44 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 43 }, "end": { - "line": 35, + "line": 51, "column": 44 } } @@ -2950,11 +2950,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 39 }, "end": { - "line": 35, + "line": 51, "column": 40 } } @@ -2967,11 +2967,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 49 }, "end": { - "line": 35, + "line": 51, "column": 55 } } @@ -2980,11 +2980,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 35, + "line": 51, "column": 58 }, "end": { - "line": 35, + "line": 51, "column": 64 } } @@ -2992,22 +2992,22 @@ ], "loc": { "start": { - "line": 35, + "line": 51, "column": 49 }, "end": { - "line": 35, + "line": 51, "column": 64 } } }, "loc": { "start": { - "line": 35, + "line": 51, "column": 12 }, "end": { - "line": 35, + "line": 51, "column": 64 } } @@ -3015,11 +3015,11 @@ "decorators": [], "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 10 } } @@ -3027,11 +3027,11 @@ "init": null, "loc": { "start": { - "line": 35, + "line": 51, "column": 5 }, "end": { - "line": 35, + "line": 51, "column": 10 } } @@ -3040,11 +3040,11 @@ "kind": "var", "loc": { "start": { - "line": 35, + "line": 51, "column": 1 }, "end": { - "line": 35, + "line": 51, "column": 65 } } @@ -3073,11 +3073,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 24 }, "end": { - "line": 36, + "line": 52, "column": 30 } } @@ -3085,11 +3085,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 21 }, "end": { - "line": 36, + "line": 52, "column": 22 } } @@ -3101,11 +3101,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 35 }, "end": { - "line": 36, + "line": 52, "column": 41 } } @@ -3113,11 +3113,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 32 }, "end": { - "line": 36, + "line": 52, "column": 33 } } @@ -3129,33 +3129,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 46 }, "end": { - "line": 36, + "line": 52, "column": 52 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 46 }, "end": { - "line": 36, + "line": 52, "column": 54 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 20 }, "end": { - "line": 36, + "line": 52, "column": 54 } } @@ -3163,11 +3163,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 17 }, "end": { - "line": 36, + "line": 52, "column": 18 } } @@ -3181,11 +3181,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 57 }, "end": { - "line": 36, + "line": 52, "column": 58 } } @@ -3196,11 +3196,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 60 }, "end": { - "line": 36, + "line": 52, "column": 61 } } @@ -3212,33 +3212,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 64 }, "end": { - "line": 36, + "line": 52, "column": 70 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 64 }, "end": { - "line": 36, + "line": 52, "column": 72 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 56 }, "end": { - "line": 36, + "line": 52, "column": 62 } } @@ -3254,11 +3254,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 81 }, "end": { - "line": 36, + "line": 52, "column": 87 } } @@ -3266,11 +3266,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 78 }, "end": { - "line": 36, + "line": 52, "column": 79 } } @@ -3282,11 +3282,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 36, + "line": 52, "column": 92 }, "end": { - "line": 36, + "line": 52, "column": 99 } } @@ -3294,11 +3294,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 89 }, "end": { - "line": 36, + "line": 52, "column": 90 } } @@ -3311,44 +3311,44 @@ "value": true, "loc": { "start": { - "line": 36, + "line": 52, "column": 104 }, "end": { - "line": 36, + "line": 52, "column": 108 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 104 }, "end": { - "line": 36, + "line": 52, "column": 108 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 77 }, "end": { - "line": 36, + "line": 52, "column": 108 } } }, "loc": { "start": { - "line": 36, + "line": 52, "column": 12 }, "end": { - "line": 36, + "line": 52, "column": 108 } } @@ -3356,11 +3356,11 @@ "decorators": [], "loc": { "start": { - "line": 36, + "line": 52, "column": 5 }, "end": { - "line": 36, + "line": 52, "column": 10 } } @@ -3368,11 +3368,11 @@ "init": null, "loc": { "start": { - "line": 36, + "line": 52, "column": 5 }, "end": { - "line": 36, + "line": 52, "column": 10 } } @@ -3381,11 +3381,11 @@ "kind": "var", "loc": { "start": { - "line": 36, + "line": 52, "column": 1 }, "end": { - "line": 36, + "line": 52, "column": 109 } } @@ -3408,11 +3408,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 29 }, "end": { - "line": 37, + "line": 53, "column": 35 } } @@ -3420,11 +3420,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 26 }, "end": { - "line": 37, + "line": 53, "column": 27 } } @@ -3436,11 +3436,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 40 }, "end": { - "line": 37, + "line": 53, "column": 46 } } @@ -3448,11 +3448,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 37 }, "end": { - "line": 37, + "line": 53, "column": 38 } } @@ -3462,11 +3462,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 51 }, "end": { - "line": 37, + "line": 53, "column": 57 } } @@ -3474,11 +3474,11 @@ "abstract": true, "loc": { "start": { - "line": 37, + "line": 53, "column": 12 }, "end": { - "line": 37, + "line": 53, "column": 57 } } @@ -3486,11 +3486,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 10 } } @@ -3498,11 +3498,11 @@ "init": null, "loc": { "start": { - "line": 37, + "line": 53, "column": 5 }, "end": { - "line": 37, + "line": 53, "column": 10 } } @@ -3511,11 +3511,11 @@ "kind": "var", "loc": { "start": { - "line": 37, + "line": 53, "column": 1 }, "end": { - "line": 37, + "line": 53, "column": 58 } } @@ -3543,22 +3543,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 38, + "line": 54, "column": 29 }, "end": { - "line": 38, + "line": 54, "column": 35 } } }, "loc": { "start": { - "line": 38, + "line": 54, "column": 29 }, "end": { - "line": 38, + "line": 54, "column": 37 } } @@ -3567,11 +3567,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 38, + "line": 54, "column": 40 }, "end": { - "line": 38, + "line": 54, "column": 46 } } @@ -3579,11 +3579,11 @@ ], "loc": { "start": { - "line": 38, + "line": 54, "column": 29 }, "end": { - "line": 38, + "line": 54, "column": 46 } } @@ -3591,11 +3591,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 26 }, "end": { - "line": 38, + "line": 54, "column": 27 } } @@ -3610,22 +3610,22 @@ "value": 5, "loc": { "start": { - "line": 38, + "line": 54, "column": 52 }, "end": { - "line": 38, + "line": 54, "column": 53 } } }, "loc": { "start": { - "line": 38, + "line": 54, "column": 52 }, "end": { - "line": 38, + "line": 54, "column": 53 } } @@ -3634,11 +3634,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 48 }, "end": { - "line": 38, + "line": 54, "column": 49 } } @@ -3651,11 +3651,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 38, + "line": 54, "column": 58 }, "end": { - "line": 38, + "line": 54, "column": 64 } } @@ -3664,11 +3664,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 38, + "line": 54, "column": 67 }, "end": { - "line": 38, + "line": 54, "column": 73 } } @@ -3676,11 +3676,11 @@ ], "loc": { "start": { - "line": 38, + "line": 54, "column": 58 }, "end": { - "line": 38, + "line": 54, "column": 73 } } @@ -3688,11 +3688,11 @@ "abstract": true, "loc": { "start": { - "line": 38, + "line": 54, "column": 12 }, "end": { - "line": 38, + "line": 54, "column": 73 } } @@ -3700,11 +3700,11 @@ "decorators": [], "loc": { "start": { - "line": 38, + "line": 54, "column": 5 }, "end": { - "line": 38, + "line": 54, "column": 10 } } @@ -3712,11 +3712,11 @@ "init": null, "loc": { "start": { - "line": 38, + "line": 54, "column": 5 }, "end": { - "line": 38, + "line": 54, "column": 10 } } @@ -3725,11 +3725,11 @@ "kind": "var", "loc": { "start": { - "line": 38, + "line": 54, "column": 1 }, "end": { - "line": 38, + "line": 54, "column": 74 } } @@ -3758,11 +3758,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 39, + "line": 55, "column": 33 }, "end": { - "line": 39, + "line": 55, "column": 39 } } @@ -3770,11 +3770,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 30 }, "end": { - "line": 39, + "line": 55, "column": 31 } } @@ -3786,11 +3786,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 39, + "line": 55, "column": 44 }, "end": { - "line": 39, + "line": 55, "column": 50 } } @@ -3798,11 +3798,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 41 }, "end": { - "line": 39, + "line": 55, "column": 42 } } @@ -3814,33 +3814,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 39, + "line": 55, "column": 55 }, "end": { - "line": 39, + "line": 55, "column": 61 } } }, "loc": { "start": { - "line": 39, + "line": 55, "column": 55 }, "end": { - "line": 39, + "line": 55, "column": 63 } } }, "loc": { "start": { - "line": 39, + "line": 55, "column": 29 }, "end": { - "line": 39, + "line": 55, "column": 63 } } @@ -3848,11 +3848,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 26 }, "end": { - "line": 39, + "line": 55, "column": 27 } } @@ -3866,11 +3866,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 66 }, "end": { - "line": 39, + "line": 55, "column": 67 } } @@ -3881,11 +3881,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 69 }, "end": { - "line": 39, + "line": 55, "column": 70 } } @@ -3897,33 +3897,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 39, + "line": 55, "column": 73 }, "end": { - "line": 39, + "line": 55, "column": 79 } } }, "loc": { "start": { - "line": 39, + "line": 55, "column": 73 }, "end": { - "line": 39, + "line": 55, "column": 81 } } }, "loc": { "start": { - "line": 39, + "line": 55, "column": 65 }, "end": { - "line": 39, + "line": 55, "column": 71 } } @@ -3939,11 +3939,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 39, + "line": 55, "column": 90 }, "end": { - "line": 39, + "line": 55, "column": 96 } } @@ -3951,11 +3951,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 87 }, "end": { - "line": 39, + "line": 55, "column": 88 } } @@ -3967,11 +3967,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 39, + "line": 55, "column": 101 }, "end": { - "line": 39, + "line": 55, "column": 108 } } @@ -3979,11 +3979,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 98 }, "end": { - "line": 39, + "line": 55, "column": 99 } } @@ -3996,33 +3996,33 @@ "value": true, "loc": { "start": { - "line": 39, + "line": 55, "column": 113 }, "end": { - "line": 39, + "line": 55, "column": 117 } } }, "loc": { "start": { - "line": 39, + "line": 55, "column": 113 }, "end": { - "line": 39, + "line": 55, "column": 117 } } }, "loc": { "start": { - "line": 39, + "line": 55, "column": 86 }, "end": { - "line": 39, + "line": 55, "column": 117 } } @@ -4030,11 +4030,11 @@ "abstract": true, "loc": { "start": { - "line": 39, + "line": 55, "column": 12 }, "end": { - "line": 39, + "line": 55, "column": 117 } } @@ -4042,11 +4042,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 5 }, "end": { - "line": 39, + "line": 55, "column": 10 } } @@ -4054,11 +4054,11 @@ "init": null, "loc": { "start": { - "line": 39, + "line": 55, "column": 5 }, "end": { - "line": 39, + "line": 55, "column": 10 } } @@ -4067,11 +4067,11 @@ "kind": "var", "loc": { "start": { - "line": 39, + "line": 55, "column": 1 }, "end": { - "line": 39, + "line": 55, "column": 118 } } @@ -4083,7 +4083,7 @@ "column": 1 }, "end": { - "line": 39, + "line": 55, "column": 118 } } diff --git a/es2panda/test/parser/ts/test-type-literal-expected.txt b/es2panda/test/parser/ts/test-type-literal-expected.txt index 7ab3d3f7771889ed173667b42bb6042e6b7b1ee4..31cc3bae5988c87bd76ce3cb3da5cf3ba321d59a 100644 --- a/es2panda/test/parser/ts/test-type-literal-expected.txt +++ b/es2panda/test/parser/ts/test-type-literal-expected.txt @@ -22,11 +22,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 17 }, "end": { - "line": 1, + "line": 17, "column": 23 } } @@ -34,11 +34,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 14 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -50,11 +50,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 28 }, "end": { - "line": 1, + "line": 17, "column": 34 } } @@ -62,11 +62,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -76,22 +76,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 37 }, "end": { - "line": 1, + "line": 17, "column": 43 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 44 } } @@ -107,11 +107,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 46 } } @@ -120,22 +120,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 48 }, "end": { - "line": 1, + "line": 17, "column": 54 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 45 }, "end": { - "line": 1, + "line": 17, "column": 55 } } @@ -150,11 +150,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -166,11 +166,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 60 } } @@ -184,11 +184,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 63 }, "end": { - "line": 1, + "line": 17, "column": 64 } } @@ -199,11 +199,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 66 }, "end": { - "line": 1, + "line": 17, "column": 67 } } @@ -211,11 +211,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 62 }, "end": { - "line": 1, + "line": 17, "column": 68 } } @@ -227,11 +227,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 70 }, "end": { - "line": 1, + "line": 17, "column": 71 } } @@ -239,11 +239,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 56 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -251,11 +251,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 75 } } @@ -263,11 +263,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -275,11 +275,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -288,11 +288,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -319,11 +319,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -332,22 +332,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 13 }, "end": { - "line": 2, + "line": 18, "column": 19 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 10 }, "end": { - "line": 2, + "line": 18, "column": 20 } } @@ -363,11 +363,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -376,22 +376,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 24 }, "end": { - "line": 2, + "line": 18, "column": 30 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 21 }, "end": { - "line": 2, + "line": 18, "column": 31 } } @@ -407,11 +407,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 32 }, "end": { - "line": 2, + "line": 18, "column": 33 } } @@ -420,22 +420,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 36 }, "end": { - "line": 2, + "line": 18, "column": 42 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 32 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -443,11 +443,11 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 44 } } @@ -455,11 +455,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -467,11 +467,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -480,11 +480,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -510,11 +510,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -527,11 +527,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 21 } } @@ -539,11 +539,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 12 }, "end": { - "line": 3, + "line": 19, "column": 13 } } @@ -557,22 +557,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 32 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 26 }, "end": { - "line": 3, + "line": 19, "column": 34 } } @@ -580,11 +580,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 23 }, "end": { - "line": 3, + "line": 19, "column": 24 } } @@ -592,11 +592,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 36 } } @@ -611,11 +611,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 41 }, "end": { - "line": 3, + "line": 19, "column": 48 } } @@ -623,11 +623,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 38 }, "end": { - "line": 3, + "line": 19, "column": 39 } } @@ -638,11 +638,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 50 }, "end": { - "line": 3, + "line": 19, "column": 51 } } @@ -658,11 +658,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 58 }, "end": { - "line": 3, + "line": 19, "column": 64 } } @@ -670,11 +670,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 55 }, "end": { - "line": 3, + "line": 19, "column": 56 } } @@ -686,11 +686,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 69 }, "end": { - "line": 3, + "line": 19, "column": 75 } } @@ -698,11 +698,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 66 }, "end": { - "line": 3, + "line": 19, "column": 67 } } @@ -712,33 +712,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 3, + "line": 19, "column": 80 }, "end": { - "line": 3, + "line": 19, "column": 86 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 54 }, "end": { - "line": 3, + "line": 19, "column": 86 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 37 }, "end": { - "line": 3, + "line": 19, "column": 88 } } @@ -746,11 +746,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 88 } } @@ -758,11 +758,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -770,11 +770,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -783,11 +783,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -813,11 +813,11 @@ "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 11 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -826,22 +826,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 4, + "line": 20, "column": 26 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 27 } } @@ -855,11 +855,11 @@ "value": 5, "loc": { "start": { - "line": 4, + "line": 20, "column": 29 }, "end": { - "line": 4, + "line": 20, "column": 30 } } @@ -872,11 +872,11 @@ "type": "TSUndefinedKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 35 }, "end": { - "line": 4, + "line": 20, "column": 44 } } @@ -884,11 +884,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 32 }, "end": { - "line": 4, + "line": 20, "column": 33 } } @@ -900,11 +900,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 50 }, "end": { - "line": 4, + "line": 20, "column": 53 } } @@ -913,11 +913,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 46 }, "end": { - "line": 4, + "line": 20, "column": 47 } } @@ -927,22 +927,22 @@ "type": "TSNullKeyword", "loc": { "start": { - "line": 4, + "line": 20, "column": 56 }, "end": { - "line": 4, + "line": 20, "column": 60 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 28 }, "end": { - "line": 4, + "line": 20, "column": 62 } } @@ -950,11 +950,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 62 } } @@ -962,11 +962,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -974,11 +974,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -987,11 +987,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -1003,7 +1003,7 @@ "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 62 } } diff --git a/es2panda/test/parser/ts/test-type-literal1-expected.txt b/es2panda/test/parser/ts/test-type-literal1-expected.txt index c8f36c2959c0971b14c23ac39bc81adc95e4fdfd..297e75f7da3d56771b75ecc51cc85f1089420be8 100644 --- a/es2panda/test/parser/ts/test-type-literal1-expected.txt +++ b/es2panda/test/parser/ts/test-type-literal1-expected.txt @@ -1 +1 @@ -SyntaxError: ']' expected [test-type-literal1.ts:1:13] +SyntaxError: ']' expected [test-type-literal1.ts:17:13] diff --git a/es2panda/test/parser/ts/test-type-literal2-expected.txt b/es2panda/test/parser/ts/test-type-literal2-expected.txt index 79ece0a219887f2a9cdb199ab7b5417b97097fa3..c82a22f467a151079e04460ddb4638a0dd00710f 100644 --- a/es2panda/test/parser/ts/test-type-literal2-expected.txt +++ b/es2panda/test/parser/ts/test-type-literal2-expected.txt @@ -1 +1 @@ -SyntaxError: ',' expected [test-type-literal2.ts:1:14] +SyntaxError: ',' expected [test-type-literal2.ts:17:14] diff --git a/es2panda/test/parser/ts/test-type-literal3-expected.txt b/es2panda/test/parser/ts/test-type-literal3-expected.txt index f4c8797cc36d82e7e648395af88d60ebc41d10a6..0ab239b6a7f1be58d66e9ef9d340143ae5978425 100644 --- a/es2panda/test/parser/ts/test-type-literal3-expected.txt +++ b/es2panda/test/parser/ts/test-type-literal3-expected.txt @@ -1 +1 @@ -SyntaxError: ',' expected [test-type-literal3.ts:1:12] +SyntaxError: ',' expected [test-type-literal3.ts:17:12] diff --git a/es2panda/test/parser/ts/test-type-query-expected.txt b/es2panda/test/parser/ts/test-type-query-expected.txt index 31751ca771f14b55169485ec1b07dc2ff3f00c56..37425ef8c549d4e4213d27e0141357b4eaf1fb5c 100644 --- a/es2panda/test/parser/ts/test-type-query-expected.txt +++ b/es2panda/test/parser/ts/test-type-query-expected.txt @@ -13,11 +13,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 14 } } @@ -25,11 +25,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -37,11 +37,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -50,11 +50,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -75,22 +75,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 16 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -98,11 +98,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -110,11 +110,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -123,11 +123,11 @@ "kind": "var", "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 2, + "line": 18, "column": 17 } } @@ -154,11 +154,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 11 } } @@ -177,11 +177,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 16 } } @@ -196,11 +196,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 25 }, "end": { - "line": 3, + "line": 19, "column": 26 } } @@ -211,44 +211,44 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 27 }, "end": { - "line": 3, + "line": 19, "column": 28 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 25 }, "end": { - "line": 3, + "line": 19, "column": 30 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 18 }, "end": { - "line": 3, + "line": 19, "column": 30 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 15 }, "end": { - "line": 3, + "line": 19, "column": 30 } } @@ -256,22 +256,22 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 3, + "line": 19, "column": 30 } } }, "loc": { "start": { - "line": 3, + "line": 19, "column": 10 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -279,11 +279,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 8 }, "end": { - "line": 3, + "line": 19, "column": 32 } } @@ -291,11 +291,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -303,11 +303,11 @@ "init": null, "loc": { "start": { - "line": 3, + "line": 19, "column": 5 }, "end": { - "line": 3, + "line": 19, "column": 6 } } @@ -316,11 +316,11 @@ "kind": "var", "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 33 } } @@ -344,22 +344,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 15 }, "end": { - "line": 4, + "line": 20, "column": 16 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -372,22 +372,22 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 26 }, "end": { - "line": 4, + "line": 20, "column": 27 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 19 }, "end": { - "line": 4, + "line": 20, "column": 27 } } @@ -395,11 +395,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 8 }, "end": { - "line": 4, + "line": 20, "column": 27 } } @@ -407,11 +407,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -419,11 +419,11 @@ "init": null, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -432,11 +432,11 @@ "kind": "var", "loc": { "start": { - "line": 4, + "line": 20, "column": 1 }, "end": { - "line": 4, + "line": 20, "column": 28 } } @@ -459,11 +459,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 18 } } @@ -471,11 +471,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -487,11 +487,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 23 }, "end": { - "line": 5, + "line": 21, "column": 29 } } @@ -499,11 +499,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 20 }, "end": { - "line": 5, + "line": 21, "column": 21 } } @@ -517,33 +517,33 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 41 }, "end": { - "line": 5, + "line": 21, "column": 42 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 34 }, "end": { - "line": 5, + "line": 21, "column": 42 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 8 }, "end": { - "line": 5, + "line": 21, "column": 42 } } @@ -551,11 +551,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -563,11 +563,11 @@ "init": null, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 5, + "line": 21, "column": 6 } } @@ -576,11 +576,11 @@ "kind": "var", "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 43 } } @@ -592,7 +592,7 @@ "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 43 } } diff --git a/es2panda/test/parser/ts/test-type-query1-expected.txt b/es2panda/test/parser/ts/test-type-query1-expected.txt index ddc9ba37d5e1ccd464353d4f47aab9b196d048f2..4e10024ee15af048e9598c1a9ff3c2990c72f1a5 100644 --- a/es2panda/test/parser/ts/test-type-query1-expected.txt +++ b/es2panda/test/parser/ts/test-type-query1-expected.txt @@ -1 +1 @@ -SyntaxError: Identifier expected. [test-type-query1.ts:1:15] +SyntaxError: Identifier expected. [test-type-query1.ts:17:15] diff --git a/es2panda/test/parser/ts/test-type-query2-expected.txt b/es2panda/test/parser/ts/test-type-query2-expected.txt index bd1c600b541f09b625f5961889be243f67a5ded3..bb6b1d79059308a7de5861ad1fdab75a8d4a6c19 100644 --- a/es2panda/test/parser/ts/test-type-query2-expected.txt +++ b/es2panda/test/parser/ts/test-type-query2-expected.txt @@ -1 +1 @@ -SyntaxError: Identifier expected. [test-type-query2.ts:1:14] +SyntaxError: Identifier expected. [test-type-query2.ts:17:14] diff --git a/es2panda/test/parser/ts/test_decorator-expected.txt b/es2panda/test/parser/ts/test_decorator-expected.txt index dd7d13e9fb97285f2a3bd3f35469e00bb8a0a581..0477a6de92ee11adec1f1b27b16f6095ad5305ed 100644 --- a/es2panda/test/parser/ts/test_decorator-expected.txt +++ b/es2panda/test/parser/ts/test_decorator-expected.txt @@ -2,1009 +2,995 @@ "type": "Program", "statements": [ { - "type": "ExportDefaultDeclaration", - "declaration": { - "type": "ClassDeclaration", - "definition": { - "id": { + "type": "ClassDeclaration", + "definition": { + "id": { + "type": "Identifier", + "name": "Baz", + "decorators": [], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "superClass": null, + "implements": [], + "constructor": { + "type": "MethodDefinition", + "key": { "type": "Identifier", - "name": "Baz", + "name": "constructor", "decorators": [], "loc": { "start": { - "line": 2, - "column": 22 + "line": 27, + "column": 5 }, "end": { - "line": 2, - "column": 25 + "line": 27, + "column": 16 } } }, - "superClass": null, - "implements": [], - "constructor": { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "constructor", - "decorators": [], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 16 - } - } - }, - "kind": "constructor", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "a", - "typeAnnotation": { - "type": "TSAnyKeyword", - "loc": { - "start": { - "line": 11, - "column": 23 - }, - "end": { - "line": 11, - "column": 26 - } + "kind": "constructor", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "name": "a", + "typeAnnotation": { + "type": "TSAnyKeyword", + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 26 } - }, - "decorators": [ - { - "type": "Decorator", - "expression": { - "type": "Identifier", - "name": "g", - "decorators": [], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, + } + }, + "decorators": [ + { + "type": "Decorator", + "expression": { + "type": "Identifier", + "name": "g", + "decorators": [], "loc": { "start": { - "line": 11, - "column": 17 + "line": 27, + "column": 18 }, "end": { - "line": 11, + "line": 27, "column": 19 } } - } - ], - "loc": { - "start": { - "line": 11, - "column": 17 }, - "end": { - "line": 11, - "column": 21 + "loc": { + "start": { + "line": 27, + "column": 17 + }, + "end": { + "line": 27, + "column": 19 + } } } - } - ], - "body": { - "type": "BlockStatement", - "statements": [], + ], "loc": { "start": { - "line": 11, - "column": 28 + "line": 27, + "column": 17 }, "end": { - "line": 11, - "column": 31 + "line": 27, + "column": 21 } } - }, + } + ], + "body": { + "type": "BlockStatement", + "statements": [], "loc": { "start": { - "line": 11, - "column": 16 + "line": 27, + "column": 28 }, "end": { - "line": 11, + "line": 27, "column": 31 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 16 }, "end": { - "line": 11, + "line": 27, "column": 31 } } }, - "overloads": [], - "decorators": [], "loc": { "start": { - "line": 11, - "column": 5 + "line": 27, + "column": 16 }, "end": { - "line": 11, + "line": 27, "column": 31 } } }, - "body": [ - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + "body": [ + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], "loc": { "start": { - "line": 5, - "column": 5 + "line": 19, + "column": 6 }, "end": { - "line": 5, - "column": 6 + "line": 19, + "column": 9 } } }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "statements": [], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 9 + } + } + }, + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 9 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "a", + "decorators": [], + "loc": { + "start": { + "line": 21, + "column": 5 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], "loc": { "start": { - "line": 5, - "column": 6 + "line": 21, + "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 12 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 12 } } }, - "overloads": [ - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "a", - "decorators": [], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "kind": "method", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "overloads": [], + "loc": { + "start": { + "line": 21, + "column": 6 + }, + "end": { + "line": 21, + "column": 12 + } + } + }, + "overloads": [], + "decorators": [ + { + "type": "Decorator", + "expression": { + "type": "Identifier", + "name": "c", "decorators": [], "loc": { "start": { - "line": 3, - "column": 5 + "line": 20, + "column": 6 }, "end": { - "line": 3, - "column": 9 + "line": 20, + "column": 7 } } - } - ], - "decorators": [ - { - "type": "Decorator", - "expression": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } + }, + "loc": { + "start": { + "line": 20, + "column": 5 }, - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 7 - } + "end": { + "line": 20, + "column": 7 } } - ], + } + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 21, + "column": 12 + } + } + }, + { + "type": "ClassProperty", + "key": { + "type": "Identifier", + "name": "c", + "decorators": [], "loc": { "start": { - "line": 4, + "line": 23, "column": 5 }, "end": { - "line": 5, - "column": 12 + "line": 23, + "column": 6 } } }, - { - "type": "ClassProperty", - "key": { - "type": "Identifier", - "name": "c", - "decorators": [], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "static": false, - "readonly": false, - "declare": false, - "optional": false, - "computed": false, - "typeAnnotation": { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 14 - } + "static": false, + "readonly": false, + "declare": false, + "optional": false, + "computed": false, + "typeAnnotation": { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 14 } - }, - "decorators": [ - { - "type": "Decorator", - "expression": { - "type": "Identifier", - "name": "d", - "decorators": [], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, + } + }, + "decorators": [ + { + "type": "Decorator", + "expression": { + "type": "Identifier", + "name": "d", + "decorators": [], "loc": { "start": { - "line": 6, - "column": 5 + "line": 22, + "column": 6 }, "end": { - "line": 6, + "line": 22, "column": 7 } } - } - ], - "loc": { - "start": { - "line": 6, - "column": 5 }, - "end": { - "line": 7, - "column": 6 - } - } - }, - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], "loc": { "start": { - "line": 9, - "column": 9 + "line": 22, + "column": 5 }, "end": { - "line": 9, - "column": 10 + "line": 22, + "column": 7 } } + } + ], + "loc": { + "start": { + "line": 22, + "column": 5 }, - "kind": "set", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [ - { - "type": "Identifier", - "name": "f", - "decorators": [], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 12 - } - } - } - ], - "body": { - "type": "BlockStatement", - "statements": [], + "end": { + "line": 23, + "column": 6 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 25, + "column": 9 + }, + "end": { + "line": 25, + "column": 10 + } + } + }, + "kind": "set", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [ + { + "type": "Identifier", + "name": "f", + "decorators": [], "loc": { "start": { - "line": 9, - "column": 14 + "line": 25, + "column": 11 }, "end": { - "line": 9, - "column": 17 + "line": 25, + "column": 12 } } - }, + } + ], + "body": { + "type": "BlockStatement", + "statements": [], "loc": { "start": { - "line": 9, - "column": 10 + "line": 25, + "column": 14 }, "end": { - "line": 9, + "line": 25, "column": 17 } } }, "loc": { "start": { - "line": 9, + "line": 25, "column": 10 }, "end": { - "line": 9, + "line": 25, "column": 17 } } }, - "overloads": [], - "decorators": [ - { - "type": "Decorator", - "expression": { - "type": "CallExpression", - "callee": { - "type": "Identifier", - "name": "e", - "decorators": [], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "arguments": [], - "optional": false, + "loc": { + "start": { + "line": 25, + "column": 10 + }, + "end": { + "line": 25, + "column": 17 + } + } + }, + "overloads": [], + "decorators": [ + { + "type": "Decorator", + "expression": { + "type": "CallExpression", + "callee": { + "type": "Identifier", + "name": "e", + "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 6 }, "end": { - "line": 8, - "column": 9 + "line": 24, + "column": 7 } } }, + "arguments": [], + "optional": false, "loc": { "start": { - "line": 8, - "column": 5 + "line": 24, + "column": 6 }, "end": { - "line": 8, + "line": 24, "column": 9 } } - } - ], - "loc": { - "start": { - "line": 8, - "column": 5 }, - "end": { - "line": 9, - "column": 17 - } - } - }, - { - "type": "MethodDefinition", - "key": { - "type": "Identifier", - "name": "b", - "decorators": [], "loc": { "start": { - "line": 10, - "column": 9 + "line": 24, + "column": 5 }, "end": { - "line": 10, - "column": 10 + "line": 24, + "column": 9 } } + } + ], + "loc": { + "start": { + "line": 24, + "column": 5 }, - "kind": "get", - "static": false, - "optional": false, - "computed": false, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "statements": [ - { - "type": "ReturnStatement", - "argument": { - "type": "NumberLiteral", - "value": 1, - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, + "end": { + "line": 25, + "column": 17 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "Identifier", + "name": "b", + "decorators": [], + "loc": { + "start": { + "line": 26, + "column": 9 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + "kind": "get", + "static": false, + "optional": false, + "computed": false, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [ + { + "type": "ReturnStatement", + "argument": { + "type": "NumberLiteral", + "value": 1, "loc": { "start": { - "line": 10, - "column": 15 + "line": 26, + "column": 22 }, "end": { - "line": 10, - "column": 24 + "line": 26, + "column": 23 } } - } - ], - "loc": { - "start": { - "line": 10, - "column": 13 }, - "end": { - "line": 10, - "column": 26 + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 24 + } } } - }, + ], "loc": { "start": { - "line": 10, - "column": 10 + "line": 26, + "column": 13 }, "end": { - "line": 10, + "line": 26, "column": 26 } } }, "loc": { "start": { - "line": 10, + "line": 26, "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 26 } } }, - "overloads": [], - "decorators": [], "loc": { "start": { - "line": 10, - "column": 5 + "line": 26, + "column": 10 }, "end": { - "line": 10, + "line": 26, "column": 26 } } }, - { - "type": "MethodDefinition", - "key": { - "type": "StringLiteral", - "value": "", - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 14 - } - } + "overloads": [], + "decorators": [], + "loc": { + "start": { + "line": 26, + "column": 5 }, - "kind": "method", - "static": false, - "optional": false, - "computed": true, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "statements": [], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 21 - } - } - }, + "end": { + "line": 26, + "column": 26 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "1", + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 14 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": true, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], "loc": { "start": { - "line": 12, - "column": 15 + "line": 28, + "column": 18 }, "end": { - "line": 12, + "line": 28, "column": 21 } } }, "loc": { "start": { - "line": 12, + "line": 28, "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 21 } } }, - "overloads": [], - "decorators": [ - { - "type": "Decorator", - "expression": { - "type": "Identifier", - "name": "dec", - "decorators": [], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 9 - } - } - } - ], "loc": { "start": { - "line": 12, - "column": 5 + "line": 28, + "column": 15 }, "end": { - "line": 12, + "line": 28, "column": 21 } } }, - { - "type": "MethodDefinition", - "key": { - "type": "StringLiteral", - "value": "", + "overloads": [], + "decorators": [ + { + "type": "Decorator", + "expression": { + "type": "Identifier", + "name": "dec", + "decorators": [], + "loc": { + "start": { + "line": 28, + "column": 6 + }, + "end": { + "line": 28, + "column": 9 + } + } + }, "loc": { "start": { - "line": 13, - "column": 15 + "line": 28, + "column": 5 }, "end": { - "line": 13, - "column": 18 + "line": 28, + "column": 9 } } + } + ], + "loc": { + "start": { + "line": 28, + "column": 5 }, - "kind": "method", - "static": false, - "optional": false, - "computed": true, - "value": { - "type": "FunctionExpression", - "function": { - "type": "ScriptFunction", - "id": null, - "generator": false, - "async": false, - "expression": false, - "params": [], - "body": { - "type": "BlockStatement", - "statements": [], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, + "end": { + "line": 28, + "column": 21 + } + } + }, + { + "type": "MethodDefinition", + "key": { + "type": "StringLiteral", + "value": "h", + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 18 + } + } + }, + "kind": "method", + "static": false, + "optional": false, + "computed": true, + "value": { + "type": "FunctionExpression", + "function": { + "type": "ScriptFunction", + "id": null, + "generator": false, + "async": false, + "expression": false, + "params": [], + "body": { + "type": "BlockStatement", + "statements": [], "loc": { "start": { - "line": 13, - "column": 19 + "line": 29, + "column": 22 }, "end": { - "line": 13, + "line": 29, "column": 25 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 19 }, "end": { - "line": 13, + "line": 29, "column": 25 } } }, - "overloads": [], - "decorators": [ - { - "type": "Decorator", - "expression": { - "type": "MemberExpression", - "object": { - "type": "Identifier", - "name": "dec", - "decorators": [], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 9 - } - } - }, - "property": { - "type": "Identifier", - "name": "dec", - "decorators": [], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 13, - "column": 13 - } - } - }, - "computed": false, - "optional": false, + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 25 + } + } + }, + "overloads": [], + "decorators": [ + { + "type": "Decorator", + "expression": { + "type": "MemberExpression", + "object": { + "type": "Identifier", + "name": "dec", + "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 6 }, "end": { - "line": 13, + "line": 29, + "column": 9 + } + } + }, + "property": { + "type": "Identifier", + "name": "dec", + "decorators": [], + "loc": { + "start": { + "line": 29, + "column": 10 + }, + "end": { + "line": 29, "column": 13 } } }, + "computed": false, + "optional": false, "loc": { "start": { - "line": 13, - "column": 5 + "line": 29, + "column": 6 }, "end": { - "line": 13, + "line": 29, "column": 13 } } - } - ], - "loc": { - "start": { - "line": 13, - "column": 5 }, - "end": { - "line": 13, - "column": 25 + "loc": { + "start": { + "line": 29, + "column": 5 + }, + "end": { + "line": 29, + "column": 13 + } } } - } - ], - "indexSignatures": [], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 14, - "column": 2 + ], + "loc": { + "start": { + "line": 29, + "column": 5 + }, + "end": { + "line": 29, + "column": 25 + } } } - }, - "decorators": [ - { - "type": "Decorator", - "expression": { - "type": "Identifier", - "name": "foo", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 2 - }, - "end": { - "line": 1, - "column": 5 - } - } - }, + ], + "indexSignatures": [], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 30, + "column": 2 + } + } + }, + "decorators": [ + { + "type": "Decorator", + "expression": { + "type": "Identifier", + "name": "foo", + "decorators": [], "loc": { "start": { - "line": 1, - "column": 1 + "line": 17, + "column": 2 }, "end": { - "line": 1, + "line": 17, "column": 5 } } }, - { - "type": "Decorator", - "expression": { - "type": "CallExpression", - "callee": { - "type": "Identifier", - "name": "bar", - "decorators": [], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - "arguments": [], - "optional": false, + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": "Decorator", + "expression": { + "type": "CallExpression", + "callee": { + "type": "Identifier", + "name": "bar", + "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 7 }, "end": { - "line": 1, - "column": 12 + "line": 17, + "column": 10 } } }, + "arguments": [], + "optional": false, "loc": { "start": { - "line": 1, - "column": 6 + "line": 17, + "column": 7 }, "end": { - "line": 1, + "line": 17, "column": 12 } } - } - ], - "loc": { - "start": { - "line": 2, - "column": 16 }, - "end": { - "line": 14, - "column": 2 + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 12 + } } } - }, + ], "loc": { "start": { - "line": 2, + "line": 18, "column": 1 }, "end": { - "line": 14, + "line": 30, "column": 2 } } @@ -1016,8 +1002,8 @@ "column": 1 }, "end": { - "line": 14, - "column": 2 + "line": 31, + "column": 1 } } } diff --git a/es2panda/test/parser/ts/test_decorator.ts b/es2panda/test/parser/ts/test_decorator.ts index ad4c0b74b71fdc9d15124891e2020246de826c7f..a5b3a94f0758a7dc25db179594a57c6db8bacdca 100644 --- a/es2panda/test/parser/ts/test_decorator.ts +++ b/es2panda/test/parser/ts/test_decorator.ts @@ -15,7 +15,7 @@ @foo @bar() -export default class Baz { +class Baz { a(); @c a() { } @@ -27,4 +27,4 @@ export default class Baz { constructor(@g a: any) { }; @dec ["1"]() { } @dec.dec ["h"]() { } -} \ No newline at end of file +} diff --git a/es2panda/test/parser/ts/test_decorator1-expected.txt b/es2panda/test/parser/ts/test_decorator1-expected.txt index 5756801db11e8037c81ac020ff9e6a18673664fb..02e207a1f4f616b6de8445832680d9b81888612a 100644 --- a/es2panda/test/parser/ts/test_decorator1-expected.txt +++ b/es2panda/test/parser/ts/test_decorator1-expected.txt @@ -1 +1 @@ -SyntaxError: Unexpected token, expected an identifier. [test_decorator1.ts:1:14] +SyntaxError: Unexpected token, expected an identifier. [test_decorator1.ts:17:14] diff --git a/es2panda/test/parser/ts/test_decorator2-expected.txt b/es2panda/test/parser/ts/test_decorator2-expected.txt index 6aa655d475d4ba3f7e7180342c6b8e8284f0f082..7d3c1346a3107b58b64e05679b960459ec5cc815 100644 --- a/es2panda/test/parser/ts/test_decorator2-expected.txt +++ b/es2panda/test/parser/ts/test_decorator2-expected.txt @@ -1 +1 @@ -SyntaxError: Decorators are not valid here. [test_decorator2.ts:1:1] +SyntaxError: Decorators are not valid here. [test_decorator2.ts:17:1] diff --git a/es2panda/test/parser/ts/test_decorator3-expected.txt b/es2panda/test/parser/ts/test_decorator3-expected.txt index cde08d7db4de551ecf0a7792625657d43339a527..733a328eb62958a203137c1d1e0a5044281aa377 100644 --- a/es2panda/test/parser/ts/test_decorator3-expected.txt +++ b/es2panda/test/parser/ts/test_decorator3-expected.txt @@ -1 +1 @@ -SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. [test_decorator3.ts:4:5] +SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. [test_decorator3.ts:20:5] diff --git a/es2panda/test/parser/ts/test_decorator4-expected.txt b/es2panda/test/parser/ts/test_decorator4-expected.txt index 563157f0c7b717b424e35b4bac1a7c3a9aeb6e4b..e99ec9e98793a4bec2379f938286e723a207b4bd 100644 --- a/es2panda/test/parser/ts/test_decorator4-expected.txt +++ b/es2panda/test/parser/ts/test_decorator4-expected.txt @@ -1 +1 @@ -SyntaxError: A decorator can only decorate a method implementation, not an overload. [test_decorator4.ts:2:5] +SyntaxError: A decorator can only decorate a method implementation, not an overload. [test_decorator4.ts:18:5] diff --git a/es2panda/test/parser/ts/test_decorator5-expected.txt b/es2panda/test/parser/ts/test_decorator5-expected.txt index a063375822a1c0a9d4950ebd034e031c691bcc37..42946f76c970c655a30bc19015d2e4e2fcea453b 100644 --- a/es2panda/test/parser/ts/test_decorator5-expected.txt +++ b/es2panda/test/parser/ts/test_decorator5-expected.txt @@ -1 +1 @@ -SyntaxError: Decorators are not valid here. [test_decorator5.ts:2:5] +SyntaxError: Decorators are not valid here. [test_decorator5.ts:18:5] diff --git a/es2panda/test/parser/ts/test_decorator6-expected.txt b/es2panda/test/parser/ts/test_decorator6-expected.txt index b939da56ec0f29a44b84173d5bb88a53406d3634..874888faa64475b94ce091b556c0d6136805e068 100644 --- a/es2panda/test/parser/ts/test_decorator6-expected.txt +++ b/es2panda/test/parser/ts/test_decorator6-expected.txt @@ -1 +1 @@ -SyntaxError: Decorators are not valid here. [test_decorator6.ts:2:5] +SyntaxError: Decorators are not valid here. [test_decorator6.ts:18:5] diff --git a/es2panda/test/parser/ts/test_decorator7-expected.txt b/es2panda/test/parser/ts/test_decorator7-expected.txt index 5c4c061abf2e8460df6adcc7374e46b6ab2d29a3..fd6c75c252a86c329cfb8d02c230047408b2cde0 100644 --- a/es2panda/test/parser/ts/test_decorator7-expected.txt +++ b/es2panda/test/parser/ts/test_decorator7-expected.txt @@ -1 +1 @@ -SyntaxError: Decorators are not valid here. [test_decorator7.ts:1:1] +SyntaxError: Decorators are not valid here. [test_decorator7.ts:17:1] diff --git a/es2panda/test/parser/ts/test_decorator8-expected.txt b/es2panda/test/parser/ts/test_decorator8-expected.txt index 5b5ac27c07842ff632e43835bc23f57cfc289290..9bb30c000c964d8363dc6f5b3432d56b862291d3 100644 --- a/es2panda/test/parser/ts/test_decorator8-expected.txt +++ b/es2panda/test/parser/ts/test_decorator8-expected.txt @@ -1 +1 @@ -SyntaxError: Decorators are not valid here. [test_decorator8.ts:1:1] +SyntaxError: Decorators are not valid here. [test_decorator8.ts:17:1] diff --git a/es2panda/test/parser/ts/test_generic-expected.txt b/es2panda/test/parser/ts/test_generic-expected.txt index 730e728ca7a24397c7690d0c85839275fbb44b4c..6618f07c9d98094cd7b4d46293f430e6e534b117 100644 --- a/es2panda/test/parser/ts/test_generic-expected.txt +++ b/es2panda/test/parser/ts/test_generic-expected.txt @@ -11,11 +11,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 10 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -35,22 +35,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 63 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 59 }, "end": { - "line": 1, + "line": 17, "column": 63 } } @@ -58,11 +58,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 54 }, "end": { - "line": 1, + "line": 17, "column": 57 } } @@ -76,22 +76,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 66 }, "end": { - "line": 1, + "line": 17, "column": 70 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 66 }, "end": { - "line": 1, + "line": 17, "column": 70 } } @@ -107,22 +107,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 1, + "line": 17, "column": 21 } } @@ -135,22 +135,22 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 23 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 22 }, "end": { - "line": 1, + "line": 17, "column": 24 } } @@ -163,11 +163,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 26 } } @@ -181,44 +181,44 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 50 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 44 }, "end": { - "line": 1, + "line": 17, "column": 52 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 35 }, "end": { - "line": 1, + "line": 17, "column": 52 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 25 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -226,11 +226,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 53 } } @@ -246,22 +246,22 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 12 }, "end": { - "line": 2, + "line": 18, "column": 15 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 16 } } @@ -269,33 +269,33 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 71 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -310,11 +310,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 10 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -334,11 +334,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 17 } } @@ -357,11 +357,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 28 }, "end": { - "line": 5, + "line": 21, "column": 29 } } @@ -370,22 +370,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 31 }, "end": { - "line": 5, + "line": 21, "column": 37 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 28 }, "end": { - "line": 5, + "line": 21, "column": 38 } } @@ -401,11 +401,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 39 }, "end": { - "line": 5, + "line": 21, "column": 40 } } @@ -414,22 +414,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 42 }, "end": { - "line": 5, + "line": 21, "column": 48 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 39 }, "end": { - "line": 5, + "line": 21, "column": 50 } } @@ -437,22 +437,22 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 26 }, "end": { - "line": 5, + "line": 21, "column": 50 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 51 } } @@ -460,11 +460,11 @@ ], "loc": { "start": { - "line": 5, + "line": 21, "column": 15 }, "end": { - "line": 5, + "line": 21, "column": 51 } } @@ -474,33 +474,33 @@ "statements": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 54 }, "end": { - "line": 5, + "line": 21, "column": 57 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 57 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 5, + "line": 21, "column": 57 } } @@ -515,11 +515,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 10 }, "end": { - "line": 7, + "line": 23, "column": 15 } } @@ -539,22 +539,22 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 90 }, "end": { - "line": 7, + "line": 23, "column": 91 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 90 }, "end": { - "line": 7, + "line": 23, "column": 91 } } @@ -562,11 +562,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 87 }, "end": { - "line": 7, + "line": 23, "column": 88 } } @@ -578,11 +578,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 96 }, "end": { - "line": 7, + "line": 23, "column": 102 } } @@ -590,11 +590,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 93 }, "end": { - "line": 7, + "line": 23, "column": 94 } } @@ -607,11 +607,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 105 }, "end": { - "line": 7, + "line": 23, "column": 111 } } @@ -620,11 +620,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 114 }, "end": { - "line": 7, + "line": 23, "column": 121 } } @@ -632,11 +632,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 105 }, "end": { - "line": 7, + "line": 23, "column": 121 } } @@ -652,11 +652,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 16 }, "end": { - "line": 7, + "line": 23, "column": 17 } } @@ -678,11 +678,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 34 }, "end": { - "line": 7, + "line": 23, "column": 35 } } @@ -701,11 +701,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 39 }, "end": { - "line": 7, + "line": 23, "column": 40 } } @@ -714,22 +714,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 42 }, "end": { - "line": 7, + "line": 23, "column": 48 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 39 }, "end": { - "line": 7, + "line": 23, "column": 49 } } @@ -745,11 +745,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 50 }, "end": { - "line": 7, + "line": 23, "column": 51 } } @@ -758,22 +758,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 53 }, "end": { - "line": 7, + "line": 23, "column": 60 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 50 }, "end": { - "line": 7, + "line": 23, "column": 62 } } @@ -781,22 +781,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 37 }, "end": { - "line": 7, + "line": 23, "column": 62 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 34 }, "end": { - "line": 7, + "line": 23, "column": 63 } } @@ -812,11 +812,11 @@ "decorators": [], "loc": { "start": { - "line": 7, + "line": 23, "column": 64 }, "end": { - "line": 7, + "line": 23, "column": 65 } } @@ -828,11 +828,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 68 }, "end": { - "line": 7, + "line": 23, "column": 75 } } @@ -841,11 +841,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 7, + "line": 23, "column": 76 }, "end": { - "line": 7, + "line": 23, "column": 83 } } @@ -853,22 +853,22 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 67 }, "end": { - "line": 7, + "line": 23, "column": 83 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 64 }, "end": { - "line": 7, + "line": 23, "column": 85 } } @@ -876,33 +876,33 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 32 }, "end": { - "line": 7, + "line": 23, "column": 85 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 26 }, "end": { - "line": 7, + "line": 23, "column": 85 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 16 }, "end": { - "line": 7, + "line": 23, "column": 86 } } @@ -910,11 +910,11 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 15 }, "end": { - "line": 7, + "line": 23, "column": 86 } } @@ -929,22 +929,22 @@ "value": true, "loc": { "start": { - "line": 8, + "line": 24, "column": 12 }, "end": { - "line": 8, + "line": 24, "column": 16 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 5 }, "end": { - "line": 8, + "line": 24, "column": 17 } } @@ -952,33 +952,33 @@ ], "loc": { "start": { - "line": 7, + "line": 23, "column": 122 }, "end": { - "line": 9, + "line": 25, "column": 2 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 2 } } }, "loc": { "start": { - "line": 7, + "line": 23, "column": 1 }, "end": { - "line": 9, + "line": 25, "column": 2 } } @@ -991,11 +991,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 14 }, "end": { - "line": 11, + "line": 27, "column": 36 } } @@ -1029,22 +1029,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 75 }, "end": { - "line": 11, + "line": 27, "column": 76 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 75 }, "end": { - "line": 11, + "line": 27, "column": 76 } } @@ -1057,11 +1057,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 79 }, "end": { - "line": 11, + "line": 27, "column": 90 } } @@ -1077,22 +1077,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 91 }, "end": { - "line": 11, + "line": 27, "column": 92 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 91 }, "end": { - "line": 11, + "line": 27, "column": 92 } } @@ -1100,22 +1100,22 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 79 }, "end": { - "line": 11, + "line": 27, "column": 93 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 79 }, "end": { - "line": 11, + "line": 27, "column": 90 } } @@ -1123,11 +1123,11 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 75 }, "end": { - "line": 11, + "line": 27, "column": 90 } } @@ -1135,11 +1135,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 68 }, "end": { - "line": 11, + "line": 27, "column": 73 } } @@ -1149,22 +1149,22 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 98 }, "end": { - "line": 11, + "line": 27, "column": 102 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 67 }, "end": { - "line": 11, + "line": 27, "column": 102 } } @@ -1172,11 +1172,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 58 }, "end": { - "line": 11, + "line": 27, "column": 65 } } @@ -1194,11 +1194,11 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 122 }, "end": { - "line": 11, + "line": 27, "column": 125 } } @@ -1207,11 +1207,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 113 }, "end": { - "line": 11, + "line": 27, "column": 119 } } @@ -1221,22 +1221,22 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 130 }, "end": { - "line": 11, + "line": 27, "column": 134 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 112 }, "end": { - "line": 11, + "line": 27, "column": 134 } } @@ -1244,11 +1244,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 104 }, "end": { - "line": 11, + "line": 27, "column": 110 } } @@ -1258,22 +1258,22 @@ "type": "TSVoidKeyword", "loc": { "start": { - "line": 11, + "line": 27, "column": 139 }, "end": { - "line": 11, + "line": 27, "column": 143 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 57 }, "end": { - "line": 11, + "line": 27, "column": 143 } } @@ -1281,11 +1281,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 47 }, "end": { - "line": 11, + "line": 27, "column": 55 } } @@ -1302,22 +1302,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 44 }, "end": { - "line": 11, + "line": 27, "column": 45 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 44 }, "end": { - "line": 11, + "line": 27, "column": 46 } } @@ -1325,11 +1325,11 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 43 }, "end": { - "line": 11, + "line": 27, "column": 46 } } @@ -1342,11 +1342,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 148 }, "end": { - "line": 11, + "line": 27, "column": 159 } } @@ -1362,22 +1362,22 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 160 }, "end": { - "line": 11, + "line": 27, "column": 161 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 160 }, "end": { - "line": 11, + "line": 27, "column": 161 } } @@ -1385,33 +1385,33 @@ ], "loc": { "start": { - "line": 11, + "line": 27, "column": 148 }, "end": { - "line": 11, + "line": 27, "column": 162 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 148 }, "end": { - "line": 11, + "line": 27, "column": 159 } } }, "loc": { "start": { - "line": 11, + "line": 27, "column": 39 }, "end": { - "line": 11, + "line": 27, "column": 159 } } @@ -1419,11 +1419,11 @@ "declare": true, "loc": { "start": { - "line": 11, + "line": 27, "column": 9 }, "end": { - "line": 11, + "line": 27, "column": 163 } } @@ -1432,11 +1432,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 11, + "line": 27, "column": 162 }, "end": { - "line": 11, + "line": 27, "column": 163 } } @@ -1457,11 +1457,11 @@ "decorators": [], "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 6 } } @@ -1470,22 +1470,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 14, + "line": 30, "column": 8 }, "end": { - "line": 14, + "line": 30, "column": 14 } } }, "loc": { "start": { - "line": 14, + "line": 30, "column": 5 }, "end": { - "line": 14, + "line": 30, "column": 15 } } @@ -1499,11 +1499,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 9 }, "end": { - "line": 15, + "line": 31, "column": 15 } } @@ -1511,11 +1511,11 @@ "decorators": [], "loc": { "start": { - "line": 15, + "line": 31, "column": 6 }, "end": { - "line": 15, + "line": 31, "column": 7 } } @@ -1527,11 +1527,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 18 }, "end": { - "line": 15, + "line": 31, "column": 25 } } @@ -1540,11 +1540,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 15, + "line": 31, "column": 28 }, "end": { - "line": 15, + "line": 31, "column": 34 } } @@ -1552,11 +1552,11 @@ ], "loc": { "start": { - "line": 15, + "line": 31, "column": 18 }, "end": { - "line": 15, + "line": 31, "column": 34 } } @@ -1564,11 +1564,11 @@ "readonly": false, "loc": { "start": { - "line": 15, + "line": 31, "column": 5 }, "end": { - "line": 15, + "line": 31, "column": 35 } } @@ -1576,11 +1576,11 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 53 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -1591,11 +1591,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 11 }, "end": { - "line": 13, + "line": 29, "column": 12 } } @@ -1612,11 +1612,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 13 }, "end": { - "line": 13, + "line": 29, "column": 14 } } @@ -1628,11 +1628,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 24 }, "end": { - "line": 13, + "line": 29, "column": 31 } } @@ -1641,11 +1641,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 32 }, "end": { - "line": 13, + "line": 29, "column": 39 } } @@ -1653,22 +1653,22 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 23 }, "end": { - "line": 13, + "line": 29, "column": 39 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 13 }, "end": { - "line": 13, + "line": 29, "column": 40 } } @@ -1681,11 +1681,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 41 }, "end": { - "line": 13, + "line": 29, "column": 42 } } @@ -1694,22 +1694,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 13, + "line": 29, "column": 45 }, "end": { - "line": 13, + "line": 29, "column": 51 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 41 }, "end": { - "line": 13, + "line": 29, "column": 52 } } @@ -1717,22 +1717,22 @@ ], "loc": { "start": { - "line": 13, + "line": 29, "column": 12 }, "end": { - "line": 13, + "line": 29, "column": 52 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 2 } } @@ -1756,22 +1756,22 @@ "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 6 }, "end": { - "line": 19, + "line": 35, "column": 7 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 6 }, "end": { - "line": 19, + "line": 35, "column": 8 } } @@ -1779,11 +1779,11 @@ ], "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 19, + "line": 35, "column": 8 } } @@ -1792,22 +1792,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 19, + "line": 35, "column": 12 }, "end": { - "line": 19, + "line": 35, "column": 18 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 19, + "line": 35, "column": 19 } } @@ -1822,11 +1822,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 13 } } @@ -1843,11 +1843,11 @@ "decorators": [], "loc": { "start": { - "line": 20, + "line": 36, "column": 14 }, "end": { - "line": 20, + "line": 36, "column": 15 } } @@ -1856,22 +1856,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 24 }, "end": { - "line": 20, + "line": 36, "column": 30 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 14 }, "end": { - "line": 20, + "line": 36, "column": 31 } } @@ -1879,11 +1879,11 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 13 }, "end": { - "line": 20, + "line": 36, "column": 31 } } @@ -1895,11 +1895,11 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 36 }, "end": { - "line": 20, + "line": 36, "column": 44 } } @@ -1910,22 +1910,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 20, + "line": 36, "column": 45 }, "end": { - "line": 20, + "line": 36, "column": 51 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 45 }, "end": { - "line": 20, + "line": 36, "column": 54 } } @@ -1933,22 +1933,22 @@ ], "loc": { "start": { - "line": 20, + "line": 36, "column": 35 }, "end": { - "line": 20, + "line": 36, "column": 54 } } }, "loc": { "start": { - "line": 20, + "line": 36, "column": 5 }, "end": { - "line": 20, + "line": 36, "column": 55 } } @@ -1956,11 +1956,11 @@ ], "loc": { "start": { - "line": 18, + "line": 34, "column": 117 }, "end": { - "line": 21, + "line": 37, "column": 2 } } @@ -1971,11 +1971,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 11 }, "end": { - "line": 18, + "line": 34, "column": 12 } } @@ -1984,83 +1984,96 @@ { "type": "TSInterfaceHeritage", "expression": { - "type": "Identifier", - "name": "R", - "decorators": [], - "loc": { - "start": { - "line": 18, - "column": 97 - }, - "end": { - "line": 18, - "column": 98 + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "R", + "decorators": [], + "loc": { + "start": { + "line": 34, + "column": 97 + }, + "end": { + "line": 34, + "column": 98 + } } - } - }, - "typeParameters": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTupleType", - "elementTypes": [ - { - "type": "TSNumberKeyword", - "loc": { - "start": { - "line": 18, - "column": 100 - }, - "end": { - "line": 18, - "column": 107 + }, + "typeParameters": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTupleType", + "elementTypes": [ + { + "type": "TSNumberKeyword", + "loc": { + "start": { + "line": 34, + "column": 100 + }, + "end": { + "line": 34, + "column": 107 + } } - } - }, - { - "type": "TSStringKeyword", - "loc": { - "start": { - "line": 18, - "column": 108 - }, - "end": { - "line": 18, - "column": 115 + }, + { + "type": "TSStringKeyword", + "loc": { + "start": { + "line": 34, + "column": 108 + }, + "end": { + "line": 34, + "column": 115 + } } } - } - ], - "loc": { - "start": { - "line": 18, - "column": 99 - }, - "end": { - "line": 18, - "column": 115 + ], + "loc": { + "start": { + "line": 34, + "column": 99 + }, + "end": { + "line": 34, + "column": 115 + } } } + ], + "loc": { + "start": { + "line": 34, + "column": 97 + }, + "end": { + "line": 34, + "column": 116 + } } - ], + }, "loc": { "start": { - "line": 18, - "column": 97 + "line": 34, + "column": 117 }, "end": { - "line": 18, + "line": 34, "column": 116 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 117 }, "end": { - "line": 18, + "line": 34, "column": 116 } } @@ -2077,11 +2090,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 13 }, "end": { - "line": 18, + "line": 34, "column": 14 } } @@ -2096,11 +2109,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 18, + "line": 34, "column": 33 }, "end": { - "line": 18, + "line": 34, "column": 40 } } @@ -2109,11 +2122,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 18, + "line": 34, "column": 41 }, "end": { - "line": 18, + "line": 34, "column": 48 } } @@ -2132,11 +2145,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 51 }, "end": { - "line": 18, + "line": 34, "column": 52 } } @@ -2145,22 +2158,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 18, + "line": 34, "column": 54 }, "end": { - "line": 18, + "line": 34, "column": 60 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 51 }, "end": { - "line": 18, + "line": 34, "column": 61 } } @@ -2176,11 +2189,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 62 }, "end": { - "line": 18, + "line": 34, "column": 63 } } @@ -2189,22 +2202,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 18, + "line": 34, "column": 65 }, "end": { - "line": 18, + "line": 34, "column": 71 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 62 }, "end": { - "line": 18, + "line": 34, "column": 73 } } @@ -2212,11 +2225,11 @@ ], "loc": { "start": { - "line": 18, + "line": 34, "column": 49 }, "end": { - "line": 18, + "line": 34, "column": 74 } } @@ -2224,33 +2237,33 @@ ], "loc": { "start": { - "line": 18, + "line": 34, "column": 32 }, "end": { - "line": 18, + "line": 34, "column": 74 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 23 }, "end": { - "line": 18, + "line": 34, "column": 74 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 13 }, "end": { - "line": 18, + "line": 34, "column": 75 } } @@ -2263,11 +2276,11 @@ "decorators": [], "loc": { "start": { - "line": 18, + "line": 34, "column": 76 }, "end": { - "line": 18, + "line": 34, "column": 77 } } @@ -2276,22 +2289,22 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 18, + "line": 34, "column": 80 }, "end": { - "line": 18, + "line": 34, "column": 87 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 76 }, "end": { - "line": 18, + "line": 34, "column": 88 } } @@ -2299,22 +2312,22 @@ ], "loc": { "start": { - "line": 18, + "line": 34, "column": 12 }, "end": { - "line": 18, + "line": 34, "column": 88 } } }, "loc": { "start": { - "line": 18, + "line": 34, "column": 1 }, "end": { - "line": 21, + "line": 37, "column": 2 } } @@ -2329,11 +2342,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 1 }, "end": { - "line": 23, + "line": 39, "column": 6 } } @@ -2347,11 +2360,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 23, + "line": 39, "column": 7 }, "end": { - "line": 23, + "line": 39, "column": 13 } } @@ -2360,11 +2373,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 23, + "line": 39, "column": 15 }, "end": { - "line": 23, + "line": 39, "column": 21 } } @@ -2379,22 +2392,22 @@ "value": 1, "loc": { "start": { - "line": 23, + "line": 39, "column": 24 }, "end": { - "line": 23, + "line": 39, "column": 25 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 24 }, "end": { - "line": 23, + "line": 39, "column": 26 } } @@ -2406,22 +2419,22 @@ "value": 2, "loc": { "start": { - "line": 23, + "line": 39, "column": 27 }, "end": { - "line": 23, + "line": 39, "column": 28 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 27 }, "end": { - "line": 23, + "line": 39, "column": 29 } } @@ -2433,22 +2446,22 @@ "value": 3, "loc": { "start": { - "line": 23, + "line": 39, "column": 30 }, "end": { - "line": 23, + "line": 39, "column": 31 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 30 }, "end": { - "line": 23, + "line": 39, "column": 32 } } @@ -2456,11 +2469,11 @@ ], "loc": { "start": { - "line": 23, + "line": 39, "column": 23 }, "end": { - "line": 23, + "line": 39, "column": 32 } } @@ -2468,33 +2481,33 @@ ], "loc": { "start": { - "line": 23, + "line": 39, "column": 6 }, "end": { - "line": 23, + "line": 39, "column": 33 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 1 }, "end": { - "line": 23, + "line": 39, "column": 35 } } }, "loc": { "start": { - "line": 23, + "line": 39, "column": 1 }, "end": { - "line": 23, + "line": 39, "column": 35 } } @@ -2509,11 +2522,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 6 } } @@ -2537,22 +2550,22 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 8 }, "end": { - "line": 24, + "line": 40, "column": 9 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 8 }, "end": { - "line": 24, + "line": 40, "column": 10 } } @@ -2560,11 +2573,11 @@ ], "loc": { "start": { - "line": 24, + "line": 40, "column": 7 }, "end": { - "line": 24, + "line": 40, "column": 10 } } @@ -2574,22 +2587,22 @@ "members": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 16 }, "end": { - "line": 24, + "line": 40, "column": 18 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 7 }, "end": { - "line": 24, + "line": 40, "column": 18 } } @@ -2597,33 +2610,33 @@ ], "loc": { "start": { - "line": 24, + "line": 40, "column": 6 }, "end": { - "line": 24, + "line": 40, "column": 19 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 21 } } }, "loc": { "start": { - "line": 24, + "line": 40, "column": 1 }, "end": { - "line": 24, + "line": 40, "column": 22 } } @@ -2639,11 +2652,11 @@ "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 26, + "line": 42, "column": 6 } } @@ -2662,11 +2675,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 5 }, "end": { - "line": 27, + "line": 43, "column": 6 } } @@ -2691,22 +2704,22 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 18 }, "end": { - "line": 27, + "line": 43, "column": 19 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 18 }, "end": { - "line": 27, + "line": 43, "column": 20 } } @@ -2719,11 +2732,11 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 21 }, "end": { - "line": 27, + "line": 43, "column": 22 } } @@ -2736,33 +2749,33 @@ "decorators": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 38 }, "end": { - "line": 27, + "line": 43, "column": 43 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 31 }, "end": { - "line": 27, + "line": 43, "column": 43 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 21 }, "end": { - "line": 27, + "line": 43, "column": 44 } } @@ -2770,11 +2783,11 @@ ], "loc": { "start": { - "line": 27, + "line": 43, "column": 17 }, "end": { - "line": 27, + "line": 43, "column": 44 } } @@ -2784,33 +2797,33 @@ "statements": [], "loc": { "start": { - "line": 27, + "line": 43, "column": 47 }, "end": { - "line": 27, + "line": 43, "column": 50 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 8 }, "end": { - "line": 27, + "line": 43, "column": 50 } } }, "loc": { "start": { - "line": 27, + "line": 43, "column": 8 }, "end": { - "line": 27, + "line": 43, "column": 50 } } @@ -2818,11 +2831,11 @@ "kind": "init", "loc": { "start": { - "line": 27, + "line": 43, "column": 5 }, "end": { - "line": 27, + "line": 43, "column": 50 } } @@ -2838,11 +2851,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 5 }, "end": { - "line": 28, + "line": 44, "column": 6 } } @@ -2867,11 +2880,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 18 }, "end": { - "line": 28, + "line": 44, "column": 19 } } @@ -2880,22 +2893,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 28, + "line": 44, "column": 22 }, "end": { - "line": 28, + "line": 44, "column": 28 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 18 }, "end": { - "line": 28, + "line": 44, "column": 29 } } @@ -2908,11 +2921,11 @@ "decorators": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 30 }, "end": { - "line": 28, + "line": 44, "column": 31 } } @@ -2921,22 +2934,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 28, + "line": 44, "column": 34 }, "end": { - "line": 28, + "line": 44, "column": 40 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 30 }, "end": { - "line": 28, + "line": 44, "column": 41 } } @@ -2944,11 +2957,11 @@ ], "loc": { "start": { - "line": 28, + "line": 44, "column": 17 }, "end": { - "line": 28, + "line": 44, "column": 41 } } @@ -2958,33 +2971,33 @@ "statements": [], "loc": { "start": { - "line": 28, + "line": 44, "column": 44 }, "end": { - "line": 28, + "line": 44, "column": 47 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 8 }, "end": { - "line": 28, + "line": 44, "column": 47 } } }, "loc": { "start": { - "line": 28, + "line": 44, "column": 8 }, "end": { - "line": 28, + "line": 44, "column": 47 } } @@ -2992,11 +3005,11 @@ "kind": "init", "loc": { "start": { - "line": 28, + "line": 44, "column": 5 }, "end": { - "line": 28, + "line": 44, "column": 47 } } @@ -3012,11 +3025,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 6 } } @@ -3041,22 +3054,22 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 7 }, "end": { - "line": 29, + "line": 45, "column": 8 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 7 }, "end": { - "line": 29, + "line": 45, "column": 9 } } @@ -3069,11 +3082,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 10 }, "end": { - "line": 29, + "line": 45, "column": 11 } } @@ -3086,33 +3099,33 @@ "elementTypes": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 29 }, "end": { - "line": 29, + "line": 45, "column": 31 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 20 }, "end": { - "line": 29, + "line": 45, "column": 31 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 10 }, "end": { - "line": 29, + "line": 45, "column": 32 } } @@ -3120,11 +3133,11 @@ ], "loc": { "start": { - "line": 29, + "line": 45, "column": 6 }, "end": { - "line": 29, + "line": 45, "column": 32 } } @@ -3134,33 +3147,33 @@ "statements": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 35 }, "end": { - "line": 29, + "line": 45, "column": 38 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 6 }, "end": { - "line": 29, + "line": 45, "column": 38 } } }, "loc": { "start": { - "line": 29, + "line": 45, "column": 6 }, "end": { - "line": 29, + "line": 45, "column": 38 } } @@ -3168,11 +3181,11 @@ "kind": "init", "loc": { "start": { - "line": 29, + "line": 45, "column": 5 }, "end": { - "line": 29, + "line": 45, "column": 38 } } @@ -3180,22 +3193,22 @@ ], "loc": { "start": { - "line": 26, + "line": 42, "column": 9 }, "end": { - "line": 30, + "line": 46, "column": 2 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 30, + "line": 46, "column": 2 } } @@ -3204,11 +3217,11 @@ "kind": "var", "loc": { "start": { - "line": 26, + "line": 42, "column": 1 }, "end": { - "line": 30, + "line": 46, "column": 2 } } @@ -3222,11 +3235,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 7 }, "end": { - "line": 32, + "line": 48, "column": 8 } } @@ -3242,11 +3255,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 9 }, "end": { - "line": 32, + "line": 48, "column": 10 } } @@ -3259,33 +3272,33 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 19 }, "end": { - "line": 32, + "line": 48, "column": 20 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 19 }, "end": { - "line": 32, + "line": 48, "column": 20 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 9 }, "end": { - "line": 32, + "line": 48, "column": 21 } } @@ -3298,11 +3311,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 22 }, "end": { - "line": 32, + "line": 48, "column": 23 } } @@ -3321,11 +3334,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 28 }, "end": { - "line": 32, + "line": 48, "column": 29 } } @@ -3334,22 +3347,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 31 }, "end": { - "line": 32, + "line": 48, "column": 37 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 28 }, "end": { - "line": 32, + "line": 48, "column": 38 } } @@ -3365,11 +3378,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 39 }, "end": { - "line": 32, + "line": 48, "column": 40 } } @@ -3378,22 +3391,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 32, + "line": 48, "column": 42 }, "end": { - "line": 32, + "line": 48, "column": 48 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 39 }, "end": { - "line": 32, + "line": 48, "column": 50 } } @@ -3401,22 +3414,22 @@ ], "loc": { "start": { - "line": 32, + "line": 48, "column": 26 }, "end": { - "line": 32, + "line": 48, "column": 50 } } }, "loc": { "start": { - "line": 32, + "line": 48, "column": 22 }, "end": { - "line": 32, + "line": 48, "column": 51 } } @@ -3424,11 +3437,11 @@ ], "loc": { "start": { - "line": 32, + "line": 48, "column": 8 }, "end": { - "line": 32, + "line": 48, "column": 51 } } @@ -3505,11 +3518,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 1 }, "end": { - "line": 35, + "line": 51, "column": 2 } } @@ -3523,11 +3536,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 12 }, "end": { - "line": 33, + "line": 49, "column": 13 } } @@ -3557,22 +3570,22 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 14 }, "end": { - "line": 33, + "line": 49, "column": 15 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 14 }, "end": { - "line": 33, + "line": 49, "column": 16 } } @@ -3585,22 +3598,22 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 17 }, "end": { - "line": 33, + "line": 49, "column": 18 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 17 }, "end": { - "line": 33, + "line": 49, "column": 19 } } @@ -3608,11 +3621,11 @@ ], "loc": { "start": { - "line": 33, + "line": 49, "column": 13 }, "end": { - "line": 33, + "line": 49, "column": 19 } } @@ -3622,33 +3635,33 @@ "statements": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 22 }, "end": { - "line": 33, + "line": 49, "column": 25 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 13 }, "end": { - "line": 33, + "line": 49, "column": 25 } } }, "loc": { "start": { - "line": 33, + "line": 49, "column": 13 }, "end": { - "line": 33, + "line": 49, "column": 25 } } @@ -3657,11 +3670,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 5 }, "end": { - "line": 33, + "line": 49, "column": 25 } } @@ -3674,11 +3687,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 13 }, "end": { - "line": 34, + "line": 50, "column": 14 } } @@ -3708,11 +3721,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 15 }, "end": { - "line": 34, + "line": 50, "column": 16 } } @@ -3727,11 +3740,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 29 }, "end": { - "line": 34, + "line": 50, "column": 35 } } @@ -3739,11 +3752,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 26 }, "end": { - "line": 34, + "line": 50, "column": 27 } } @@ -3755,11 +3768,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 40 }, "end": { - "line": 34, + "line": 50, "column": 46 } } @@ -3767,11 +3780,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 37 }, "end": { - "line": 34, + "line": 50, "column": 38 } } @@ -3783,44 +3796,44 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 34, + "line": 50, "column": 51 }, "end": { - "line": 34, + "line": 50, "column": 54 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 51 }, "end": { - "line": 34, + "line": 50, "column": 56 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 25 }, "end": { - "line": 34, + "line": 50, "column": 56 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 15 }, "end": { - "line": 34, + "line": 50, "column": 57 } } @@ -3828,11 +3841,11 @@ ], "loc": { "start": { - "line": 34, + "line": 50, "column": 14 }, "end": { - "line": 34, + "line": 50, "column": 57 } } @@ -3842,33 +3855,33 @@ "statements": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 60 }, "end": { - "line": 34, + "line": 50, "column": 63 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 14 }, "end": { - "line": 34, + "line": 50, "column": 63 } } }, "loc": { "start": { - "line": 34, + "line": 50, "column": 14 }, "end": { - "line": 34, + "line": 50, "column": 63 } } @@ -3877,11 +3890,11 @@ "decorators": [], "loc": { "start": { - "line": 34, + "line": 50, "column": 5 }, "end": { - "line": 34, + "line": 50, "column": 63 } } @@ -3890,11 +3903,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 52 }, "end": { - "line": 35, + "line": 51, "column": 2 } } @@ -3902,11 +3915,11 @@ "decorators": [], "loc": { "start": { - "line": 32, + "line": 48, "column": 1 }, "end": { - "line": 35, + "line": 51, "column": 2 } } @@ -3920,11 +3933,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 7 }, "end": { - "line": 37, + "line": 53, "column": 8 } } @@ -3935,11 +3948,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 17 }, "end": { - "line": 37, + "line": 53, "column": 18 } } @@ -3961,22 +3974,22 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 20 }, "end": { - "line": 37, + "line": 53, "column": 21 } } }, "loc": { "start": { - "line": 37, + "line": 53, "column": 20 }, "end": { - "line": 37, + "line": 53, "column": 22 } } @@ -3984,11 +3997,11 @@ ], "loc": { "start": { - "line": 37, + "line": 53, "column": 19 }, "end": { - "line": 37, + "line": 53, "column": 22 } } @@ -3997,22 +4010,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 29 }, "end": { - "line": 37, + "line": 53, "column": 35 } } }, "loc": { "start": { - "line": 37, + "line": 53, "column": 19 }, "end": { - "line": 37, + "line": 53, "column": 35 } } @@ -4029,11 +4042,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 38 }, "end": { - "line": 37, + "line": 53, "column": 44 } } @@ -4042,11 +4055,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 37, + "line": 53, "column": 47 }, "end": { - "line": 37, + "line": 53, "column": 53 } } @@ -4054,11 +4067,11 @@ ], "loc": { "start": { - "line": 37, + "line": 53, "column": 38 }, "end": { - "line": 37, + "line": 53, "column": 54 } } @@ -4066,22 +4079,22 @@ ], "loc": { "start": { - "line": 37, + "line": 53, "column": 37 }, "end": { - "line": 37, + "line": 53, "column": 54 } } }, "loc": { "start": { - "line": 37, + "line": 53, "column": 37 }, "end": { - "line": 37, + "line": 53, "column": 56 } } @@ -4089,11 +4102,11 @@ ], "loc": { "start": { - "line": 37, + "line": 53, "column": 18 }, "end": { - "line": 37, + "line": 53, "column": 57 } } @@ -4269,11 +4282,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 1 }, "end": { - "line": 39, + "line": 55, "column": 2 } } @@ -4282,11 +4295,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 58 }, "end": { - "line": 39, + "line": 55, "column": 2 } } @@ -4294,11 +4307,11 @@ "decorators": [], "loc": { "start": { - "line": 37, + "line": 53, "column": 1 }, "end": { - "line": 39, + "line": 55, "column": 2 } } @@ -4312,11 +4325,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 7 }, "end": { - "line": 41, + "line": 57, "column": 8 } } @@ -4327,11 +4340,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 17 }, "end": { - "line": 41, + "line": 57, "column": 18 } } @@ -4343,11 +4356,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 41, + "line": 57, "column": 19 }, "end": { - "line": 41, + "line": 57, "column": 25 } } @@ -4355,11 +4368,11 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 18 }, "end": { - "line": 41, + "line": 57, "column": 26 } } @@ -4373,11 +4386,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 38 }, "end": { - "line": 41, + "line": 57, "column": 39 } } @@ -4395,11 +4408,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 41, + "line": 57, "column": 46 }, "end": { - "line": 41, + "line": 57, "column": 52 } } @@ -4407,11 +4420,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 44 }, "end": { - "line": 41, + "line": 57, "column": 45 } } @@ -4423,11 +4436,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 41, + "line": 57, "column": 56 }, "end": { - "line": 41, + "line": 57, "column": 62 } } @@ -4435,11 +4448,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 54 }, "end": { - "line": 41, + "line": 57, "column": 55 } } @@ -4456,22 +4469,22 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 41 }, "end": { - "line": 41, + "line": 57, "column": 42 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 41 }, "end": { - "line": 41, + "line": 57, "column": 43 } } @@ -4479,11 +4492,11 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 40 }, "end": { - "line": 41, + "line": 57, "column": 43 } } @@ -4495,11 +4508,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 41, + "line": 57, "column": 68 }, "end": { - "line": 41, + "line": 57, "column": 75 } } @@ -4507,22 +4520,22 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 67 }, "end": { - "line": 41, + "line": 57, "column": 75 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 40 }, "end": { - "line": 41, + "line": 57, "column": 75 } } @@ -4530,22 +4543,22 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 39 }, "end": { - "line": 41, + "line": 57, "column": 76 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 38 }, "end": { - "line": 41, + "line": 57, "column": 77 } } @@ -4558,22 +4571,22 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 78 }, "end": { - "line": 41, + "line": 57, "column": 79 } } }, "loc": { "start": { - "line": 41, + "line": 57, "column": 78 }, "end": { - "line": 41, + "line": 57, "column": 81 } } @@ -4749,11 +4762,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 43, + "line": 59, "column": 2 } } @@ -4762,11 +4775,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 80 }, "end": { - "line": 43, + "line": 59, "column": 2 } } @@ -4774,11 +4787,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 43, + "line": 59, "column": 2 } } @@ -4805,22 +4818,22 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 13 }, "end": { - "line": 45, + "line": 61, "column": 14 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 13 }, "end": { - "line": 45, + "line": 61, "column": 15 } } @@ -4828,11 +4841,11 @@ ], "loc": { "start": { - "line": 45, + "line": 61, "column": 12 }, "end": { - "line": 45, + "line": 61, "column": 15 } } @@ -4851,22 +4864,22 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 22 }, "end": { - "line": 45, + "line": 61, "column": 23 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 22 }, "end": { - "line": 45, + "line": 61, "column": 24 } } @@ -4874,11 +4887,11 @@ ], "loc": { "start": { - "line": 45, + "line": 61, "column": 21 }, "end": { - "line": 45, + "line": 61, "column": 24 } } @@ -4887,33 +4900,33 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 45, + "line": 61, "column": 30 }, "end": { - "line": 45, + "line": 61, "column": 36 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 21 }, "end": { - "line": 45, + "line": 61, "column": 36 } } }, "loc": { "start": { - "line": 45, + "line": 61, "column": 8 }, "end": { - "line": 45, + "line": 61, "column": 36 } } @@ -4921,11 +4934,11 @@ "decorators": [], "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 6 } } @@ -4933,11 +4946,11 @@ "init": null, "loc": { "start": { - "line": 45, + "line": 61, "column": 5 }, "end": { - "line": 45, + "line": 61, "column": 6 } } @@ -4946,11 +4959,11 @@ "kind": "var", "loc": { "start": { - "line": 45, + "line": 61, "column": 1 }, "end": { - "line": 45, + "line": 61, "column": 37 } } @@ -4976,11 +4989,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 46, + "line": 62, "column": 32 }, "end": { - "line": 46, + "line": 62, "column": 38 } } @@ -4989,11 +5002,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 46, + "line": 62, "column": 41 }, "end": { - "line": 46, + "line": 62, "column": 47 } } @@ -5001,11 +5014,11 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 32 }, "end": { - "line": 46, + "line": 62, "column": 47 } } @@ -5013,11 +5026,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 29 }, "end": { - "line": 46, + "line": 62, "column": 30 } } @@ -5034,11 +5047,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 9 }, "end": { - "line": 46, + "line": 62, "column": 10 } } @@ -5051,33 +5064,33 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 19 }, "end": { - "line": 46, + "line": 62, "column": 20 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 19 }, "end": { - "line": 46, + "line": 62, "column": 20 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 9 }, "end": { - "line": 46, + "line": 62, "column": 21 } } @@ -5090,11 +5103,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 22 }, "end": { - "line": 46, + "line": 62, "column": 23 } } @@ -5106,33 +5119,33 @@ "value": 5, "loc": { "start": { - "line": 46, + "line": 62, "column": 26 }, "end": { - "line": 46, + "line": 62, "column": 27 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 26 }, "end": { - "line": 46, + "line": 62, "column": 27 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 22 }, "end": { - "line": 46, + "line": 62, "column": 28 } } @@ -5140,11 +5153,11 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 8 }, "end": { - "line": 46, + "line": 62, "column": 28 } } @@ -5163,11 +5176,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 54 }, "end": { - "line": 46, + "line": 62, "column": 55 } } @@ -5176,22 +5189,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 46, + "line": 62, "column": 57 }, "end": { - "line": 46, + "line": 62, "column": 63 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 54 }, "end": { - "line": 46, + "line": 62, "column": 65 } } @@ -5199,22 +5212,22 @@ ], "loc": { "start": { - "line": 46, + "line": 62, "column": 52 }, "end": { - "line": 46, + "line": 62, "column": 65 } } }, "loc": { "start": { - "line": 46, + "line": 62, "column": 8 }, "end": { - "line": 46, + "line": 62, "column": 65 } } @@ -5222,11 +5235,11 @@ "decorators": [], "loc": { "start": { - "line": 46, + "line": 62, "column": 5 }, "end": { - "line": 46, + "line": 62, "column": 6 } } @@ -5234,11 +5247,11 @@ "init": null, "loc": { "start": { - "line": 46, + "line": 62, "column": 5 }, "end": { - "line": 46, + "line": 62, "column": 6 } } @@ -5247,11 +5260,11 @@ "kind": "var", "loc": { "start": { - "line": 46, + "line": 62, "column": 1 }, "end": { - "line": 46, + "line": 62, "column": 66 } } @@ -5276,11 +5289,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 8 }, "end": { - "line": 48, + "line": 64, "column": 9 } } @@ -5291,22 +5304,22 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 10 }, "end": { - "line": 48, + "line": 64, "column": 11 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 8 }, "end": { - "line": 48, + "line": 64, "column": 12 } } @@ -5322,11 +5335,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 12 }, "end": { - "line": 48, + "line": 64, "column": 13 } } @@ -5342,11 +5355,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 14 }, "end": { - "line": 48, + "line": 64, "column": 15 } } @@ -5358,11 +5371,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 48, + "line": 64, "column": 16 }, "end": { - "line": 48, + "line": 64, "column": 22 } } @@ -5370,22 +5383,22 @@ ], "loc": { "start": { - "line": 48, + "line": 64, "column": 14 }, "end": { - "line": 48, + "line": 64, "column": 25 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 14 }, "end": { - "line": 48, + "line": 64, "column": 15 } } @@ -5393,22 +5406,22 @@ ], "loc": { "start": { - "line": 48, + "line": 64, "column": 12 }, "end": { - "line": 48, + "line": 64, "column": 25 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 12 }, "end": { - "line": 48, + "line": 64, "column": 13 } } @@ -5416,22 +5429,22 @@ ], "loc": { "start": { - "line": 48, + "line": 64, "column": 11 }, "end": { - "line": 48, + "line": 64, "column": 25 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 8 }, "end": { - "line": 48, + "line": 64, "column": 26 } } @@ -5443,33 +5456,33 @@ "value": 0, "loc": { "start": { - "line": 48, + "line": 64, "column": 26 }, "end": { - "line": 48, + "line": 64, "column": 27 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 26 }, "end": { - "line": 48, + "line": 64, "column": 27 } } }, "loc": { "start": { - "line": 48, + "line": 64, "column": 8 }, "end": { - "line": 48, + "line": 64, "column": 29 } } @@ -5477,11 +5490,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 5 }, "end": { - "line": 48, + "line": 64, "column": 6 } } @@ -5489,11 +5502,11 @@ "init": null, "loc": { "start": { - "line": 48, + "line": 64, "column": 5 }, "end": { - "line": 48, + "line": 64, "column": 6 } } @@ -5502,11 +5515,11 @@ "kind": "var", "loc": { "start": { - "line": 48, + "line": 64, "column": 1 }, "end": { - "line": 48, + "line": 64, "column": 29 } } @@ -5527,11 +5540,11 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 8 }, "end": { - "line": 49, + "line": 65, "column": 9 } } @@ -5543,11 +5556,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 10 }, "end": { - "line": 49, + "line": 65, "column": 16 } } @@ -5566,11 +5579,11 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 20 }, "end": { - "line": 49, + "line": 65, "column": 21 } } @@ -5579,22 +5592,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 23 }, "end": { - "line": 49, + "line": 65, "column": 29 } } }, "loc": { "start": { - "line": 49, + "line": 65, "column": 20 }, "end": { - "line": 49, + "line": 65, "column": 30 } } @@ -5610,11 +5623,11 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 31 }, "end": { - "line": 49, + "line": 65, "column": 32 } } @@ -5623,22 +5636,22 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 34 }, "end": { - "line": 49, + "line": 65, "column": 40 } } }, "loc": { "start": { - "line": 49, + "line": 65, "column": 31 }, "end": { - "line": 49, + "line": 65, "column": 42 } } @@ -5646,11 +5659,11 @@ ], "loc": { "start": { - "line": 49, + "line": 65, "column": 18 }, "end": { - "line": 49, + "line": 65, "column": 42 } } @@ -5662,11 +5675,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 45 }, "end": { - "line": 49, + "line": 65, "column": 52 } } @@ -5675,11 +5688,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 49, + "line": 65, "column": 53 }, "end": { - "line": 49, + "line": 65, "column": 60 } } @@ -5687,11 +5700,11 @@ ], "loc": { "start": { - "line": 49, + "line": 65, "column": 44 }, "end": { - "line": 49, + "line": 65, "column": 60 } } @@ -5699,22 +5712,22 @@ ], "loc": { "start": { - "line": 49, + "line": 65, "column": 8 }, "end": { - "line": 49, + "line": 65, "column": 61 } } }, "loc": { "start": { - "line": 49, + "line": 65, "column": 8 }, "end": { - "line": 49, + "line": 65, "column": 9 } } @@ -5722,11 +5735,11 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 5 }, "end": { - "line": 49, + "line": 65, "column": 6 } } @@ -5734,11 +5747,11 @@ "init": null, "loc": { "start": { - "line": 49, + "line": 65, "column": 5 }, "end": { - "line": 49, + "line": 65, "column": 6 } } @@ -5747,11 +5760,11 @@ "kind": "var", "loc": { "start": { - "line": 49, + "line": 65, "column": 1 }, "end": { - "line": 49, + "line": 65, "column": 62 } } @@ -5772,11 +5785,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 8 }, "end": { - "line": 50, + "line": 66, "column": 9 } } @@ -5798,22 +5811,22 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 11 }, "end": { - "line": 50, + "line": 66, "column": 12 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 11 }, "end": { - "line": 50, + "line": 66, "column": 13 } } @@ -5821,11 +5834,11 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 10 }, "end": { - "line": 50, + "line": 66, "column": 13 } } @@ -5835,22 +5848,22 @@ "members": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 19 }, "end": { - "line": 50, + "line": 66, "column": 21 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 10 }, "end": { - "line": 50, + "line": 66, "column": 21 } } @@ -5858,22 +5871,22 @@ ], "loc": { "start": { - "line": 50, + "line": 66, "column": 8 }, "end": { - "line": 50, + "line": 66, "column": 22 } } }, "loc": { "start": { - "line": 50, + "line": 66, "column": 8 }, "end": { - "line": 50, + "line": 66, "column": 9 } } @@ -5881,11 +5894,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 5 }, "end": { - "line": 50, + "line": 66, "column": 6 } } @@ -5893,11 +5906,11 @@ "init": null, "loc": { "start": { - "line": 50, + "line": 66, "column": 5 }, "end": { - "line": 50, + "line": 66, "column": 6 } } @@ -5906,11 +5919,11 @@ "kind": "var", "loc": { "start": { - "line": 50, + "line": 66, "column": 1 }, "end": { - "line": 50, + "line": 66, "column": 23 } } @@ -5923,11 +5936,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 6 }, "end": { - "line": 52, + "line": 68, "column": 7 } } @@ -5939,11 +5952,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 38 }, "end": { - "line": 52, + "line": 68, "column": 44 } } @@ -5956,22 +5969,22 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 47 }, "end": { - "line": 52, + "line": 68, "column": 48 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 47 }, "end": { - "line": 52, + "line": 68, "column": 48 } } @@ -5980,11 +5993,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 51 }, "end": { - "line": 52, + "line": 68, "column": 57 } } @@ -5992,11 +6005,11 @@ ], "loc": { "start": { - "line": 52, + "line": 68, "column": 38 }, "end": { - "line": 52, + "line": 68, "column": 57 } } @@ -6012,11 +6025,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 8 }, "end": { - "line": 52, + "line": 68, "column": 9 } } @@ -6029,33 +6042,33 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 18 }, "end": { - "line": 52, + "line": 68, "column": 19 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 18 }, "end": { - "line": 52, + "line": 68, "column": 19 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 8 }, "end": { - "line": 52, + "line": 68, "column": 20 } } @@ -6068,22 +6081,22 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 21 }, "end": { - "line": 52, + "line": 68, "column": 22 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 21 }, "end": { - "line": 52, + "line": 68, "column": 23 } } @@ -6096,11 +6109,11 @@ "decorators": [], "loc": { "start": { - "line": 52, + "line": 68, "column": 24 }, "end": { - "line": 52, + "line": 68, "column": 25 } } @@ -6109,22 +6122,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 52, + "line": 68, "column": 28 }, "end": { - "line": 52, + "line": 68, "column": 34 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 24 }, "end": { - "line": 52, + "line": 68, "column": 35 } } @@ -6132,22 +6145,22 @@ ], "loc": { "start": { - "line": 52, + "line": 68, "column": 7 }, "end": { - "line": 52, + "line": 68, "column": 35 } } }, "loc": { "start": { - "line": 52, + "line": 68, "column": 1 }, "end": { - "line": 52, + "line": 68, "column": 58 } } @@ -6156,11 +6169,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 52, + "line": 68, "column": 57 }, "end": { - "line": 52, + "line": 68, "column": 58 } } @@ -6173,11 +6186,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 6 }, "end": { - "line": 53, + "line": 69, "column": 7 } } @@ -6196,11 +6209,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 52 }, "end": { - "line": 53, + "line": 69, "column": 53 } } @@ -6213,33 +6226,33 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 54 }, "end": { - "line": 53, + "line": 69, "column": 55 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 54 }, "end": { - "line": 53, + "line": 69, "column": 55 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 52 }, "end": { - "line": 53, + "line": 69, "column": 56 } } @@ -6255,11 +6268,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 57 }, "end": { - "line": 53, + "line": 69, "column": 58 } } @@ -6272,33 +6285,33 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 59 }, "end": { - "line": 53, + "line": 69, "column": 60 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 59 }, "end": { - "line": 53, + "line": 69, "column": 60 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 57 }, "end": { - "line": 53, + "line": 69, "column": 61 } } @@ -6306,11 +6319,11 @@ ], "loc": { "start": { - "line": 53, + "line": 69, "column": 51 }, "end": { - "line": 53, + "line": 69, "column": 61 } } @@ -6326,22 +6339,22 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 8 }, "end": { - "line": 53, + "line": 69, "column": 9 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 8 }, "end": { - "line": 53, + "line": 69, "column": 10 } } @@ -6354,11 +6367,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 11 }, "end": { - "line": 53, + "line": 69, "column": 12 } } @@ -6373,11 +6386,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 16 }, "end": { - "line": 53, + "line": 69, "column": 23 } } @@ -6386,11 +6399,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 24 }, "end": { - "line": 53, + "line": 69, "column": 31 } } @@ -6399,11 +6412,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 32 }, "end": { - "line": 53, + "line": 69, "column": 39 } } @@ -6411,11 +6424,11 @@ ], "loc": { "start": { - "line": 53, + "line": 69, "column": 15 }, "end": { - "line": 53, + "line": 69, "column": 39 } } @@ -6426,22 +6439,22 @@ "type": "TSAnyKeyword", "loc": { "start": { - "line": 53, + "line": 69, "column": 42 }, "end": { - "line": 53, + "line": 69, "column": 45 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 42 }, "end": { - "line": 53, + "line": 69, "column": 47 } } @@ -6449,22 +6462,22 @@ ], "loc": { "start": { - "line": 53, + "line": 69, "column": 15 }, "end": { - "line": 53, + "line": 69, "column": 47 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 11 }, "end": { - "line": 53, + "line": 69, "column": 48 } } @@ -6472,22 +6485,22 @@ ], "loc": { "start": { - "line": 53, + "line": 69, "column": 7 }, "end": { - "line": 53, + "line": 69, "column": 48 } } }, "loc": { "start": { - "line": 53, + "line": 69, "column": 1 }, "end": { - "line": 53, + "line": 69, "column": 62 } } @@ -6496,11 +6509,11 @@ "type": "EmptyStatement", "loc": { "start": { - "line": 53, + "line": 69, "column": 61 }, "end": { - "line": 53, + "line": 69, "column": 62 } } @@ -6515,11 +6528,11 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 1 }, "end": { - "line": 55, + "line": 71, "column": 6 } } @@ -6543,22 +6556,22 @@ "decorators": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 8 }, "end": { - "line": 55, + "line": 71, "column": 9 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 8 }, "end": { - "line": 55, + "line": 71, "column": 10 } } @@ -6566,11 +6579,11 @@ ], "loc": { "start": { - "line": 55, + "line": 71, "column": 7 }, "end": { - "line": 55, + "line": 71, "column": 10 } } @@ -6580,22 +6593,22 @@ "members": [], "loc": { "start": { - "line": 55, + "line": 71, "column": 16 }, "end": { - "line": 55, + "line": 71, "column": 18 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 7 }, "end": { - "line": 55, + "line": 71, "column": 18 } } @@ -6603,33 +6616,33 @@ ], "loc": { "start": { - "line": 55, + "line": 71, "column": 6 }, "end": { - "line": 55, + "line": 71, "column": 19 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 1 }, "end": { - "line": 55, + "line": 71, "column": 21 } } }, "loc": { "start": { - "line": 55, + "line": 71, "column": 1 }, "end": { - "line": 55, + "line": 71, "column": 22 } } @@ -6644,11 +6657,11 @@ "decorators": [], "loc": { "start": { - "line": 56, + "line": 72, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 6 } } @@ -6662,11 +6675,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 56, + "line": 72, "column": 7 }, "end": { - "line": 56, + "line": 72, "column": 13 } } @@ -6674,33 +6687,33 @@ ], "loc": { "start": { - "line": 56, + "line": 72, "column": 6 }, "end": { - "line": 56, + "line": 72, "column": 14 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 16 } } }, "loc": { "start": { - "line": 56, + "line": 72, "column": 1 }, "end": { - "line": 56, + "line": 72, "column": 17 } } @@ -6720,11 +6733,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 57, + "line": 73, "column": 17 }, "end": { - "line": 57, + "line": 73, "column": 23 } } @@ -6740,11 +6753,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 2 }, "end": { - "line": 57, + "line": 73, "column": 3 } } @@ -6757,33 +6770,33 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 12 }, "end": { - "line": 57, + "line": 73, "column": 13 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 12 }, "end": { - "line": 57, + "line": 73, "column": 13 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 2 }, "end": { - "line": 57, + "line": 73, "column": 14 } } @@ -6791,11 +6804,11 @@ ], "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 14 } } @@ -6805,44 +6818,44 @@ "value": true, "loc": { "start": { - "line": 57, + "line": 73, "column": 27 }, "end": { - "line": 57, + "line": 73, "column": 31 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 31 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 31 } } }, "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 57, + "line": 73, "column": 32 } } @@ -6869,11 +6882,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 7 }, "end": { - "line": 58, + "line": 74, "column": 8 } } @@ -6888,11 +6901,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 58, + "line": 74, "column": 27 }, "end": { - "line": 58, + "line": 74, "column": 34 } } @@ -6901,11 +6914,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 58, + "line": 74, "column": 35 }, "end": { - "line": 58, + "line": 74, "column": 42 } } @@ -6913,33 +6926,33 @@ ], "loc": { "start": { - "line": 58, + "line": 74, "column": 26 }, "end": { - "line": 58, + "line": 74, "column": 42 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 17 }, "end": { - "line": 58, + "line": 74, "column": 42 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 7 }, "end": { - "line": 58, + "line": 74, "column": 43 } } @@ -6947,11 +6960,11 @@ ], "loc": { "start": { - "line": 58, + "line": 74, "column": 6 }, "end": { - "line": 58, + "line": 74, "column": 43 } } @@ -6963,25 +6976,25 @@ "type": "ReturnStatement", "argument": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 58, + "line": 74, "column": 57 }, "end": { - "line": 58, + "line": 74, "column": 62 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 50 }, "end": { - "line": 58, + "line": 74, "column": 63 } } @@ -6989,44 +7002,44 @@ ], "loc": { "start": { - "line": 58, + "line": 74, "column": 49 }, "end": { - "line": 58, + "line": 74, "column": 64 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 64 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 64 } } }, "loc": { "start": { - "line": 58, + "line": 74, "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 65 } } @@ -7038,7 +7051,7 @@ "column": 1 }, "end": { - "line": 58, + "line": 74, "column": 65 } } diff --git a/es2panda/test/parser/ts/test_import_type-expected.txt b/es2panda/test/parser/ts/test_import_type-expected.txt index bff178a94ffca8b0e7e5b6e7d2784b12cb1e79e4..1f19c1b27a3fbef5b4def9bda16a29f8560caee6 100644 --- a/es2panda/test/parser/ts/test_import_type-expected.txt +++ b/es2panda/test/parser/ts/test_import_type-expected.txt @@ -18,22 +18,22 @@ "value": "tar", "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 20 } } }, "loc": { "start": { - "line": 1, + "line": 17, "column": 15 }, "end": { - "line": 1, + "line": 17, "column": 20 } } @@ -41,11 +41,11 @@ "isTypeOf": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 8 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -53,11 +53,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -65,11 +65,11 @@ "init": null, "loc": { "start": { - "line": 1, + "line": 17, "column": 5 }, "end": { - "line": 1, + "line": 17, "column": 6 } } @@ -78,11 +78,11 @@ "kind": "var", "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 1, + "line": 17, "column": 22 } } @@ -102,11 +102,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 6 } } @@ -121,22 +121,22 @@ "value": "foo", "loc": { "start": { - "line": 4, + "line": 20, "column": 17 }, "end": { - "line": 4, + "line": 20, "column": 22 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 17 }, "end": { - "line": 4, + "line": 20, "column": 22 } } @@ -147,11 +147,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 24 }, "end": { - "line": 4, + "line": 20, "column": 25 } } @@ -159,22 +159,22 @@ "isTypeOf": false, "loc": { "start": { - "line": 4, + "line": 20, "column": 10 }, "end": { - "line": 4, + "line": 20, "column": 26 } } }, "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 4, + "line": 20, "column": 26 } } @@ -188,11 +188,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 15 } } @@ -200,11 +200,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 6 }, "end": { - "line": 5, + "line": 21, "column": 7 } } @@ -218,22 +218,22 @@ "value": "baz", "loc": { "start": { - "line": 5, + "line": 21, "column": 32 }, "end": { - "line": 5, + "line": 21, "column": 37 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 32 }, "end": { - "line": 5, + "line": 21, "column": 37 } } @@ -244,11 +244,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 39 }, "end": { - "line": 5, + "line": 21, "column": 40 } } @@ -256,11 +256,11 @@ "isTypeOf": true, "loc": { "start": { - "line": 5, + "line": 21, "column": 18 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -268,11 +268,11 @@ "readonly": false, "loc": { "start": { - "line": 5, + "line": 21, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -280,11 +280,11 @@ ], "loc": { "start": { - "line": 3, + "line": 19, "column": 13 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -295,11 +295,11 @@ "decorators": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 11 }, "end": { - "line": 3, + "line": 19, "column": 12 } } @@ -307,11 +307,11 @@ "extends": [], "loc": { "start": { - "line": 3, + "line": 19, "column": 1 }, "end": { - "line": 6, + "line": 22, "column": 2 } } @@ -326,11 +326,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 10 }, "end": { - "line": 8, + "line": 24, "column": 11 } } @@ -351,22 +351,22 @@ "value": "bar", "loc": { "start": { - "line": 8, + "line": 24, "column": 22 }, "end": { - "line": 8, + "line": 24, "column": 27 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 22 }, "end": { - "line": 8, + "line": 24, "column": 27 } } @@ -381,11 +381,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 30 } } @@ -396,22 +396,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 31 }, "end": { - "line": 8, + "line": 24, "column": 32 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 32 } } @@ -422,22 +422,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 33 }, "end": { - "line": 8, + "line": 24, "column": 34 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 29 }, "end": { - "line": 8, + "line": 24, "column": 35 } } @@ -445,11 +445,11 @@ "isTypeOf": false, "loc": { "start": { - "line": 8, + "line": 24, "column": 15 }, "end": { - "line": 8, + "line": 24, "column": 35 } } @@ -457,11 +457,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 12 }, "end": { - "line": 8, + "line": 24, "column": 13 } } @@ -476,22 +476,22 @@ "value": "foo", "loc": { "start": { - "line": 8, + "line": 24, "column": 44 }, "end": { - "line": 8, + "line": 24, "column": 49 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 44 }, "end": { - "line": 8, + "line": 24, "column": 49 } } @@ -512,11 +512,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 57 }, "end": { - "line": 8, + "line": 24, "column": 63 } } @@ -525,11 +525,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 66 }, "end": { - "line": 8, + "line": 24, "column": 72 } } @@ -537,11 +537,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 57 }, "end": { - "line": 8, + "line": 24, "column": 72 } } @@ -549,11 +549,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 55 }, "end": { - "line": 8, + "line": 24, "column": 56 } } @@ -570,22 +570,22 @@ "value": "a", "loc": { "start": { - "line": 8, + "line": 24, "column": 91 }, "end": { - "line": 8, + "line": 24, "column": 94 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 91 }, "end": { - "line": 8, + "line": 24, "column": 94 } } @@ -600,11 +600,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 97 }, "end": { - "line": 8, + "line": 24, "column": 104 } } @@ -613,11 +613,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 105 }, "end": { - "line": 8, + "line": 24, "column": 112 } } @@ -625,11 +625,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 96 }, "end": { - "line": 8, + "line": 24, "column": 112 } } @@ -639,11 +639,11 @@ "members": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 114 }, "end": { - "line": 8, + "line": 24, "column": 116 } } @@ -651,11 +651,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 95 }, "end": { - "line": 8, + "line": 24, "column": 117 } } @@ -663,11 +663,11 @@ "isTypeOf": true, "loc": { "start": { - "line": 8, + "line": 24, "column": 77 }, "end": { - "line": 8, + "line": 24, "column": 118 } } @@ -675,11 +675,11 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 74 }, "end": { - "line": 8, + "line": 24, "column": 75 } } @@ -696,22 +696,22 @@ "decorators": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 52 }, "end": { - "line": 8, + "line": 24, "column": 53 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 52 }, "end": { - "line": 8, + "line": 24, "column": 54 } } @@ -719,11 +719,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 51 }, "end": { - "line": 8, + "line": 24, "column": 54 } } @@ -734,33 +734,33 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 8, + "line": 24, "column": 122 }, "end": { - "line": 8, + "line": 24, "column": 128 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 122 }, "end": { - "line": 8, + "line": 24, "column": 130 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 51 }, "end": { - "line": 8, + "line": 24, "column": 130 } } @@ -768,11 +768,11 @@ ], "loc": { "start": { - "line": 8, + "line": 24, "column": 50 }, "end": { - "line": 8, + "line": 24, "column": 131 } } @@ -780,11 +780,11 @@ "isTypeOf": false, "loc": { "start": { - "line": 8, + "line": 24, "column": 37 }, "end": { - "line": 8, + "line": 24, "column": 133 } } @@ -794,33 +794,33 @@ "statements": [], "loc": { "start": { - "line": 8, + "line": 24, "column": 132 }, "end": { - "line": 10, + "line": 26, "column": 2 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 2 } } }, "loc": { "start": { - "line": 8, + "line": 24, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 2 } } @@ -832,7 +832,7 @@ "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 2 } } diff --git a/es2panda/test/parser/ts/test_module-expected.txt b/es2panda/test/parser/ts/test_module-expected.txt index 26790b9ecac0e4644c365dea9c5a29efcc8d2b42..6e647b6b18368d61997f6b6ce6828626dd569eb3 100644 --- a/es2panda/test/parser/ts/test_module-expected.txt +++ b/es2panda/test/parser/ts/test_module-expected.txt @@ -9,11 +9,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 12 } } @@ -32,11 +32,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -44,11 +44,11 @@ "init": null, "loc": { "start": { - "line": 2, + "line": 18, "column": 9 }, "end": { - "line": 2, + "line": 18, "column": 10 } } @@ -57,11 +57,11 @@ "kind": "let", "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 11 } } @@ -82,11 +82,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 10 } } @@ -101,11 +101,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 16 }, "end": { - "line": 5, + "line": 21, "column": 22 } } @@ -113,11 +113,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 13 }, "end": { - "line": 5, + "line": 21, "column": 14 } } @@ -129,11 +129,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 27 }, "end": { - "line": 5, + "line": 21, "column": 33 } } @@ -141,11 +141,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 24 }, "end": { - "line": 5, + "line": 21, "column": 25 } } @@ -155,33 +155,33 @@ "type": "TSBooleanKeyword", "loc": { "start": { - "line": 5, + "line": 21, "column": 38 }, "end": { - "line": 5, + "line": 21, "column": 45 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 12 }, "end": { - "line": 5, + "line": 21, "column": 45 } } }, "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 5, + "line": 21, "column": 46 } } @@ -196,11 +196,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 10 } } @@ -210,22 +210,22 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 14 }, "end": { - "line": 6, + "line": 22, "column": 20 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -233,11 +233,11 @@ ], "loc": { "start": { - "line": 4, + "line": 20, "column": 17 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -248,11 +248,11 @@ "decorators": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 15 }, "end": { - "line": 4, + "line": 20, "column": 16 } } @@ -260,11 +260,11 @@ "extends": [], "loc": { "start": { - "line": 4, + "line": 20, "column": 5 }, "end": { - "line": 7, + "line": 23, "column": 6 } } @@ -272,11 +272,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 13 }, "end": { - "line": 8, + "line": 24, "column": 2 } } @@ -285,11 +285,11 @@ "global": false, "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 10, + "line": 26, "column": 10 } } @@ -302,11 +302,11 @@ "decorators": [], "loc": { "start": { - "line": 10, + "line": 26, "column": 11 }, "end": { - "line": 10, + "line": 26, "column": 12 } } @@ -325,11 +325,11 @@ "decorators": [], "loc": { "start": { - "line": 11, + "line": 27, "column": 9 }, "end": { - "line": 11, + "line": 27, "column": 10 } } @@ -337,11 +337,11 @@ "init": null, "loc": { "start": { - "line": 11, + "line": 27, "column": 9 }, "end": { - "line": 11, + "line": 27, "column": 10 } } @@ -350,11 +350,11 @@ "kind": "let", "loc": { "start": { - "line": 11, + "line": 27, "column": 5 }, "end": { - "line": 11, + "line": 27, "column": 11 } } @@ -369,11 +369,11 @@ "decorators": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 14 }, "end": { - "line": 13, + "line": 29, "column": 15 } } @@ -387,33 +387,33 @@ "statements": [], "loc": { "start": { - "line": 13, + "line": 29, "column": 18 }, "end": { - "line": 13, + "line": 29, "column": 21 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 21 } } }, "loc": { "start": { - "line": 13, + "line": 29, "column": 5 }, "end": { - "line": 13, + "line": 29, "column": 21 } } @@ -421,11 +421,11 @@ ], "loc": { "start": { - "line": 10, + "line": 26, "column": 13 }, "end": { - "line": 14, + "line": 30, "column": 2 } } @@ -434,11 +434,11 @@ "global": false, "loc": { "start": { - "line": 10, + "line": 26, "column": 1 }, "end": { - "line": 16, + "line": 32, "column": 7 } } @@ -451,11 +451,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 8 }, "end": { - "line": 16, + "line": 32, "column": 9 } } @@ -468,11 +468,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 10 }, "end": { - "line": 16, + "line": 32, "column": 11 } } @@ -485,11 +485,11 @@ "decorators": [], "loc": { "start": { - "line": 16, + "line": 32, "column": 12 }, "end": { - "line": 16, + "line": 32, "column": 13 } } @@ -508,11 +508,11 @@ "decorators": [], "loc": { "start": { - "line": 17, + "line": 33, "column": 9 }, "end": { - "line": 17, + "line": 33, "column": 10 } } @@ -520,11 +520,11 @@ "init": null, "loc": { "start": { - "line": 17, + "line": 33, "column": 9 }, "end": { - "line": 17, + "line": 33, "column": 10 } } @@ -533,11 +533,11 @@ "kind": "let", "loc": { "start": { - "line": 17, + "line": 33, "column": 5 }, "end": { - "line": 17, + "line": 33, "column": 11 } } @@ -548,15 +548,15 @@ "type": "ScriptFunction", "id": { "type": "Identifier", - "name": "b", + "name": "t", "decorators": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 14 }, "end": { - "line": 19, + "line": 35, "column": 15 } } @@ -570,33 +570,33 @@ "statements": [], "loc": { "start": { - "line": 19, + "line": 35, "column": 18 }, "end": { - "line": 19, + "line": 35, "column": 21 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 19, + "line": 35, "column": 21 } } }, "loc": { "start": { - "line": 19, + "line": 35, "column": 5 }, "end": { - "line": 19, + "line": 35, "column": 21 } } @@ -604,11 +604,11 @@ ], "loc": { "start": { - "line": 16, + "line": 32, "column": 14 }, "end": { - "line": 20, + "line": 36, "column": 2 } } @@ -617,11 +617,11 @@ "global": false, "loc": { "start": { - "line": 16, + "line": 32, "column": 12 }, "end": { - "line": 23, + "line": 39, "column": 7 } } @@ -630,11 +630,11 @@ "global": false, "loc": { "start": { - "line": 16, + "line": 32, "column": 10 }, "end": { - "line": 23, + "line": 39, "column": 7 } } @@ -643,11 +643,11 @@ "global": false, "loc": { "start": { - "line": 16, + "line": 32, "column": 1 }, "end": { - "line": 23, + "line": 39, "column": 7 } } @@ -660,11 +660,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 8 }, "end": { - "line": 23, + "line": 39, "column": 9 } } @@ -677,11 +677,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 10 }, "end": { - "line": 23, + "line": 39, "column": 11 } } @@ -694,11 +694,11 @@ "decorators": [], "loc": { "start": { - "line": 23, + "line": 39, "column": 12 }, "end": { - "line": 23, + "line": 39, "column": 13 } } @@ -717,11 +717,11 @@ "decorators": [], "loc": { "start": { - "line": 24, + "line": 40, "column": 9 }, "end": { - "line": 24, + "line": 40, "column": 10 } } @@ -729,11 +729,11 @@ "init": null, "loc": { "start": { - "line": 24, + "line": 40, "column": 9 }, "end": { - "line": 24, + "line": 40, "column": 10 } } @@ -742,11 +742,11 @@ "kind": "let", "loc": { "start": { - "line": 24, + "line": 40, "column": 5 }, "end": { - "line": 24, + "line": 40, "column": 11 } } @@ -757,15 +757,15 @@ "type": "ScriptFunction", "id": { "type": "Identifier", - "name": "b", + "name": "t", "decorators": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 14 }, "end": { - "line": 26, + "line": 42, "column": 15 } } @@ -779,33 +779,33 @@ "statements": [], "loc": { "start": { - "line": 26, + "line": 42, "column": 18 }, "end": { - "line": 26, + "line": 42, "column": 21 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 26, + "line": 42, "column": 21 } } }, "loc": { "start": { - "line": 26, + "line": 42, "column": 5 }, "end": { - "line": 26, + "line": 42, "column": 21 } } @@ -813,11 +813,11 @@ ], "loc": { "start": { - "line": 23, + "line": 39, "column": 14 }, "end": { - "line": 27, + "line": 43, "column": 2 } } @@ -826,11 +826,11 @@ "global": false, "loc": { "start": { - "line": 23, + "line": 39, "column": 12 }, "end": { - "line": 29, + "line": 45, "column": 8 } } @@ -839,11 +839,11 @@ "global": false, "loc": { "start": { - "line": 23, + "line": 39, "column": 10 }, "end": { - "line": 29, + "line": 45, "column": 8 } } @@ -852,11 +852,11 @@ "global": false, "loc": { "start": { - "line": 23, + "line": 39, "column": 1 }, "end": { - "line": 29, + "line": 45, "column": 8 } } @@ -869,11 +869,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 19 }, "end": { - "line": 29, + "line": 45, "column": 20 } } @@ -886,11 +886,11 @@ "decorators": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 21 }, "end": { - "line": 29, + "line": 45, "column": 22 } } @@ -900,11 +900,11 @@ "body": [], "loc": { "start": { - "line": 29, + "line": 45, "column": 23 }, "end": { - "line": 31, + "line": 47, "column": 2 } } @@ -913,11 +913,11 @@ "global": false, "loc": { "start": { - "line": 29, + "line": 45, "column": 21 }, "end": { - "line": 33, + "line": 49, "column": 8 } } @@ -926,11 +926,11 @@ "global": false, "loc": { "start": { - "line": 29, + "line": 45, "column": 9 }, "end": { - "line": 33, + "line": 49, "column": 8 } } @@ -943,11 +943,11 @@ "decorators": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 9 }, "end": { - "line": 33, + "line": 49, "column": 15 } } @@ -957,11 +957,11 @@ "body": [], "loc": { "start": { - "line": 33, + "line": 49, "column": 16 }, "end": { - "line": 35, + "line": 51, "column": 2 } } @@ -970,11 +970,11 @@ "global": true, "loc": { "start": { - "line": 33, + "line": 49, "column": 9 }, "end": { - "line": 37, + "line": 53, "column": 8 } } @@ -983,14 +983,14 @@ "type": "TSModuleDeclaration", "id": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 37, + "line": 53, "column": 16 }, "end": { - "line": 37, + "line": 53, "column": 21 } } @@ -999,11 +999,11 @@ "global": false, "loc": { "start": { - "line": 37, + "line": 53, "column": 9 }, "end": { - "line": 39, + "line": 55, "column": 7 } } @@ -1021,11 +1021,11 @@ "decorators": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 12 }, "end": { - "line": 39, + "line": 55, "column": 13 } } @@ -1033,11 +1033,11 @@ "init": null, "loc": { "start": { - "line": 39, + "line": 55, "column": 12 }, "end": { - "line": 39, + "line": 55, "column": 13 } } @@ -1046,11 +1046,11 @@ "kind": "var", "loc": { "start": { - "line": 39, + "line": 55, "column": 8 }, "end": { - "line": 39, + "line": 55, "column": 14 } } @@ -1059,11 +1059,11 @@ "specifiers": [], "loc": { "start": { - "line": 39, + "line": 55, "column": 1 }, "end": { - "line": 39, + "line": 55, "column": 14 } } @@ -1076,11 +1076,11 @@ "decorators": [], "loc": { "start": { - "line": 41, + "line": 57, "column": 8 }, "end": { - "line": 41, + "line": 57, "column": 15 } } @@ -1101,11 +1101,11 @@ "decorators": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 24 }, "end": { - "line": 42, + "line": 58, "column": 25 } } @@ -1113,11 +1113,11 @@ "init": null, "loc": { "start": { - "line": 42, + "line": 58, "column": 24 }, "end": { - "line": 42, + "line": 58, "column": 25 } } @@ -1127,11 +1127,11 @@ "declare": true, "loc": { "start": { - "line": 42, + "line": 58, "column": 20 }, "end": { - "line": 42, + "line": 58, "column": 26 } } @@ -1140,11 +1140,11 @@ "specifiers": [], "loc": { "start": { - "line": 42, + "line": 58, "column": 5 }, "end": { - "line": 42, + "line": 58, "column": 26 } } @@ -1160,11 +1160,11 @@ "decorators": [], "loc": { "start": { - "line": 43, + "line": 59, "column": 17 }, "end": { - "line": 43, + "line": 59, "column": 18 } } @@ -1172,11 +1172,11 @@ "init": null, "loc": { "start": { - "line": 43, + "line": 59, "column": 17 }, "end": { - "line": 43, + "line": 59, "column": 18 } } @@ -1186,11 +1186,11 @@ "declare": true, "loc": { "start": { - "line": 43, + "line": 59, "column": 13 }, "end": { - "line": 43, + "line": 59, "column": 19 } } @@ -1206,11 +1206,11 @@ "decorators": [], "loc": { "start": { - "line": 44, + "line": 60, "column": 9 }, "end": { - "line": 44, + "line": 60, "column": 10 } } @@ -1218,11 +1218,11 @@ "init": null, "loc": { "start": { - "line": 44, + "line": 60, "column": 9 }, "end": { - "line": 44, + "line": 60, "column": 10 } } @@ -1231,11 +1231,11 @@ "kind": "var", "loc": { "start": { - "line": 44, + "line": 60, "column": 5 }, "end": { - "line": 44, + "line": 60, "column": 11 } } @@ -1243,11 +1243,11 @@ ], "loc": { "start": { - "line": 41, + "line": 57, "column": 16 }, "end": { - "line": 45, + "line": 61, "column": 2 } } @@ -1256,11 +1256,11 @@ "global": false, "loc": { "start": { - "line": 41, + "line": 57, "column": 1 }, "end": { - "line": 47, + "line": 63, "column": 7 } } @@ -1275,11 +1275,11 @@ "decorators": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 15 }, "end": { - "line": 47, + "line": 63, "column": 22 } } @@ -1300,11 +1300,11 @@ "decorators": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 24 }, "end": { - "line": 48, + "line": 64, "column": 25 } } @@ -1312,11 +1312,11 @@ "init": null, "loc": { "start": { - "line": 48, + "line": 64, "column": 24 }, "end": { - "line": 48, + "line": 64, "column": 25 } } @@ -1326,11 +1326,11 @@ "declare": true, "loc": { "start": { - "line": 48, + "line": 64, "column": 20 }, "end": { - "line": 48, + "line": 64, "column": 26 } } @@ -1339,11 +1339,11 @@ "specifiers": [], "loc": { "start": { - "line": 48, + "line": 64, "column": 5 }, "end": { - "line": 48, + "line": 64, "column": 26 } } @@ -1359,11 +1359,11 @@ "decorators": [], "loc": { "start": { - "line": 49, + "line": 65, "column": 17 }, "end": { - "line": 49, + "line": 65, "column": 18 } } @@ -1371,11 +1371,11 @@ "init": null, "loc": { "start": { - "line": 49, + "line": 65, "column": 17 }, "end": { - "line": 49, + "line": 65, "column": 18 } } @@ -1385,11 +1385,11 @@ "declare": true, "loc": { "start": { - "line": 49, + "line": 65, "column": 13 }, "end": { - "line": 49, + "line": 65, "column": 19 } } @@ -1405,11 +1405,11 @@ "decorators": [], "loc": { "start": { - "line": 50, + "line": 66, "column": 9 }, "end": { - "line": 50, + "line": 66, "column": 10 } } @@ -1417,11 +1417,11 @@ "init": null, "loc": { "start": { - "line": 50, + "line": 66, "column": 9 }, "end": { - "line": 50, + "line": 66, "column": 10 } } @@ -1430,11 +1430,11 @@ "kind": "var", "loc": { "start": { - "line": 50, + "line": 66, "column": 5 }, "end": { - "line": 50, + "line": 66, "column": 11 } } @@ -1442,11 +1442,11 @@ ], "loc": { "start": { - "line": 47, + "line": 63, "column": 23 }, "end": { - "line": 51, + "line": 67, "column": 2 } } @@ -1455,11 +1455,11 @@ "global": false, "loc": { "start": { - "line": 47, + "line": 63, "column": 8 }, "end": { - "line": 53, + "line": 69, "column": 8 } } @@ -1468,11 +1468,11 @@ "specifiers": [], "loc": { "start": { - "line": 47, + "line": 63, "column": 1 }, "end": { - "line": 53, + "line": 69, "column": 8 } } @@ -1485,11 +1485,11 @@ "decorators": [], "loc": { "start": { - "line": 53, + "line": 69, "column": 16 }, "end": { - "line": 53, + "line": 69, "column": 23 } } @@ -1508,11 +1508,11 @@ "decorators": [], "loc": { "start": { - "line": 54, + "line": 70, "column": 9 }, "end": { - "line": 54, + "line": 70, "column": 10 } } @@ -1520,11 +1520,11 @@ "init": null, "loc": { "start": { - "line": 54, + "line": 70, "column": 9 }, "end": { - "line": 54, + "line": 70, "column": 10 } } @@ -1533,11 +1533,11 @@ "kind": "var", "loc": { "start": { - "line": 54, + "line": 70, "column": 5 }, "end": { - "line": 54, + "line": 70, "column": 11 } } @@ -1545,11 +1545,11 @@ ], "loc": { "start": { - "line": 53, + "line": 69, "column": 24 }, "end": { - "line": 55, + "line": 71, "column": 2 } } @@ -1558,11 +1558,11 @@ "global": false, "loc": { "start": { - "line": 53, + "line": 69, "column": 9 }, "end": { - "line": 57, + "line": 73, "column": 7 } } @@ -1577,11 +1577,11 @@ "decorators": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 23 }, "end": { - "line": 57, + "line": 73, "column": 30 } } @@ -1600,11 +1600,11 @@ "decorators": [], "loc": { "start": { - "line": 58, + "line": 74, "column": 9 }, "end": { - "line": 58, + "line": 74, "column": 10 } } @@ -1612,11 +1612,11 @@ "init": null, "loc": { "start": { - "line": 58, + "line": 74, "column": 9 }, "end": { - "line": 58, + "line": 74, "column": 10 } } @@ -1625,11 +1625,11 @@ "kind": "var", "loc": { "start": { - "line": 58, + "line": 74, "column": 5 }, "end": { - "line": 58, + "line": 74, "column": 11 } } @@ -1637,11 +1637,11 @@ ], "loc": { "start": { - "line": 57, + "line": 73, "column": 31 }, "end": { - "line": 59, + "line": 75, "column": 2 } } @@ -1650,11 +1650,11 @@ "global": false, "loc": { "start": { - "line": 57, + "line": 73, "column": 16 }, "end": { - "line": 61, + "line": 77, "column": 8 } } @@ -1663,11 +1663,11 @@ "specifiers": [], "loc": { "start": { - "line": 57, + "line": 73, "column": 1 }, "end": { - "line": 61, + "line": 77, "column": 8 } } @@ -1676,14 +1676,14 @@ "type": "TSModuleDeclaration", "id": { "type": "StringLiteral", - "value": "", + "value": "foo", "loc": { "start": { - "line": 61, + "line": 77, "column": 16 }, "end": { - "line": 61, + "line": 77, "column": 21 } } @@ -1699,11 +1699,11 @@ "decorators": [], "loc": { "start": { - "line": 62, + "line": 78, "column": 19 }, "end": { - "line": 62, + "line": 78, "column": 20 } } @@ -1712,25 +1712,25 @@ "type": "TSExternalModuleReference", "expression": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 62, + "line": 78, "column": 31 }, "end": { - "line": 62, + "line": 78, "column": 36 } } }, "loc": { "start": { - "line": 62, + "line": 78, "column": 23 }, "end": { - "line": 62, + "line": 78, "column": 37 } } @@ -1738,11 +1738,11 @@ "isExport": true, "loc": { "start": { - "line": 62, + "line": 78, "column": 5 }, "end": { - "line": 62, + "line": 78, "column": 38 } } @@ -1755,11 +1755,11 @@ "decorators": [], "loc": { "start": { - "line": 63, + "line": 79, "column": 12 }, "end": { - "line": 63, + "line": 79, "column": 13 } } @@ -1768,25 +1768,25 @@ "type": "TSExternalModuleReference", "expression": { "type": "StringLiteral", - "value": "", + "value": "bar", "loc": { "start": { - "line": 63, + "line": 79, "column": 24 }, "end": { - "line": 63, + "line": 79, "column": 29 } } }, "loc": { "start": { - "line": 63, + "line": 79, "column": 16 }, "end": { - "line": 63, + "line": 79, "column": 30 } } @@ -1794,11 +1794,11 @@ "isExport": false, "loc": { "start": { - "line": 63, + "line": 79, "column": 5 }, "end": { - "line": 63, + "line": 79, "column": 31 } } @@ -1811,11 +1811,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 12 }, "end": { - "line": 64, + "line": 80, "column": 13 } } @@ -1826,11 +1826,11 @@ "decorators": [], "loc": { "start": { - "line": 64, + "line": 80, "column": 16 }, "end": { - "line": 64, + "line": 80, "column": 23 } } @@ -1838,11 +1838,11 @@ "isExport": false, "loc": { "start": { - "line": 64, + "line": 80, "column": 5 }, "end": { - "line": 64, + "line": 80, "column": 24 } } @@ -1850,11 +1850,11 @@ ], "loc": { "start": { - "line": 61, + "line": 77, "column": 22 }, "end": { - "line": 65, + "line": 81, "column": 2 } } @@ -1863,12 +1863,12 @@ "global": false, "loc": { "start": { - "line": 61, + "line": 77, "column": 9 }, "end": { - "line": 65, - "column": 2 + "line": 82, + "column": 1 } } } @@ -1879,8 +1879,8 @@ "column": 1 }, "end": { - "line": 65, - "column": 2 + "line": 82, + "column": 1 } } } diff --git a/es2panda/test/parser/ts/test_module.ts b/es2panda/test/parser/ts/test_module.ts index 7bf4d582c864f0ba768749145faaffbfcc5a7e20..5ceae19d5b0a10f3daa0a57e86b11f2a3a77e6dc 100644 --- a/es2panda/test/parser/ts/test_module.ts +++ b/es2panda/test/parser/ts/test_module.ts @@ -32,14 +32,14 @@ namespace a { module a.b.c { let a; - function b() { } + function t() { } } module a.b.c { let a; - function b() { } + function t() { } } declare namespace k.z { @@ -78,4 +78,4 @@ declare module "foo" { export import a = require("bar"); import b = require("bar"); import c = require; -} \ No newline at end of file +} diff --git a/es2panda/test/parser/ts/test_module1-expected.txt b/es2panda/test/parser/ts/test_module1-expected.txt index 1ad2ef1f4c45899b2f3cab4d12cc6f573a15f47b..3efeb6fd57212c9ae21a7d239dfa7eb2675d6378 100644 --- a/es2panda/test/parser/ts/test_module1-expected.txt +++ b/es2panda/test/parser/ts/test_module1-expected.txt @@ -1 +1 @@ -SyntaxError: A 'declare' modifier cannot be used in an already ambient context. [test_module1.ts:2:5] +SyntaxError: A 'declare' modifier cannot be used in an already ambient context. [test_module1.ts:18:5] diff --git a/es2panda/test/parser/ts/test_module2-expected.txt b/es2panda/test/parser/ts/test_module2-expected.txt index 02e0d2b4fe1d7342dddf7f49f00e778ab7698385..698a8237f4c9aa32049c483304808c686bbb8de8 100644 --- a/es2panda/test/parser/ts/test_module2-expected.txt +++ b/es2panda/test/parser/ts/test_module2-expected.txt @@ -1 +1 @@ -SyntaxError: A 'declare' modifier cannot be used in an already ambient context. [test_module2.ts:2:5] +SyntaxError: A 'declare' modifier cannot be used in an already ambient context. [test_module2.ts:18:5] diff --git a/es2panda/test/parser/ts/test_module3-expected.txt b/es2panda/test/parser/ts/test_module3-expected.txt index d5307ce0f57c0f019f271d24a9252a1bc97b2803..83fe37f2fe11d5cb020b1801a706edd201631293 100644 --- a/es2panda/test/parser/ts/test_module3-expected.txt +++ b/es2panda/test/parser/ts/test_module3-expected.txt @@ -1 +1 @@ -SyntaxError: A 'declare' modifier cannot be used in an already ambient context. [test_module3.ts:2:12] +SyntaxError: A 'declare' modifier cannot be used in an already ambient context. [test_module3.ts:18:12] diff --git a/es2panda/test/parser/ts/test_module4-expected.txt b/es2panda/test/parser/ts/test_module4-expected.txt index c495ed3a31ca45f4b22b711581a0258bdb591571..dec03597cb32a5af76412afa31f302fc2d3c10cd 100644 --- a/es2panda/test/parser/ts/test_module4-expected.txt +++ b/es2panda/test/parser/ts/test_module4-expected.txt @@ -1 +1 @@ -SyntaxError: A 'declare' modifier cannot be used in an already ambient context. [test_module4.ts:2:12] +SyntaxError: A 'declare' modifier cannot be used in an already ambient context. [test_module4.ts:18:12] diff --git a/es2panda/test/parser/ts/test_module5-expected.txt b/es2panda/test/parser/ts/test_module5-expected.txt index 672c8daafcfcec533a2744f0daf6ad04727e771b..b8b6de8d6feb041f15c9799c8755546f068b9980 100644 --- a/es2panda/test/parser/ts/test_module5-expected.txt +++ b/es2panda/test/parser/ts/test_module5-expected.txt @@ -1 +1 @@ -SyntaxError: String literal expected. [test_module5.ts:2:24] +SyntaxError: String literal expected. [test_module5.ts:18:24] diff --git a/es2panda/test/parser/ts/test_module6-expected.txt b/es2panda/test/parser/ts/test_module6-expected.txt index 2a9a8d4616b39046f04d31e09a8b368d6be4c0f6..27f995be8e141660287fe7cb3ec0c06ffeb2c6b7 100644 --- a/es2panda/test/parser/ts/test_module6-expected.txt +++ b/es2panda/test/parser/ts/test_module6-expected.txt @@ -1 +1 @@ -SyntaxError: ')' expected. [test_module6.ts:2:29] +SyntaxError: ')' expected. [test_module6.ts:18:29] diff --git a/es2panda/test/parser/ts/test_this_type-expected.txt b/es2panda/test/parser/ts/test_this_type-expected.txt index 904a3fbb4cef5a6d8481b805e219c393b4014571..df31b0ada70d299794b1f6e22b4cef182b07825e 100644 --- a/es2panda/test/parser/ts/test_this_type-expected.txt +++ b/es2panda/test/parser/ts/test_this_type-expected.txt @@ -17,11 +17,11 @@ "decorators": [], "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 6 } } @@ -33,11 +33,11 @@ "type": "TSThisType", "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 12 } } @@ -46,11 +46,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 2, + "line": 18, "column": 15 }, "end": { - "line": 2, + "line": 18, "column": 21 } } @@ -58,22 +58,22 @@ ], "loc": { "start": { - "line": 2, + "line": 18, "column": 8 }, "end": { - "line": 2, + "line": 18, "column": 21 } } }, "loc": { "start": { - "line": 2, + "line": 18, "column": 5 }, "end": { - "line": 2, + "line": 18, "column": 22 } } @@ -81,11 +81,11 @@ ], "loc": { "start": { - "line": 1, + "line": 17, "column": 16 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -96,11 +96,11 @@ "decorators": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 11 }, "end": { - "line": 1, + "line": 17, "column": 15 } } @@ -108,11 +108,11 @@ "extends": [], "loc": { "start": { - "line": 1, + "line": 17, "column": 1 }, "end": { - "line": 3, + "line": 19, "column": 2 } } @@ -126,11 +126,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 7 }, "end": { - "line": 5, + "line": 21, "column": 8 } } @@ -207,11 +207,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -225,11 +225,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -249,11 +249,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 12 }, "end": { - "line": 6, + "line": 22, "column": 18 } } @@ -261,11 +261,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 9 }, "end": { - "line": 6, + "line": 22, "column": 10 } } @@ -283,11 +283,11 @@ "type": "TSStringKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 24 }, "end": { - "line": 6, + "line": 22, "column": 30 } } @@ -296,11 +296,11 @@ "type": "TSNumberKeyword", "loc": { "start": { - "line": 6, + "line": 22, "column": 33 }, "end": { - "line": 6, + "line": 22, "column": 39 } } @@ -308,11 +308,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 24 }, "end": { - "line": 6, + "line": 22, "column": 40 } } @@ -322,11 +322,11 @@ "members": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 41 }, "end": { - "line": 6, + "line": 22, "column": 44 } } @@ -334,11 +334,11 @@ ], "loc": { "start": { - "line": 6, + "line": 22, "column": 23 }, "end": { - "line": 6, + "line": 22, "column": 44 } } @@ -346,11 +346,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 20 }, "end": { - "line": 6, + "line": 22, "column": 21 } } @@ -360,22 +360,22 @@ "type": "TSThisType", "loc": { "start": { - "line": 6, + "line": 22, "column": 49 }, "end": { - "line": 6, + "line": 22, "column": 53 } } }, "loc": { "start": { - "line": 6, + "line": 22, "column": 8 }, "end": { - "line": 6, + "line": 22, "column": 53 } } @@ -383,11 +383,11 @@ "decorators": [], "loc": { "start": { - "line": 6, + "line": 22, "column": 5 }, "end": { - "line": 6, + "line": 22, "column": 6 } } @@ -396,11 +396,11 @@ "indexSignatures": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 9 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -408,11 +408,11 @@ "decorators": [], "loc": { "start": { - "line": 5, + "line": 21, "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } @@ -424,7 +424,7 @@ "column": 1 }, "end": { - "line": 7, + "line": 23, "column": 2 } } diff --git a/es2panda/test/parser/ts/test_this_type1-expected.txt b/es2panda/test/parser/ts/test_this_type1-expected.txt index 6cfe2114e0b16c0c5e16e9be736f77ff69bba85f..ea46ab28967a99e71d035c9151e60a7b78147202 100644 --- a/es2panda/test/parser/ts/test_this_type1-expected.txt +++ b/es2panda/test/parser/ts/test_this_type1-expected.txt @@ -1 +1 @@ -SyntaxError: A 'this' type is available only in a non-static member of a class or interface. [test_this_type1.ts:1:8] +SyntaxError: A 'this' type is available only in a non-static member of a class or interface. [test_this_type1.ts:17:8] diff --git a/es2panda/test/parser/ts/test_this_type2-expected.txt b/es2panda/test/parser/ts/test_this_type2-expected.txt index 8e1442fe4c5217bb63cf0d22cafc0bc421e87e60..4694012f811d904b8ef1d666744bbd92443ceb5f 100644 --- a/es2panda/test/parser/ts/test_this_type2-expected.txt +++ b/es2panda/test/parser/ts/test_this_type2-expected.txt @@ -1 +1 @@ -SyntaxError: A 'this' type is available only in a non-static member of a class or interface. [test_this_type2.ts:2:24] +SyntaxError: A 'this' type is available only in a non-static member of a class or interface. [test_this_type2.ts:18:24] diff --git a/es2panda/test/runner.py b/es2panda/test/runner.py index c6e542bd773cd8bd656e212cb1a130ac47566207..385cc04a33136720b5dca95b9962f296ca4993f4 100644 --- a/es2panda/test/runner.py +++ b/es2panda/test/runner.py @@ -145,7 +145,7 @@ class Test: process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = process.communicate() - self.output = out.decode("utf-8", errors="ignore") + self.output = out.decode("utf-8", errors="ignore") + err.decode("utf-8", errors="ignore") expected_path = "%s-expected.txt" % (path.splitext(self.path)[0]) try: @@ -228,6 +228,7 @@ class Test262Test(Test): self.fail_kind = self.FailKind.ES2PANDA_FAIL self.error = "out:{}\nerr:{}\ncode:{}".format( out, err, process.returncode) + print(self.error) return self if not need_exec: @@ -309,6 +310,7 @@ class Test262Test(Test): self.fail_kind = self.FailKind.RUNTIME_FAIL self.error = "out:{}\nerr:{}\ncode:{}".format( out, err, process.returncode) + print(self.error) return self @@ -379,7 +381,7 @@ class Runner: self.tests = [] self.failed = 0 self.passed = 0 - self.es2panda = path.join(args.build_dir, 'bin', 'es2panda') + self.es2panda = path.join(args.build_dir, 'es2abc') self.cmd_prefix = [] if args.arm64_qemu: @@ -720,10 +722,10 @@ def main(): if args.regression: runner = RegressionRunner(args) runner.add_directory("parser/js", "js", ["--parse-only"]) - # TODO(aszilagyi): reenable TS tests - # runner.add_directory("parser/ts", "ts", - # ["--parse-only", '--extension=ts']) - # runner.add_directory("compiler/ts", "ts", ["--extension=ts", ]) + runner.add_directory("parser/ts", "ts", + ["--parse-only", "--module", '--extension=ts']) + runner.add_directory("compiler/ts", "ts", + ["--parse-only", "--enable-type-check", "--module", "--extension=ts"]) runners.append(runner) diff --git a/es2panda/typescript/checker.cpp b/es2panda/typescript/checker.cpp index 71be1ad7d6ee73574f6597075110affee7e6ee25..745ef7d42d87de29c45de4f19bf9c51b7d23c936 100644 --- a/es2panda/typescript/checker.cpp +++ b/es2panda/typescript/checker.cpp @@ -34,12 +34,12 @@ Checker::Checker(ArenaAllocator *allocator, binder::Binder *binder) : allocator_(allocator), binder_(binder), rootNode_(binder->TopScope()->Node()->AsBlockStatement()), - scope_(binder->TopScope()) + scope_(binder->TopScope()), + context_(CheckerStatus::NO_OPTS) { scopeStack_.push_back(scope_); globalTypes_ = allocator_->New(allocator_); relation_ = allocator_->New(this); - status_ = CheckerStatus::NO_OPTS; } void Checker::StartChecker() @@ -48,11 +48,6 @@ void Checker::StartChecker() rootNode_->Check(this); } -binder::Scope *Checker::Scope() const -{ - return scope_; -} - void Checker::ThrowTypeError(std::initializer_list list, const lexer::SourcePosition &pos) { std::stringstream ss; @@ -87,161 +82,6 @@ void Checker::ThrowTypeError(std::string_view message, const lexer::SourcePositi throw Error {ErrorType::TYPE, message, loc.line, loc.col}; } -Type *Checker::GlobalNumberType() -{ - return globalTypes_->GlobalNumberType(); -} - -Type *Checker::GlobalAnyType() -{ - return globalTypes_->GlobalAnyType(); -} - -Type *Checker::GlobalStringType() -{ - return globalTypes_->GlobalStringType(); -} - -Type *Checker::GlobalBooleanType() -{ - return globalTypes_->GlobalBooleanType(); -} - -Type *Checker::GlobalVoidType() -{ - return globalTypes_->GlobalVoidType(); -} - -Type *Checker::GlobalNullType() -{ - return globalTypes_->GlobalNullType(); -} - -Type *Checker::GlobalUndefinedType() -{ - return globalTypes_->GlobalUndefinedType(); -} - -Type *Checker::GlobalUnknownType() -{ - return globalTypes_->GlobalUnknownType(); -} - -Type *Checker::GlobalNeverType() -{ - return globalTypes_->GlobalNeverType(); -} - -Type *Checker::GlobalNonPrimitiveType() -{ - return globalTypes_->GlobalNonPrimitiveType(); -} - -Type *Checker::GlobalBigintType() -{ - return globalTypes_->GlobalBigintType(); -} - -Type *Checker::GlobalFalseType() -{ - return globalTypes_->GlobalFalseType(); -} - -Type *Checker::GlobalTrueType() -{ - return globalTypes_->GlobalTrueType(); -} - -Type *Checker::GlobalNumberOrBigintType() -{ - return globalTypes_->GlobalNumberOrBigintType(); -} - -Type *Checker::GlobalStringOrNumberType() -{ - return globalTypes_->GlobalStringOrNumberType(); -} - -Type *Checker::GlobalZeroType() -{ - return globalTypes_->GlobalZeroType(); -} - -Type *Checker::GlobalEmptyStringType() -{ - return globalTypes_->GlobalEmptyStringType(); -} - -Type *Checker::GlobalZeroBigintType() -{ - return globalTypes_->GlobalZeroBigintType(); -} - -Type *Checker::GlobalPrimitiveType() -{ - return globalTypes_->GlobalPrimitiveType(); -} - -Type *Checker::GlobalEmptyTupleType() -{ - return globalTypes_->GlobalEmptyTupleType(); -} - -Type *Checker::GlobalEmptyObjectType() -{ - return globalTypes_->GlobalEmptyObjectType(); -} - -NumberLiteralPool &Checker::NumberLiteralMap() -{ - return numberLiteralMap_; -} - -StringLiteralPool &Checker::StringLiteralMap() -{ - return stringLiteralMap_; -} - -StringLiteralPool &Checker::BigintLiteralMap() -{ - return bigintLiteralMap_; -} - -TypeRelation *Checker::Relation() -{ - return relation_; -} - -RelationHolder &Checker::IdenticalResults() -{ - return identicalResults_; -} - -RelationHolder &Checker::AssignableResults() -{ - return assignableResults_; -} - -RelationHolder &Checker::ComparableResults() -{ - return comparableResults_; -} - -std::unordered_set &Checker::TypeStack() -{ - return typeStack_; -} - -std::unordered_map &Checker::NodeCache() -{ - return nodeCache_; -} - -CheckerStatus Checker::Status() -{ - return status_; -} - Type *Checker::CheckTypeCached(const ir::Expression *expr) { auto res = nodeCache_.find(expr); diff --git a/es2panda/typescript/checker.h b/es2panda/typescript/checker.h index 7063aa6dcd4a8ded76bbf09f0c78dfd4333935a4..734017f290593134a57825da034bb06921a14ca2 100644 --- a/es2panda/typescript/checker.h +++ b/es2panda/typescript/checker.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -98,6 +99,7 @@ class TSSignatureDeclaration; class TSPropertySignature; class TSMethodSignature; class ChainExpression; +class VariableDeclarator; enum class AstNodeType; } // namespace panda::es2panda::ir @@ -111,69 +113,7 @@ using InterfacePropertyMap = std::unordered_map; using IndexInfoTypePair = std::pair; using PropertyMap = std::unordered_map; - -enum class DestructuringType { - NO_DESTRUCTURING, - ARRAY_DESTRUCTURING, - OBJECT_DESTRUCTURING, -}; - -class ObjectLiteralElaborationData { -public: - ObjectLiteralElaborationData() = default; - ~ObjectLiteralElaborationData() = default; - NO_COPY_SEMANTIC(ObjectLiteralElaborationData); - NO_MOVE_SEMANTIC(ObjectLiteralElaborationData); - - ObjectDescriptor *desc {}; - std::vector stringIndexTypes {}; - Type *numberInfosType {}; - Type *stringInfosType {}; - std::vector spreads {}; - std::unordered_map potentialObjectTypes {}; -}; - -class ObjectLiteralPropertyInfo { -public: - ObjectLiteralPropertyInfo() = default; - ~ObjectLiteralPropertyInfo() = default; - NO_COPY_SEMANTIC(ObjectLiteralPropertyInfo); - DEFAULT_MOVE_SEMANTIC(ObjectLiteralPropertyInfo); - - util::StringView propName {}; - Type *propType {}; - bool handleNextProp {}; -}; - -class FunctionParameterInfo { -public: - FunctionParameterInfo() = default; - ~FunctionParameterInfo() = default; - NO_COPY_SEMANTIC(FunctionParameterInfo); - DEFAULT_MOVE_SEMANTIC(FunctionParameterInfo); - - const ir::Expression *typeAnnotation {}; - const ir::Expression *initNode {}; - const ir::Expression *bindingNode {}; - Type *initType {}; - Type *restType {}; - DestructuringType destructuringType {DestructuringType::NO_DESTRUCTURING}; - bool optionalParam {}; - util::StringView paramName {}; -}; - -enum class CheckerStatus { - NO_OPTS = 0, - FORCE_TUPLE = 1 << 0, -}; - -DEFINE_BITOPS(CheckerStatus) - -enum class VariableBindingContext { - REGULAR, - FOR_IN, - FOR_OF, -}; +using ArgRange = std::pair; class Checker { public: @@ -182,8 +122,6 @@ public: NO_COPY_SEMANTIC(Checker); NO_MOVE_SEMANTIC(Checker); - void StartChecker(); - ArenaAllocator *Allocator() const { return allocator_; @@ -194,66 +132,216 @@ public: return binder_; } - binder::Scope *Scope() const; + binder::Scope *Scope() const + { + return scope_; + } + + Type *GlobalNumberType() + { + return globalTypes_->GlobalNumberType(); + } - [[noreturn]] void ThrowTypeError(std::string_view message, const lexer::SourcePosition &pos); - [[noreturn]] void ThrowTypeError(std::initializer_list list, - const lexer::SourcePosition &pos); + Type *GlobalAnyType() + { + return globalTypes_->GlobalAnyType(); + } + + Type *GlobalStringType() + { + return globalTypes_->GlobalStringType(); + } + + Type *GlobalBooleanType() + { + return globalTypes_->GlobalBooleanType(); + } + + Type *GlobalVoidType() + { + return globalTypes_->GlobalVoidType(); + } + + Type *GlobalNullType() + { + return globalTypes_->GlobalNullType(); + } + + Type *GlobalUndefinedType() + { + return globalTypes_->GlobalUndefinedType(); + } + + Type *GlobalUnknownType() + { + return globalTypes_->GlobalUnknownType(); + } + + Type *GlobalNeverType() + { + return globalTypes_->GlobalNeverType(); + } + + Type *GlobalNonPrimitiveType() + { + return globalTypes_->GlobalNonPrimitiveType(); + } + + Type *GlobalBigintType() + { + return globalTypes_->GlobalBigintType(); + } + + Type *GlobalFalseType() + { + return globalTypes_->GlobalFalseType(); + } + + Type *GlobalTrueType() + { + return globalTypes_->GlobalTrueType(); + } + + Type *GlobalNumberOrBigintType() + { + return globalTypes_->GlobalNumberOrBigintType(); + } + + Type *GlobalStringOrNumberType() + { + return globalTypes_->GlobalStringOrNumberType(); + } + + Type *GlobalZeroType() + { + return globalTypes_->GlobalZeroType(); + } + + Type *GlobalEmptyStringType() + { + return globalTypes_->GlobalEmptyStringType(); + } + + Type *GlobalZeroBigintType() + { + return globalTypes_->GlobalZeroBigintType(); + } + + Type *GlobalPrimitiveType() + { + return globalTypes_->GlobalPrimitiveType(); + } + + Type *GlobalEmptyTupleType() + { + return globalTypes_->GlobalEmptyTupleType(); + } + + Type *GlobalEmptyObjectType() + { + return globalTypes_->GlobalEmptyObjectType(); + } + + Type *GlobalResolvingReturnType() + { + return globalTypes_->GlobalResolvingReturnType(); + } + + Type *GlobalErrorType() + { + return globalTypes_->GlobalErrorType(); + } + + CheckerContext Context() + { + return context_; + } + + bool HasStatus(CheckerStatus status) + { + return (context_.Status() & status) != 0; + } + + void RemoveStatus(CheckerStatus status) + { + context_.Status() &= ~status; + } + + void AddStatus(CheckerStatus status) + { + context_.Status() |= status; + } + + NumberLiteralPool &NumberLiteralMap() + { + return numberLiteralMap_; + } + + StringLiteralPool &StringLiteralMap() + { + return stringLiteralMap_; + } + + StringLiteralPool &BigintLiteralMap() + { + return bigintLiteralMap_; + } + + TypeRelation *Relation() + { + return relation_; + } + + RelationHolder &IdenticalResults() + { + return identicalResults_; + } + + RelationHolder &AssignableResults() + { + return assignableResults_; + } + + RelationHolder &ComparableResults() + { + return comparableResults_; + } + + std::unordered_set &TypeStack() + { + return typeStack_; + } + + std::unordered_map &NodeCache() + { + return nodeCache_; + } + + void StartChecker(); - Type *GlobalNumberType(); - Type *GlobalAnyType(); - Type *GlobalStringType(); - Type *GlobalBooleanType(); - Type *GlobalVoidType(); - Type *GlobalNullType(); - Type *GlobalUndefinedType(); - Type *GlobalUnknownType(); - Type *GlobalNeverType(); - Type *GlobalNonPrimitiveType(); - Type *GlobalBigintType(); - Type *GlobalFalseType(); - Type *GlobalTrueType(); - Type *GlobalNumberOrBigintType(); - Type *GlobalStringOrNumberType(); - Type *GlobalZeroType(); - Type *GlobalEmptyStringType(); - Type *GlobalZeroBigintType(); - Type *GlobalPrimitiveType(); - Type *GlobalEmptyTupleType(); - Type *GlobalEmptyObjectType(); - - NumberLiteralPool &NumberLiteralMap(); - StringLiteralPool &StringLiteralMap(); - StringLiteralPool &BigintLiteralMap(); - - TypeRelation *Relation(); - - RelationHolder &IdenticalResults(); - RelationHolder &AssignableResults(); - RelationHolder &ComparableResults(); - - std::unordered_set &TypeStack(); - std::unordered_map &NodeCache(); Type *CheckTypeCached(const ir::Expression *expr); - CheckerStatus Status(); + [[noreturn]] void ThrowTypeError(std::string_view message, const lexer::SourcePosition &pos); + [[noreturn]] void ThrowTypeError(std::initializer_list list, + const lexer::SourcePosition &pos); // Util static bool InAssignment(const ir::AstNode *node); static bool IsAssignmentOperator(lexer::TokenType op); - Type *GetBaseTypeOfLiteralType(Type *type); static bool IsLiteralType(const Type *type); static const ir::AstNode *FindAncestorGivenByType(const ir::AstNode *node, ir::AstNodeType type); - void CheckNonNullType(Type *type, lexer::SourcePosition lineInfo); + static const ir::AstNode *FindAncestorUntilGivenType(const ir::AstNode *node, ir::AstNodeType stop); static bool MaybeTypeOfKind(const Type *type, TypeFlag flags); static bool MaybeTypeOfKind(const Type *type, ObjectType::ObjectTypeKind kind); static bool IsConstantMemberAccess(const ir::Expression *expr); static bool IsStringLike(const ir::Expression *expr); - void CheckTruthinessOfType(Type *type, lexer::SourcePosition lineInfo); - - // Helpers static const ir::TSQualifiedName *ResolveLeftMostQualifiedName(const ir::TSQualifiedName *qualifiedName); static const ir::MemberExpression *ResolveLeftMostMemberExpression(const ir::MemberExpression *expr); + + // Helpers + void CheckTruthinessOfType(Type *type, lexer::SourcePosition lineInfo); + Type *CheckNonNullType(Type *type, lexer::SourcePosition lineInfo); + Type *GetBaseTypeOfLiteralType(Type *type); void CheckReferenceExpression(const ir::Expression *expr, const char *invalidReferenceMsg, const char *invalidOptionalChainMsg); void CheckTestingKnownTruthyCallableOrAwaitableType(const ir::Expression *condExpr, Type *type, @@ -264,29 +352,17 @@ public: bool IsVariableUsedInConditionBody(const ir::AstNode *parent, binder::Variable *searchVar); bool FindVariableInBinaryExpressionChain(const ir::AstNode *parent, binder::Variable *searchVar); bool IsVariableUsedInBinaryExpressionChain(const ir::AstNode *parent, binder::Variable *searchVar); - Type *CreateTupleTypeFromEveryArrayExpression(const ir::Expression *expr); [[noreturn]] void ThrowBinaryLikeError(lexer::TokenType op, Type *leftType, Type *rightType, lexer::SourcePosition lineInfo); - [[noreturn]] void ThrowAssignmentError(Type *leftType, Type *rightType, lexer::SourcePosition lineInfo, + [[noreturn]] void ThrowAssignmentError(Type *source, Type *target, lexer::SourcePosition lineInfo, bool isAsSrcLeftType = false); - - // Generics - void CheckTypeParametersNotReferenced(const ir::AstNode *parent, const ir::TSTypeParameterDeclaration *typeParams, - size_t index); - std::vector CheckTypeParameters(const ir::TSTypeParameterDeclaration *typeParams); - Type *InstantiateGenericTypeAlias(binder::Variable *bindingVar, const ir::TSTypeParameterDeclaration *decl, - const ir::TSTypeParameterInstantiation *typeParams, - const lexer::SourcePosition &locInfo); - Type *InstantiateGenericInterface(binder::Variable *bindingVar, const binder::Decl *decl, - const ir::TSTypeParameterInstantiation *typeParams, - const lexer::SourcePosition &locInfo); - void ValidateTypeParameterInstantiation(size_t typeArgumentCount, size_t minTypeArgumentCount, - size_t numOfTypeArguments, const util::StringView &name, - const lexer::SourcePosition &locInfo); - bool CheckTypeParametersAreIdentical(const std::pair, size_t> &collectedTypeParams, - std::vector ¤tTypeParams) const; - std::pair, size_t> CollectTypeParametersFromDeclarations( - const ArenaVector &declarations); + void ElaborateElementwise(Type *targetType, const ir::Expression *sourceNode, const lexer::SourcePosition &pos); + void InferSimpleVariableDeclaratorType(const ir::VariableDeclarator *declarator); + Type *GetTypeOfVariable(binder::Variable *var); + Type *GetUnaryResultType(Type *operandType); + Type *GetTypeFromClassOrInterfaceReference(const ir::TSTypeReference *node, binder::Variable *var); + Type *GetTypeFromTypeAliasReference(const ir::TSTypeReference *node, binder::Variable *var); + Type *GetTypeReferenceType(const ir::TSTypeReference *node, binder::Variable *var); // Type creation Type *CreateNumberLiteralType(double value); @@ -294,163 +370,84 @@ public: Type *CreateStringLiteralType(const util::StringView &str); Type *CreateFunctionTypeWithSignature(Signature *callSignature); Type *CreateConstructorTypeWithSignature(Signature *constructSignature); - Type *CreateTupleType(ObjectDescriptor *desc, TupleElementFlagPool &&elementFlags, ElementFlags combinedFlags, + Type *CreateTupleType(ObjectDescriptor *desc, ArenaVector &&elementFlags, ElementFlags combinedFlags, uint32_t minLength, uint32_t fixedLength, bool readonly); - Type *CreateTupleType(ObjectDescriptor *desc, TupleElementFlagPool &&elementFlags, ElementFlags combinedFlags, + Type *CreateTupleType(ObjectDescriptor *desc, ArenaVector &&elementFlags, ElementFlags combinedFlags, uint32_t minLength, uint32_t fixedLength, bool readonly, NamedTupleMemberPool &&namedMembers); - Type *CreateUnionType(std::vector &&constituentTypes); Type *CreateUnionType(std::initializer_list constituentTypes); + Type *CreateUnionType(ArenaVector &&constituentTypes); + Type *CreateUnionType(ArenaVector &constituentTypes); + Type *CreateObjectTypeWithCallSignature(Signature *callSignature); + Type *CreateObjectTypeWithConstructSignature(Signature *constructSignature); // Object - ObjectLiteralPropertyInfo HandleObjectLiteralProperty(const ir::Property *prop, ObjectDescriptor *desc, - std::vector *stringIndexTypes, bool readonly = false); - void HandleSpreadElement(const ir::SpreadElement *spreadElem, ObjectDescriptor *desc, lexer::SourcePosition locInfo, - bool readonly = false); - Type *CollectStringIndexInfoTypes(const ObjectDescriptor *desc, const std::vector &stringIndexTypes); - binder::Variable *ResolveNonComputedObjectProperty(const ir::MemberExpression *expr); - util::StringView ToPropertyName(const ir::Expression *expr, TypeFlag propNameFlags, bool computed = false, - bool *hasName = nullptr, Type **exprType = nullptr); - void PrefetchTypeLiteralProperties(const ir::Expression *current, ObjectDescriptor *desc); - void CheckTsTypeLiteralOrInterfaceMember(const ir::Expression *current, ObjectDescriptor *desc); - Type *CheckIndexInfoProperty(IndexInfo *info, Type *objType, lexer::SourcePosition loc); - Type *ResolveBasePropForObject(ObjectType *objType, util::StringView &name, Type *propNameType, bool isComputed, - bool inAssignment, lexer::SourcePosition propLoc, lexer::SourcePosition exprLoc); - Type *ResolveBaseProp(Type *baseType, const ir::Expression *prop, bool isComputed, lexer::SourcePosition exprLoc); - binder::Variable *ResolveObjectProperty(const ir::MemberExpression *expr); - Type *CheckTsPropertySignature(const ir::TSPropertySignature *propSignature, binder::LocalVariable *savedProp); - Type *CheckTsMethodSignature(const ir::TSMethodSignature *methodSignature); - void CheckTsIndexSignature(const ir::TSIndexSignature *indexSignature, ObjectDescriptor *desc); - void CheckTsSignatureDeclaration(const ir::TSSignatureDeclaration *signatureNode, ObjectDescriptor *desc); - void CheckTsPropertyOrMethodSignature(const ir::Expression *current, ObjectDescriptor *desc); - void HandleNumberIndexInfo(ObjectDescriptor *desc, Type *indexType, bool readonly = false); - util::StringView HandleComputedPropertyName(const ir::Expression *propKey, ObjectDescriptor *desc, Type *propType, - std::vector *stringIndexTypes, bool *handleNextProp, - lexer::SourcePosition locInfo, bool readonly = false); - void CheckIndexConstraints(Type *type) const; + void ResolvePropertiesOfObjectType(ObjectType *type, const ir::Expression *member, + ArenaVector &signatureDeclarations, + ArenaVector &indexDeclarations, bool isInterface); + void ResolveSignaturesOfObjectType(ObjectType *type, + ArenaVector &signatureDeclarations); + void ResolveIndexInfosOfObjectType(ObjectType *type, ArenaVector &indexDeclarations); + void ResolveDeclaredMembers(InterfaceType *type); + bool ValidateInterfaceMemberRedeclaration(ObjectType *type, binder::Variable *prop, + const lexer::SourcePosition &locInfo); + binder::Variable *GetPropertyOfType(Type *type, const util::StringView &name, bool getPartial = false, + binder::VariableFlags propagateFlags = binder::VariableFlags::NONE); + binder::Variable *GetPropertyOfUnionType(UnionType *type, const util::StringView &name, bool getPartial, + binder::VariableFlags propagateFlags); + void CheckIndexConstraints(Type *type); + void ResolveStructuredTypeMembers(Type *type); + void ResolveUnionTypeMembers(UnionType *type); + void ResolveObjectTypeMembers(ObjectType *type); + void ResolveInterfaceOrClassTypeMembers(InterfaceType *type); + Type *CheckComputedPropertyName(const ir::Expression *key); + Type *GetPropertyTypeForIndexType(Type *type, Type *indexType); + IndexInfo *GetApplicableIndexInfo(Type *type, Type *indexType); + ArenaVector GetBaseTypes(InterfaceType *type); // Function - Signature *HandleFunctionReturn(const ir::ScriptFunction *func, SignatureInfo *signatureInfo, - binder::Variable *funcVar = nullptr); - Type *CreateTypeForPatternParameter(const ir::Expression *patternNode, const ir::Expression *initNode); - void CreateTypeForObjectPatternParameter(ObjectType *patternType, const ir::Expression *patternNode, - const ir::Expression *initNode); - void CheckFunctionParameterDeclaration(const ArenaVector ¶ms, SignatureInfo *signatureInfo); + Type *HandleFunctionReturn(const ir::ScriptFunction *func); + void CheckFunctionParameterDeclarations(const ArenaVector ¶ms, SignatureInfo *signatureInfo); + std::tuple CheckFunctionParameter( + const ir::Expression *param, SignatureInfo *signatureInfo); + std::tuple CheckFunctionIdentifierParameter( + const ir::Identifier *param); + std::tuple CheckFunctionAssignmentPatternParameter( + const ir::AssignmentExpression *param); + std::tuple CheckFunctionRestParameter( + const ir::SpreadElement *param, SignatureInfo *signatureInfo); + std::tuple CheckFunctionArrayPatternParameter( + const ir::ArrayExpression *param); + std::tuple CheckFunctionObjectPatternParameter( + const ir::ObjectExpression *param); void InferFunctionDeclarationType(const binder::FunctionDecl *decl, binder::Variable *funcVar); - void CollectTypesFromReturnStatements(const ir::AstNode *parent, std::vector &returnTypes); + void CollectTypesFromReturnStatements(const ir::AstNode *parent, ArenaVector *returnTypes); void CheckAllCodePathsInNonVoidFunctionReturnOrThrow(const ir::ScriptFunction *func, lexer::SourcePosition lineInfo, const char *errMsg); - FunctionParameterInfo GetFunctionParameterInfo(ir::Expression *expr); - Type *GetParamTypeFromParamInfo(const FunctionParameterInfo ¶mInfo, Type *annotationType, Type *patternType); - - // Destructuring - void HandleVariableDeclarationWithContext(const ir::Expression *id, Type *inferedType, - VariableBindingContext context, DestructuringType destructuringType, - bool annotationTypeUsed, bool inAssignment = false); - void HandleIdentifierDeclarationWithContext(const ir::Identifier *identNode, Type *inferedType, - DestructuringType destructuringType, bool annotationTypeUsed, - bool inAssignment); - void HandlePropertyDeclarationWithContext(const ir::Property *prop, Type *inferedType, - VariableBindingContext context, DestructuringType destructuringType, - bool annotationTypeUsed, bool inAssignment); - void HandleAssignmentPatternWithContext(const ir::AssignmentExpression *assignmentPattern, Type *inferedType, - VariableBindingContext context, DestructuringType destructuringType, - bool annotationTypeUsed, bool inAssignment); - void HandleArrayPatternWithContext(const ir::ArrayExpression *arrayPattern, Type *inferedType, - VariableBindingContext context, bool annotationTypeUsed, bool inAssignment); - void HandleRestElementWithContext(const ir::SpreadElement *restElement, Type *inferedType, - VariableBindingContext context, DestructuringType destructuringType, - bool annotationTypeUsed, bool inAssignment); - void ValidateTypeAnnotationAndInitType(const ir::Expression *initNode, Type **initType, const Type *annotationType, - Type *patternType, lexer::SourcePosition locInfo); - Type *GetVariableType(const util::StringView &name, Type *inferedType, Type *initType, binder::Variable *resultVar, - DestructuringType destructuringType, const lexer::SourcePosition &locInfo, - bool annotationTypeUsed, bool inAssignment = false); - Type *GetVariableTypeInObjectDestructuring(const util::StringView &name, Type *inferedType, Type *initType, - bool annotationTypeUsed, const lexer::SourcePosition &locInfo, - bool inAssignment = false); - Type *GetVariableTypeInObjectDestructuringWithTargetUnion(const util::StringView &name, UnionType *inferedType, - Type *initType, bool annotationTypeUsed, - const lexer::SourcePosition &locInfo, - bool inAssignment = false); - Type *GetVariableTypeInArrayDestructuring(Type *inferedType, Type *initType, const lexer::SourcePosition &locInfo, - bool inAssignment); - Type *GetVariableTypeInArrayDestructuringWithTargetUnion(UnionType *inferedType, Type *initType, - const lexer::SourcePosition &locInfo, bool inAssignment); - Type *GetRestElementType(Type *inferedType, binder::Variable *resultVar, DestructuringType destructuringType, - const lexer::SourcePosition &locInfo, bool inAssignment = false); - Type *GetRestElementTypeInArrayDestructuring(Type *inferedType, const lexer::SourcePosition &locInfo); - Type *GetRestElementTypeInObjectDestructuring(Type *inferedType, const lexer::SourcePosition &locInfo); - Type *GetNextInferedTypeForArrayPattern(Type *inferedType); - Type *CreateTupleTypeForRest(TupleTypeIterator *iterator); - Type *CreateArrayTypeForRest(UnionType *inferedType); - Type *CreateObjectTypeForRest(ObjectType *objType); - Type *CreateInitializerTypeForPattern(const Type *patternType, const ir::Expression *initNode, - bool validateCurrent = true); - Type *CreateInitializerTypeForObjectPattern(const ObjectType *patternType, const ir::ObjectExpression *initNode, - bool validateCurrent); - Type *CreateInitializerTypeForArrayPattern(const TupleType *patternType, const ir::ArrayExpression *initNode, - bool validateCurrent); - static bool ShouldCreatePropertyValueName(const ir::Expression *propValue); - void CreatePatternName(const ir::AstNode *node, std::stringstream &ss) const; - - // Type elaboration - bool ElaborateElementwise(TypeOrNode source, const Type *targetType, lexer::SourcePosition locInfo); - bool ElaborateObjectLiteral(TypeOrNode source, const Type *targetType, lexer::SourcePosition locInfo); - bool ElaborateObjectLiteralWithNode(const ir::ObjectExpression *sourceNode, const Type *targetType, - ObjectLiteralElaborationData *elaborationData); - void ElaborateObjectLiteralWithType(const ObjectLiteralType *sourceType, const Type *targetType, - const std::unordered_map &potentialObjectTypes, - lexer::SourcePosition locInfo); - bool ElaborateArrayLiteral(TypeOrNode source, const Type *targetType, lexer::SourcePosition locInfo); - void ElaborateArrayLiteralWithNode(const ir::ArrayExpression *sourceNode, const Type *targetType, - std::unordered_map *potentialTypes, - lexer::SourcePosition locInfo); - void ElaborateArrayLiteralWithType(const TupleType *sourceType, const Type *targetType, - const std::unordered_map &potentialTypes); - void GetPotentialTypesAndIndexInfosForElaboration(const Type *targetType, - ObjectLiteralElaborationData *elaborationData); - static IndexInfoTypePair GetIndexInfoTypePair(const ObjectType *type); - void CheckTargetTupleLengthConstraints(const Type *targetType, const ir::ArrayExpression *sourceNode, - std::unordered_map *potentialTypes, - const lexer::SourcePosition &locInfo); - std::vector CollectTargetTypesForArrayElaborationWithNodeFromTargetUnion( - std::unordered_map *potentialTypes, const ir::Expression *currentSourceElement, - uint32_t tupleIdx); - static std::vector CollectTargetTypesForArrayElaborationWithTypeFromTargetUnion( - const std::unordered_map &potentialTypes, uint32_t tupleIdx); - static bool CheckIfExcessTypeCheckNeededForObjectElaboration(const Type *targetType, - ObjectLiteralElaborationData *elaborationData); - Type *GetTargetPropertyTypeFromTargetForElaborationWithNode(const Type *targetType, - ObjectLiteralElaborationData *elaborationData, - const util::StringView &propName, - const ir::Expression *propValue); - Type *GetTargetPropertyTypeFromTargetForElaborationWithType( - const Type *targetType, const std::unordered_map &potentialObjectTypes, - const util::StringView &propName); - Type *GetindexInfoTypeOrThrowError(const Type *targetType, ObjectLiteralElaborationData *elaborationData, - const util::StringView &propName, bool computed, bool numberLiteralName, - lexer::SourcePosition locInfo); - Type *GetUnaryResultType(Type *operandType); - Type *InferVariableDeclarationType(const ir::Identifier *decl); + void CreatePatternParameterName(const ir::AstNode *node, std::stringstream &ss); + void ThrowReturnTypeCircularityError(const ir::ScriptFunction *func); + ArgRange GetArgRange(const ArenaVector &signatures, ArenaVector *potentialSignatures, + uint32_t callArgsSize, bool *haveSignatureWithRest); + bool CallMatchesSignature(const ArenaVector &args, Signature *signature, bool throwError); + Type *resolveCallOrNewExpression(const ArenaVector &signatures, + ArenaVector arguments, const lexer::SourcePosition &errPos); + Type *CreateParameterTypeForArrayAssignmentPattern(const ir::ArrayExpression *arrayPattern, Type *inferedType); + Type *CreateParameterTypeForObjectAssignmentPattern(const ir::ObjectExpression *objectPattern, Type *inferedType); // Type relation - bool IsTypeIdenticalTo(const Type *source, const Type *target) const; - bool IsTypeIdenticalTo(const Type *source, const Type *target, const std::string &errMsg, - const lexer::SourcePosition &errPos) const; - bool IsTypeIdenticalTo(const Type *source, const Type *target, std::initializer_list list, - const lexer::SourcePosition &errPos) const; - bool IsTypeAssignableTo(const Type *source, const Type *target) const; - bool IsTypeAssignableTo(const Type *source, const Type *target, const std::string &errMsg, - const lexer::SourcePosition &errPos) const; - bool IsTypeAssignableTo(const Type *source, const Type *target, std::initializer_list list, - const lexer::SourcePosition &errPos) const; - bool IsTypeComparableTo(const Type *source, const Type *target) const; - bool IsTypeComparableTo(const Type *source, const Type *target, const std::string &errMsg, - const lexer::SourcePosition &errPos) const; - bool IsTypeComparableTo(const Type *source, const Type *target, std::initializer_list list, - const lexer::SourcePosition &errPos) const; - bool AreTypesComparable(const Type *source, const Type *target) const; - bool IsTypeEqualityComparableTo(const Type *source, const Type *target) const; + bool IsTypeIdenticalTo(Type *source, Type *target); + bool IsTypeIdenticalTo(Type *source, Type *target, const std::string &errMsg, const lexer::SourcePosition &errPos); + bool IsTypeIdenticalTo(Type *source, Type *target, std::initializer_list list, + const lexer::SourcePosition &errPos); + bool IsTypeAssignableTo(Type *source, Type *target); + bool IsTypeAssignableTo(Type *source, Type *target, const std::string &errMsg, const lexer::SourcePosition &errPos); + bool IsTypeAssignableTo(Type *source, Type *target, std::initializer_list list, + const lexer::SourcePosition &errPos); + bool IsTypeComparableTo(Type *source, Type *target); + bool IsTypeComparableTo(Type *source, Type *target, const std::string &errMsg, const lexer::SourcePosition &errPos); + bool IsTypeComparableTo(Type *source, Type *target, std::initializer_list list, + const lexer::SourcePosition &errPos); + bool AreTypesComparable(Type *source, Type *target); + bool IsTypeEqualityComparableTo(Type *source, Type *target); bool IsAllTypesAssignableTo(Type *source, Type *target); // Binary like expression @@ -469,12 +466,14 @@ public: void CheckAssignmentOperator(lexer::TokenType op, const ir::Expression *leftExpr, Type *leftType, Type *valueType); friend class ScopeContext; + friend class SavedCheckerContext; private: ArenaAllocator *allocator_; binder::Binder *binder_; const ir::BlockStatement *rootNode_; binder::Scope *scope_; + CheckerContext context_; GlobalTypesHolder *globalTypes_; NumberLiteralPool numberLiteralMap_; @@ -487,11 +486,9 @@ private: RelationHolder assignableResults_; RelationHolder comparableResults_; - std::unordered_set typeStack_; + std::unordered_set typeStack_; std::unordered_map nodeCache_; std::vector scopeStack_; - - CheckerStatus status_; }; class ScopeContext { @@ -514,6 +511,27 @@ private: binder::Scope *prevScope_; }; +class SavedCheckerContext { +public: + explicit SavedCheckerContext(Checker *checker, CheckerStatus newStatus) + : checker_(checker), prev_(checker->context_) + { + checker_->context_ = CheckerContext(newStatus); + } + + NO_COPY_SEMANTIC(SavedCheckerContext); + DEFAULT_MOVE_SEMANTIC(SavedCheckerContext); + + ~SavedCheckerContext() + { + checker_->context_ = prev_; + } + +private: + Checker *checker_; + CheckerContext prev_; +}; + } // namespace panda::es2panda::checker #endif /* CHECKER_H */ diff --git a/es2panda/typescript/core/binaryLikeExpression.cpp b/es2panda/typescript/core/binaryLikeExpression.cpp index 7e8254afd59d630e35c31c2267e776d1941d1a12..feb5c67fa7dd2e05bea6ccb1fd58af5b64bb3c37 100644 --- a/es2panda/typescript/core/binaryLikeExpression.cpp +++ b/es2panda/typescript/core/binaryLikeExpression.cpp @@ -129,8 +129,6 @@ Type *Checker::CheckCompareOperator(Type *leftType, Type *rightType, const ir::E CheckNonNullType(leftType, leftExpr->Start()); CheckNonNullType(rightType, rightExpr->Start()); - leftType = GetBaseTypeOfLiteralType(leftType); - rightType = GetBaseTypeOfLiteralType(rightType); if (AreTypesComparable(leftType, rightType) || (IsTypeAssignableTo(leftType, GlobalNumberOrBigintType()) && IsTypeAssignableTo(rightType, GlobalNumberOrBigintType()))) { return GlobalBooleanType(); @@ -146,8 +144,7 @@ Type *Checker::CheckAndOperator(Type *leftType, Type *rightType, const ir::Expre CheckTruthinessOfType(leftType, leftExpr->Start()); if (static_cast(leftType->GetTypeFacts()) & static_cast(TypeFacts::TRUTHY)) { - Type *resultType = - CreateUnionType({ExtractDefinitelyFalsyTypes(GetBaseTypeOfLiteralType(rightType)), rightType}); + Type *resultType = CreateUnionType({ExtractDefinitelyFalsyTypes(rightType), rightType}); return resultType; } diff --git a/es2panda/test/compiler/ts/generic_interface.ts b/es2panda/typescript/core/checkerContext.h similarity index 38% rename from es2panda/test/compiler/ts/generic_interface.ts rename to es2panda/typescript/core/checkerContext.h index afe3714ea5b3c8139c9ba0a2bc1bc07421f83038..5c74890736cabe9aaae311730722e6c75e1c7053 100644 --- a/es2panda/test/compiler/ts/generic_interface.ts +++ b/es2panda/typescript/core/checkerContext.h @@ -1,5 +1,5 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -13,58 +13,46 @@ * limitations under the License. */ +#ifndef ES2PANDA_PARSER_CORE_CHECKER_CONTEXT_H +#define ES2PANDA_PARSER_CORE_CHECKER_CONTEXT_H -interface R { - a: T; -} +#include +#include -var var1: R; -var1.a = 5; +#include -var var2: R; -var2.a = "foo"; +namespace panda::es2panda::checker { +enum class CheckerStatus { + NO_OPTS = 0, + FORCE_TUPLE = 1 << 0, + IN_CONST_CONTEXT = 1 << 1, + KEEP_LITERAL_TYPE = 1 << 2, + IN_PARAMETER = 1 << 3, +}; -interface U extends R { - b: Z | W; -} +DEFINE_BITOPS(CheckerStatus) -var var3: U; -var3.a = 12; -var3.b = true; -var3.b = 32; +class CheckerContext { +public: + explicit CheckerContext(CheckerStatus newStatus) : status_(newStatus) {} -interface V { - a: T[]; -} + const CheckerStatus &Status() const + { + return status_; + } -interface V { - b: string[] -} + CheckerStatus &Status() + { + return status_; + } -var var4: V; -var4.a = [1, 2, 3]; -var4.b = ["bar", "baz"]; + DEFAULT_COPY_SEMANTIC(CheckerContext); + DEFAULT_MOVE_SEMANTIC(CheckerContext); + ~CheckerContext() = default; -interface C { - a: E; - b: F; -} +private: + CheckerStatus status_; +}; +} // namespace panda::es2panda::checker -var var5: C<[number]>; -var5.a = [2]; -var5.b = { a: 3, b: "foo" }; - -interface I { - aa: A -} - -var a: { - aa: number -} - -interface A> { -} - -interface O> { } - -interface L { } +#endif diff --git a/es2panda/typescript/core/destructuring.cpp b/es2panda/typescript/core/destructuring.cpp deleted file mode 100644 index 0e875a46cce57aa32c46f4b545c4a60935fdd6e0..0000000000000000000000000000000000000000 --- a/es2panda/typescript/core/destructuring.cpp +++ /dev/null @@ -1,917 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace panda::es2panda::checker { - -void Checker::HandleVariableDeclarationWithContext(const ir::Expression *id, Type *inferedType, - VariableBindingContext context, DestructuringType destructuringType, - bool annotationTypeUsed, bool inAssignment) -{ - if (id->IsIdentifier()) { - HandleIdentifierDeclarationWithContext(id->AsIdentifier(), inferedType, destructuringType, annotationTypeUsed, - inAssignment); - return; - } - - if (id->IsProperty()) { - HandlePropertyDeclarationWithContext(id->AsProperty(), inferedType, context, destructuringType, - annotationTypeUsed, inAssignment); - return; - } - - if (id->IsAssignmentPattern()) { - HandleAssignmentPatternWithContext(id->AsAssignmentPattern(), inferedType, context, destructuringType, - annotationTypeUsed, inAssignment); - return; - } - - if (id->IsArrayPattern()) { - if (!inferedType->IsArrayType() && - !(inferedType->IsObjectType() && inferedType->AsObjectType()->IsTupleType()) && - !inferedType->IsUnionType()) { - ThrowTypeError( - {"Type '", inferedType, "' must have a '[Symbol.Iterator]()' method that returns an interator"}, - id->Start()); - } - - HandleArrayPatternWithContext(id->AsArrayPattern(), inferedType, context, annotationTypeUsed, inAssignment); - return; - } - - if (id->IsObjectPattern()) { - for (auto *it : id->AsObjectPattern()->Properties()) { - HandleVariableDeclarationWithContext(it, inferedType, context, DestructuringType::OBJECT_DESTRUCTURING, - annotationTypeUsed, inAssignment); - } - - return; - } - - if (id->IsRestElement()) { - HandleRestElementWithContext(id->AsRestElement(), inferedType, context, destructuringType, annotationTypeUsed, - inAssignment); - return; - } - - ASSERT(id->IsOmittedExpression()); - if (inferedType->IsObjectType() && inferedType->AsObjectType()->IsTupleType()) { - inferedType->AsObjectType()->AsTupleType()->Iterator()->Next(); - } -} - -void Checker::HandleIdentifierDeclarationWithContext(const ir::Identifier *identNode, Type *inferedType, - DestructuringType destructuringType, bool annotationTypeUsed, - bool inAssignment) -{ - const util::StringView &identName = identNode->Name(); - binder::ScopeFindResult result = scope_->Find(identName); - - if (inAssignment) { - if (!result.variable) { - ThrowTypeError({"Cannot find name '", identName, "'."}, identNode->Start()); - } - - Type *varType = GetVariableType(identName, inferedType, nullptr, nullptr, destructuringType, identNode->Start(), - annotationTypeUsed, true); - - if (!IsTypeAssignableTo(varType, result.variable->TsType())) { - ThrowAssignmentError(varType, result.variable->TsType(), identNode->Start()); - } - - return; - } - - ASSERT(result.variable); - - Type *varType = GetVariableType(identNode->Name(), inferedType, nullptr, result.variable, destructuringType, - identNode->Start(), annotationTypeUsed); - - varType->SetVariable(result.variable); - result.variable->SetTsType(varType); -} - -void Checker::HandlePropertyDeclarationWithContext(const ir::Property *prop, Type *inferedType, - VariableBindingContext context, DestructuringType destructuringType, - bool annotationTypeUsed, bool inAssignment) -{ - if (prop->IsComputed()) { - // TODO(aszilagyi) - return; - } - - util::StringView propName; - util::StringView searchVarName; - lexer::SourcePosition errorLoc {}; - bool fetchVar = true; - Type *initType = nullptr; - - if (prop->Value()) { - if (prop->Value()->IsIdentifier()) { - searchVarName = prop->Value()->AsIdentifier()->Name(); - errorLoc = prop->Value()->Start(); - } else if (prop->Value()->IsAssignmentPattern()) { - const ir::AssignmentExpression *assignmentPattern = prop->Value()->AsAssignmentPattern(); - - initType = GetBaseTypeOfLiteralType(assignmentPattern->Right()->Check(this)); - - if (assignmentPattern->Left()->IsIdentifier()) { - searchVarName = assignmentPattern->Left()->AsIdentifier()->Name(); - } else { - fetchVar = false; - } - } else { - fetchVar = false; - } - - if (initType && !prop->Value()->AsAssignmentPattern()->Left()->IsIdentifier() && inAssignment) { - HandleVariableDeclarationWithContext(prop->Value()->AsAssignmentPattern()->Left(), initType, context, - destructuringType, annotationTypeUsed, inAssignment); - } - - errorLoc = prop->Key()->Start(); - - propName = ToPropertyName(prop->Key(), TypeFlag::COMPUTED_TYPE_LITERAL_NAME); - } else { - ASSERT(prop->Key()->IsIdentifier()); - propName = prop->Value()->AsIdentifier()->Name(); - searchVarName = propName; - errorLoc = prop->Key()->Start(); - } - - binder::Variable *resultVar = nullptr; - - if (fetchVar) { - binder::ScopeFindResult result = scope_->Find(searchVarName); - resultVar = result.variable; - } - if (fetchVar && inAssignment && !resultVar) { - ThrowTypeError({"No value exists in scope for the shorthand property '", searchVarName, - "'. Either declare one or provide an initializer."}, - prop->Start()); - } - if (fetchVar && inAssignment && initType && !IsTypeAssignableTo(initType, resultVar->TsType())) { - ThrowAssignmentError(initType, resultVar->TsType(), prop->Start()); - } - - Type *varType = GetVariableType(propName, inferedType, initType, resultVar, destructuringType, errorLoc, - annotationTypeUsed, inAssignment); - - if (inAssignment && fetchVar && !IsTypeAssignableTo(varType, resultVar->TsType())) { - ThrowAssignmentError(varType, resultVar->TsType(), prop->Start()); - } - if (fetchVar) { - varType->SetVariable(resultVar); - resultVar->SetTsType(varType); - return; - } - - HandleVariableDeclarationWithContext(initType ? prop->Value()->AsAssignmentPattern()->Left() : prop->Value(), - varType, context, destructuringType, annotationTypeUsed, inAssignment); -} - -void Checker::HandleAssignmentPatternWithContext(const ir::AssignmentExpression *assignmentPattern, Type *inferedType, - VariableBindingContext context, DestructuringType destructuringType, - bool annotationTypeUsed, bool inAssignment) -{ - Type *initType = CheckTypeCached(assignmentPattern->Right()); - - if (assignmentPattern->Left()->IsIdentifier()) { - const ir::Identifier *identNode = assignmentPattern->Left()->AsIdentifier(); - binder::ScopeFindResult result = scope_->Find(identNode->Name()); - - if (inAssignment) { - if (!result.variable) { - ThrowTypeError({"Cannot find name '", identNode->Name(), "'."}, identNode->Start()); - } - - if (!IsTypeAssignableTo(initType, result.variable->TsType())) { - ThrowAssignmentError(initType, result.variable->TsType(), identNode->Start()); - } - - Type *varType = GetVariableType(identNode->Name(), inferedType, GetBaseTypeOfLiteralType(initType), nullptr, - destructuringType, identNode->Start(), annotationTypeUsed, true); - - if (!IsTypeAssignableTo(varType, result.variable->TsType())) { - ThrowAssignmentError(varType, result.variable->TsType(), identNode->Start()); - } - - return; - } - - ASSERT(result.variable); - - Type *varType = GetVariableType(identNode->Name(), inferedType, GetBaseTypeOfLiteralType(initType), - result.variable, destructuringType, identNode->Start(), annotationTypeUsed); - - varType->SetVariable(result.variable); - result.variable->SetTsType(varType); - - return; - } - - if (inferedType->IsUnionType()) { - inferedType->AsUnionType()->AddConstituentType(initType, relation_); - } else { - inferedType = CreateUnionType({initType, inferedType}); - } - - HandleVariableDeclarationWithContext(assignmentPattern->Left(), inferedType, context, destructuringType, - annotationTypeUsed, inAssignment); -} - -void Checker::HandleArrayPatternWithContext(const ir::ArrayExpression *arrayPattern, Type *inferedType, - VariableBindingContext context, bool annotationTypeUsed, bool inAssignment) -{ - for (auto *it : arrayPattern->Elements()) { - Type *nextInferedType = inferedType; - - if (it->IsArrayPattern() || it->IsObjectPattern() || - (it->IsAssignmentPattern() && (it->AsAssignmentPattern()->Left()->IsArrayPattern() || - it->AsAssignmentPattern()->Left()->IsObjectPattern()))) { - nextInferedType = GetNextInferedTypeForArrayPattern(inferedType); - if (!nextInferedType) { - ThrowTypeError( - {"Type '", inferedType, "' must have a '[Symbol.Iterator]()' method that returns an interator"}, - it->Start()); - } - } - - HandleVariableDeclarationWithContext(it, nextInferedType, context, DestructuringType::ARRAY_DESTRUCTURING, - annotationTypeUsed, inAssignment); - } -} - -Type *Checker::GetNextInferedTypeForArrayPattern(Type *inferedType) -{ - if (inferedType->IsArrayType()) { - return inferedType->AsArrayType()->ElementType(); - } - - if (inferedType->IsObjectType() && inferedType->AsObjectType()->IsTupleType()) { - return inferedType->AsObjectType()->AsTupleType()->Iterator()->Next(); - } - - if (inferedType->IsUnionType()) { - std::vector unionTypes; - - for (auto *type : inferedType->AsUnionType()->ConstituentTypes()) { - if (type->IsArrayType()) { - unionTypes.push_back(type->AsArrayType()->ElementType()); - } else if (type->IsObjectType() && type->AsObjectType()->IsTupleType()) { - TupleType *tupleType = type->AsObjectType()->AsTupleType(); - Type *iter = tupleType->Iterator()->Next(); - - if (!iter) { - continue; - } - - unionTypes.push_back(iter); - } else { - return nullptr; - } - } - - return CreateUnionType(std::move(unionTypes)); - } - - return nullptr; -} - -void Checker::HandleRestElementWithContext(const ir::SpreadElement *restElement, Type *inferedType, - VariableBindingContext context, DestructuringType destructuringType, - bool annotationTypeUsed, bool inAssignment) -{ - binder::Variable *restVar = nullptr; - - if (restElement->Argument()->IsIdentifier()) { - binder::ScopeFindResult result = scope_->Find(restElement->Argument()->AsIdentifier()->Name()); - if (inAssignment && !result.variable) { - ThrowTypeError({"Cannot find name '", restElement->Argument()->AsIdentifier()->Name(), "'."}, - restElement->Argument()->Start()); - } - - ASSERT(result.variable); - restVar = result.variable; - } - - Type *restType = - GetRestElementType(inferedType, restVar, destructuringType, restElement->Argument()->Start(), inAssignment); - - if (restVar && !inAssignment) { - restType->SetVariable(restVar); - restVar->SetTsType(restType); - return; - } - - if (restVar && inAssignment) { - IsTypeAssignableTo(restType, restVar->TsType(), - {"Type '", restType, "' is not assignable to type '", restVar->TsType(), "'."}, - restElement->Argument()->Start()); - return; - } - - ASSERT(destructuringType == DestructuringType::ARRAY_DESTRUCTURING); - HandleVariableDeclarationWithContext(restElement->Argument(), restType, context, destructuringType, - annotationTypeUsed, inAssignment); -} - -void Checker::ValidateTypeAnnotationAndInitType(const ir::Expression *initNode, Type **initType, - const Type *annotationType, Type *patternType, - lexer::SourcePosition locInfo) -{ - TypeOrNode elaborateSource; - - if (initNode && annotationType) { - elaborateSource = initNode; - if (!ElaborateElementwise(elaborateSource, annotationType, locInfo)) { - IsTypeAssignableTo(*initType, annotationType, - {"Type '", AsSrc(*initType), "' is not assignable to type '", annotationType, "'"}, - locInfo); - } - } - - if (patternType) { - if (annotationType) { - elaborateSource = patternType; - ElaborateElementwise(elaborateSource, annotationType, locInfo); - return; - } - - ASSERT(initNode); - *initType = CreateInitializerTypeForPattern(patternType, initNode); - } -} - -Type *Checker::GetVariableType(const util::StringView &name, Type *inferedType, Type *initType, - binder::Variable *resultVar, DestructuringType destructuringType, - const lexer::SourcePosition &locInfo, bool annotationTypeUsed, bool inAssignment) -{ - Type *varType = nullptr; - - if (destructuringType == DestructuringType::NO_DESTRUCTURING) { - varType = inferedType ? inferedType : GlobalAnyType(); - } else if (destructuringType == DestructuringType::OBJECT_DESTRUCTURING) { - varType = GetVariableTypeInObjectDestructuring(name, inferedType, initType, annotationTypeUsed, locInfo, - inAssignment); - } else if (destructuringType == DestructuringType::ARRAY_DESTRUCTURING) { - varType = GetVariableTypeInArrayDestructuring(inferedType, initType, locInfo, inAssignment); - } - - if (resultVar) { - Type *resolvedType = resultVar->TsType(); - - if (resolvedType && !inAssignment) { - IsTypeIdenticalTo(resolvedType, varType, - {"Subsequent variable declaration must have the same type. Variable '", resultVar->Name(), - "' must be of type '", resolvedType, "', but here has type '", varType, "'."}, - locInfo); - } - } - - return varType ? varType : GlobalAnyType(); -} - -Type *Checker::GetVariableTypeInObjectDestructuring(const util::StringView &name, Type *inferedType, Type *initType, - bool annotationTypeUsed, const lexer::SourcePosition &locInfo, - bool inAssignment) -{ - if (inferedType->IsUnionType()) { - return GetVariableTypeInObjectDestructuringWithTargetUnion(name, inferedType->AsUnionType(), initType, - annotationTypeUsed, locInfo, inAssignment); - } - - if (inferedType->IsObjectType()) { - binder::LocalVariable *property = inferedType->AsObjectType()->GetProperty(name); - - if (!property && !initType) { - if (inferedType->AsObjectType()->IsObjectLiteralType()) { - ThrowTypeError( - "Initializer provides no value for this binding element and the binding element has no default " - "value", - locInfo); - } - - ThrowTypeError({"Property '", name, "' does not exist on type '", inferedType}, locInfo); - } - - if (property) { - property->AddFlag(binder::VariableFlags::INFERED_IN_PATTERN); - } - - if (!initType) { - ASSERT(property); - return property->TsType(); - } - - if (property) { - return inAssignment ? property->TsType() : CreateUnionType({initType, property->TsType()}); - } - - return initType; - } - - ThrowTypeError({"Property '", name, "' does not exist on type '", inferedType}, locInfo); - return nullptr; -} - -Type *Checker::GetVariableTypeInObjectDestructuringWithTargetUnion(const util::StringView &name, UnionType *inferedType, - Type *initType, bool annotationTypeUsed, - const lexer::SourcePosition &locInfo, - bool inAssignment) -{ - std::vector unionTypes; - - for (auto *it : inferedType->ConstituentTypes()) { - if (it->IsObjectType()) { - binder::LocalVariable *property = it->AsObjectType()->GetProperty(name); - - if (property) { - unionTypes.push_back(property->TsType()); - property->AddFlag(binder::VariableFlags::INFERED_IN_PATTERN); - continue; - } - - if (annotationTypeUsed) { - ThrowTypeError({"Property '", name, "' does not exist on type '", inferedType}, locInfo); - } - - continue; - } - - ThrowTypeError({"Property '", name, "' does not exist on type '", inferedType}, locInfo); - } - - if (unionTypes.empty()) { - ThrowTypeError({"Property '", name, "' does not exist on type '", inferedType}, locInfo); - } - - if (initType && !inAssignment) { - unionTypes.push_back(initType); - } - - return CreateUnionType(std::move(unionTypes)); -} - -Type *Checker::GetVariableTypeInArrayDestructuring(Type *inferedType, Type *initType, - const lexer::SourcePosition &locInfo, bool inAssignment) -{ - if (inferedType->IsUnionType()) { - return GetVariableTypeInArrayDestructuringWithTargetUnion(inferedType->AsUnionType(), initType, locInfo, - inAssignment); - } - - if (inferedType->IsArrayType()) { - if (initType && !inAssignment) { - return CreateUnionType({initType, inferedType->AsArrayType()->ElementType()}); - } - - return inferedType->AsArrayType()->ElementType(); - } - - if (inferedType->IsObjectType() && inferedType->AsObjectType()->IsTupleType()) { - TupleType *inferedTuple = inferedType->AsObjectType()->AsTupleType(); - Type *iter = inferedTuple->Iterator()->Next(); - - if (initType) { - if (iter) { - return inAssignment ? iter : CreateUnionType({initType, iter}); - } - - return initType; - } - - if (!iter) { - ThrowTypeError( - "Initializer provides no value for this binding element and the binding element has no default " - "value", - locInfo); - } - - return iter; - } - - ThrowTypeError({"Type '", inferedType, "' must have a '[Symbol.Iterator]()' method that returns an interator"}, - locInfo); - return nullptr; -} - -Type *Checker::GetVariableTypeInArrayDestructuringWithTargetUnion(UnionType *inferedType, Type *initType, - const lexer::SourcePosition &locInfo, - bool inAssignment) -{ - std::vector unionTypes; - - for (auto *it : inferedType->ConstituentTypes()) { - if (it->IsArrayType()) { - unionTypes.push_back(it->AsArrayType()->ElementType()); - continue; - } - - if (it->IsObjectType() && it->AsObjectType()->IsTupleType()) { - TupleType *tupleType = it->AsObjectType()->AsTupleType(); - Type *iter = tupleType->Iterator()->Next(); - - if (!iter) { - continue; - } - - unionTypes.push_back(iter); - continue; - } - - ThrowTypeError({"Type '", inferedType, "' must have a '[Symbol.Iterator]()' method that returns an interator"}, - locInfo); - } - - if (initType) { - unionTypes.push_back(initType); - } - - if (unionTypes.empty()) { - ThrowTypeError( - "Initializer provides no value for this binding element and the binding element has no default " - "value", - locInfo); - } - - if (inAssignment) { - unionTypes.pop_back(); - } - - return CreateUnionType(std::move(unionTypes)); -} - -Type *Checker::GetRestElementType(Type *inferedType, binder::Variable *resultVar, DestructuringType destructuringType, - const lexer::SourcePosition &locInfo, bool inAssignment) -{ - Type *restType = nullptr; - - if (destructuringType == DestructuringType::ARRAY_DESTRUCTURING) { - restType = GetRestElementTypeInArrayDestructuring(inferedType, locInfo); - } else if (destructuringType == DestructuringType::OBJECT_DESTRUCTURING) { - restType = GetRestElementTypeInObjectDestructuring(inferedType, locInfo); - } - - if (resultVar && !inAssignment) { - Type *resolvedType = resultVar->TsType(); - - if (resolvedType) { - IsTypeIdenticalTo(resolvedType, restType, - {"Subsequent variable declaration must have the same type. Variable '", resultVar->Name(), - "' must be of type '", resolvedType, "', but here has type '", restType, "'."}, - locInfo); - } - } - - return restType; -} - -Type *Checker::GetRestElementTypeInArrayDestructuring(Type *inferedType, const lexer::SourcePosition &locInfo) -{ - if (inferedType->IsUnionType()) { - bool createArrayType = false; - - for (auto *it : inferedType->AsUnionType()->ConstituentTypes()) { - if (it->IsArrayType()) { - createArrayType = true; - break; - } - - if (!it->IsObjectType() || !it->AsObjectType()->IsTupleType()) { - ThrowTypeError( - {"Type '", inferedType, "' must have a '[Symbol.Iterator]()' method that returns an interator"}, - locInfo); - } - } - - if (createArrayType) { - return CreateArrayTypeForRest(inferedType->AsUnionType()); - } - - std::vector tupleUnion; - - for (auto *it : inferedType->AsUnionType()->ConstituentTypes()) { - ASSERT(it->IsObjectType() && it->AsObjectType()->IsTupleType()); - Type *newTuple = CreateTupleTypeForRest(it->AsObjectType()->AsTupleType()->Iterator()); - tupleUnion.push_back(newTuple); - } - - return CreateUnionType(std::move(tupleUnion)); - } - - if (inferedType->IsArrayType()) { - return inferedType; - } - - if (inferedType->IsObjectType() && inferedType->AsObjectType()->IsTupleType()) { - return CreateTupleTypeForRest(inferedType->AsObjectType()->AsTupleType()->Iterator()); - } - - ThrowTypeError({"Type '", inferedType, "' must have a '[Symbol.Iterator]()' method that returns an interator"}, - locInfo); - return nullptr; -} - -Type *Checker::GetRestElementTypeInObjectDestructuring(Type *inferedType, const lexer::SourcePosition &locInfo) -{ - if (inferedType->IsUnionType()) { - std::vector unionTypes; - - for (auto *it : inferedType->AsUnionType()->ConstituentTypes()) { - if (it->IsObjectType()) { - unionTypes.push_back(CreateObjectTypeForRest(it->AsObjectType())); - continue; - } - - ThrowTypeError("Rest types may only be created from object types.", locInfo); - } - - return CreateUnionType(std::move(unionTypes)); - } - - if (inferedType->IsObjectType()) { - return CreateObjectTypeForRest(inferedType->AsObjectType()); - } - - ThrowTypeError("Rest types may only be created from object types.", locInfo); - return nullptr; -} - -Type *Checker::CreateObjectTypeForRest(ObjectType *objType) -{ - ObjectDescriptor *desc = allocator_->New(); - - for (auto *it : objType->AsObjectType()->Properties()) { - if (!it->HasFlag(binder::VariableFlags::INFERED_IN_PATTERN)) { - auto *memberVar = binder::Scope::CreateVar(allocator_, it->Name(), binder::VariableFlags::NONE, nullptr); - memberVar->SetTsType(it->TsType()); - it->RemoveFlag(binder::VariableFlags::INFERED_IN_PATTERN); - memberVar->AddFlag(it->Flags()); - desc->properties.push_back(memberVar); - } - } - - return allocator_->New(desc); -} - -Type *Checker::CreateTupleTypeForRest(TupleTypeIterator *iterator) -{ - ObjectDescriptor *desc = allocator_->New(); - TupleElementFlagPool elementFlags; - uint32_t index = 0; - - (void)iterator; - - Type *iter = iterator->Next(); - while (iter) { - Type *elementType = iter; - ElementFlags memberFlag = ElementFlags::REQUIRED; - - util::StringView memberIndex = util::Helpers::ToStringView(allocator_, index); - auto *memberVar = binder::Scope::CreateVar(allocator_, memberIndex, binder::VariableFlags::PROPERTY, nullptr); - memberVar->SetTsType(elementType); - elementFlags.insert({memberIndex, memberFlag}); - desc->properties.push_back(memberVar); - - index++; - iter = iterator->Next(); - } - - return CreateTupleType(desc, std::move(elementFlags), ElementFlags::REQUIRED, index, index, false); -} - -Type *Checker::CreateArrayTypeForRest(UnionType *inferedType) -{ - std::vector unionTypes; - - for (auto *it : inferedType->ConstituentTypes()) { - if (it->IsArrayType()) { - unionTypes.push_back(it->AsArrayType()->ElementType()); - continue; - } - - if (it->IsObjectType() && it->AsObjectType()->IsTupleType()) { - TupleType *currentTuple = it->AsObjectType()->AsTupleType(); - - Type *iter = currentTuple->Iterator()->Next(); - while (iter) { - unionTypes.push_back(iter); - iter = currentTuple->Iterator()->Next(); - } - } - } - - Type *restArrayElementType = CreateUnionType(std::move(unionTypes)); - return allocator_->New(restArrayElementType); -} - -Type *Checker::CreateInitializerTypeForPattern(const Type *patternType, const ir::Expression *initNode, - bool validateCurrent) -{ - if (patternType->IsObjectType() && patternType->AsObjectType()->IsObjectLiteralType() && - initNode->IsObjectExpression()) { - return CreateInitializerTypeForObjectPattern(patternType->AsObjectType(), - const_cast(initNode->AsObjectExpression()), - validateCurrent); - } - - if (patternType->IsObjectType() && patternType->AsObjectType()->IsTupleType() && initNode->IsArrayExpression()) { - return CreateInitializerTypeForArrayPattern(patternType->AsObjectType()->AsTupleType(), - const_cast(initNode->AsArrayExpression()), - validateCurrent); - } - - return GetBaseTypeOfLiteralType(CheckTypeCached(initNode)); -} - -Type *Checker::CreateInitializerTypeForObjectPattern(const ObjectType *patternType, - const ir::ObjectExpression *initNode, bool validateCurrent) -{ - ObjectType *initObjectType = initNode->Check(this)->AsObjectType(); - - for (auto *it : initNode->AsObjectExpression()->Properties()) { - if (it->IsProperty()) { - ir::Property *currentProp = it->AsProperty(); - util::StringView propName = - ToPropertyName(currentProp->Key(), TypeFlag::COMPUTED_TYPE_LITERAL_NAME, currentProp->IsComputed()); - - binder::Variable *patternProp = patternType->GetProperty(propName); - - if (!patternProp) { - if (validateCurrent && !patternType->HasObjectFlag(ObjectType::ObjectFlags::HAVE_REST)) { - ThrowTypeError({"Object literal may only specify known properties, and '", propName, - "' does not exist in type '", patternType, "'."}, - currentProp->Start()); - } - - continue; - } - - binder::Variable *initProp = initObjectType->GetProperty(propName); - ASSERT(initProp); - - initProp->SetTsType(CreateInitializerTypeForPattern( - patternProp->TsType(), currentProp->Value(), !patternProp->HasFlag(binder::VariableFlags::OPTIONAL))); - } - } - - return initObjectType; -} - -Type *Checker::CreateInitializerTypeForArrayPattern(const TupleType *patternType, const ir::ArrayExpression *initNode, - bool validateCurrent) -{ - if (patternType->Properties().size() == 1 && (patternType->CombinedFlags() & ElementFlags::REST)) { - return initNode->Check(this); - } - - ObjectType *initTupleType = initNode->Check(this)->AsObjectType()->AsTupleType(); - - nodeCache_.insert({initNode, initTupleType}); - - for (size_t it = 0; it < initNode->Elements().size(); it++) { - if (patternType->FixedLength() < it) { - return initTupleType; - } - - util::StringView propName = util::Helpers::ToStringView(allocator_, static_cast(it)); - binder::Variable *initProp = initTupleType->GetProperty(propName); - ASSERT(initProp); - - binder::Variable *patternProp = patternType->GetProperty(propName); - - if (patternProp) { - initProp->SetTsType( - CreateInitializerTypeForPattern(patternProp->TsType(), initNode->Elements()[it], validateCurrent)); - } - } - - return initTupleType; -} - -bool Checker::ShouldCreatePropertyValueName(const ir::Expression *propValue) -{ - return propValue->IsArrayPattern() || propValue->IsObjectPattern() || - (propValue->IsAssignmentPattern() && (propValue->AsAssignmentPattern()->Left()->IsArrayPattern() || - propValue->AsAssignmentPattern()->Left()->IsObjectPattern())); -} - -void Checker::CreatePatternName(const ir::AstNode *node, std::stringstream &ss) const -{ - switch (node->Type()) { - case ir::AstNodeType::IDENTIFIER: { - ss << node->AsIdentifier()->Name(); - break; - } - case ir::AstNodeType::ARRAY_PATTERN: { - ss << "["; - - const auto &elements = node->AsArrayPattern()->Elements(); - for (auto it = elements.begin(); it != elements.end(); it++) { - Checker::CreatePatternName(*it, ss); - if (std::next(it) != elements.end()) { - ss << ", "; - } - } - - ss << "]"; - break; - } - case ir::AstNodeType::OBJECT_PATTERN: { - ss << "{ "; - - const auto &properties = node->AsObjectPattern()->Properties(); - for (auto it = properties.begin(); it != properties.end(); it++) { - Checker::CreatePatternName(*it, ss); - if (std::next(it) != properties.end()) { - ss << ", "; - } - } - - ss << " }"; - break; - } - case ir::AstNodeType::ASSIGNMENT_PATTERN: { - Checker::CreatePatternName(node->AsAssignmentPattern()->Left(), ss); - break; - } - case ir::AstNodeType::PROPERTY: { - const ir::Property *prop = node->AsProperty(); - util::StringView propName; - - if (prop->Key()->IsIdentifier()) { - propName = prop->Key()->AsIdentifier()->Name(); - } else { - switch (prop->Key()->Type()) { - case ir::AstNodeType::NUMBER_LITERAL: { - propName = - util::Helpers::ToStringView(allocator_, prop->Key()->AsNumberLiteral()->Number()); - break; - } - case ir::AstNodeType::BIGINT_LITERAL: { - propName = prop->Key()->AsBigIntLiteral()->Str(); - break; - } - case ir::AstNodeType::STRING_LITERAL: { - propName = prop->Key()->AsStringLiteral()->Str(); - break; - } - default: { - UNREACHABLE(); - break; - } - } - } - - ss << propName; - - if (ShouldCreatePropertyValueName(prop->Value())) { - ss << ": "; - Checker::CreatePatternName(prop->Value(), ss); - } - - break; - } - case ir::AstNodeType::REST_ELEMENT: { - ss << "..."; - Checker::CreatePatternName(node->AsRestElement()->Argument(), ss); - break; - } - case ir::AstNodeType::OMITTED_EXPRESSION: { - ss << ", "; - break; - } - default: - break; - } -} - -} // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/destructuringContext.cpp b/es2panda/typescript/core/destructuringContext.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a4904847c3ed71d760b6fb8280bfb046b23f3bb4 --- /dev/null +++ b/es2panda/typescript/core/destructuringContext.cpp @@ -0,0 +1,701 @@ +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "destructuringContext.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace panda::es2panda::checker { +void DestructuringContext::Prepare(const ir::Expression *typeAnnotation, const ir::Expression *initializer, + const lexer::SourcePosition &loc) +{ + if (typeAnnotation) { + typeAnnotation->Check(checker_); + Type *annotationType = typeAnnotation->AsTypeNode()->GetType(checker_); + + if (initializer) { + checker_->ElaborateElementwise(annotationType, initializer, loc); + } + + validateTypeAnnotation_ = true; + inferedType_ = annotationType; + return; + } + + if (initializer) { + if (!initializer->IsObjectExpression()) { + validateObjectPatternInitializer_ = false; + } + + inferedType_ = initializer->Check(checker_); + } +} + +void DestructuringContext::HandleDestructuringAssignment(const ir::Identifier *ident, Type *inferedType, + Type *defaultType) +{ + if (!ident->Variable()) { + checker_->ThrowTypeError({"Cannot find name '", ident->Name(), "'."}, ident->Start()); + } + + binder::Variable *variable = ident->Variable(); + ASSERT(variable->TsType()); + + if (defaultType && !checker_->IsTypeAssignableTo(defaultType, variable->TsType())) { + checker_->ThrowAssignmentError(defaultType, variable->TsType(), ident->Start()); + } + + if (inferedType && !checker_->IsTypeAssignableTo(inferedType, variable->TsType())) { + checker_->ThrowAssignmentError(inferedType, variable->TsType(), ident->Start()); + } +} + +void DestructuringContext::SetInferedTypeForVariable(binder::Variable *var, Type *inferedType, + const lexer::SourcePosition &loc) +{ + ASSERT(var); + + if (!checker_->HasStatus(CheckerStatus::IN_CONST_CONTEXT)) { + inferedType = checker_->GetBaseTypeOfLiteralType(inferedType); + } + + if (var->TsType()) { + checker_->IsTypeIdenticalTo(var->TsType(), inferedType, + {"Subsequent variable declaration must have the same type. Variable '", var->Name(), + "' must be of type '", var->TsType(), "', but here has type '", inferedType, "'."}, + loc); + return; + } + + if (signatureInfo_) { + signatureInfo_->params.push_back(var->AsLocalVariable()); + signatureInfo_->minArgCount++; + } + + var->SetTsType(inferedType); +} + +void DestructuringContext::ValidateObjectLiteralType(ObjectType *objType, const ir::ObjectExpression *objPattern) +{ + for (const auto *sourceProp : objType->Properties()) { + const util::StringView &sourceName = sourceProp->Name(); + bool found = false; + + for (const auto *targetProp : objPattern->Properties()) { + if (targetProp->IsRestElement()) { + continue; + } + + ASSERT(targetProp->IsProperty()); + const util::StringView &targetName = targetProp->AsProperty()->Key()->AsIdentifier()->Name(); + + if (sourceName == targetName) { + found = true; + break; + } + } + + if (!found) { + checker_->ThrowTypeError({"Object literal may only specify known properties, and property '", sourceName, + "' does not exist in the pattern."}, + objPattern->Start()); + } + } +} + +void DestructuringContext::HandleAssignmentPattern(const ir::AssignmentExpression *assignmentPattern, Type *inferedType, + bool validateDefault) +{ + if (!assignmentPattern->Left()->IsArrayPattern()) { + checker_->RemoveStatus(CheckerStatus::FORCE_TUPLE); + } + + Type *defaultType = assignmentPattern->Right()->Check(checker_); + + if (!checker_->HasStatus(CheckerStatus::IN_CONST_CONTEXT)) { + defaultType = checker_->GetBaseTypeOfLiteralType(defaultType); + } + + if (validateDefault && assignmentPattern->Right()->IsObjectExpression() && + assignmentPattern->Left()->IsObjectPattern()) { + ValidateObjectLiteralType(defaultType->AsObjectType(), assignmentPattern->Left()->AsObjectPattern()); + } + + Type *initType = inferedType; + checker_->AddStatus(CheckerStatus::FORCE_TUPLE); + + if (validateTypeAnnotation_) { + if (!inferedType) { + inferedType = checker_->GlobalUndefinedType(); + } + } else { + if (!inferedType) { + inferedType = defaultType; + } else if (inferedType->IsUnionType()) { + inferedType->AsUnionType()->AddConstituentType(defaultType, checker_->Relation()); + } else { + inferedType = checker_->CreateUnionType({inferedType, defaultType}); + } + } + + if (assignmentPattern->Left()->IsIdentifier()) { + if (inAssignment_) { + HandleDestructuringAssignment(assignmentPattern->Left()->AsIdentifier(), initType, defaultType); + return; + } + + if (validateTypeAnnotation_ && !checker_->IsTypeAssignableTo(defaultType, inferedType)) { + checker_->ThrowAssignmentError(defaultType, inferedType, assignmentPattern->Left()->Start()); + } + + SetInferedTypeForVariable(assignmentPattern->Left()->AsIdentifier()->Variable(), inferedType, + assignmentPattern->Start()); + return; + } + + if (assignmentPattern->Left()->IsArrayPattern()) { + ArrayDestructuringContext nextContext = ArrayDestructuringContext( + checker_, assignmentPattern->Left(), inAssignment_, convertTupleToArray_, nullptr, nullptr); + nextContext.SetInferedType(inferedType); + nextContext.Start(); + return; + } + + ASSERT(assignmentPattern->Left()->IsObjectPattern()); + ObjectDestructuringContext nextContext = ObjectDestructuringContext( + checker_, assignmentPattern->Left(), inAssignment_, convertTupleToArray_, nullptr, nullptr); + nextContext.SetInferedType(inferedType); + nextContext.Start(); +} + +void ArrayDestructuringContext::ValidateInferedType() +{ + if (!inferedType_->IsArrayType() && !inferedType_->IsUnionType() && + (!inferedType_->IsObjectType() || !inferedType_->AsObjectType()->IsTupleType())) { + checker_->ThrowTypeError( + {"Type ", inferedType_, " must have a '[Symbol.iterator]()' method that returns an iterator."}, + id_->Start()); + } + + if (inferedType_->IsUnionType()) { + for (auto *it : inferedType_->AsUnionType()->ConstituentTypes()) { + if (!it->IsArrayType() && (!it->IsObjectType() || !it->AsObjectType()->IsTupleType())) { + checker_->ThrowTypeError( + {"Type ", inferedType_, " must have a '[Symbol.iterator]()' method that returns an iterator."}, + id_->Start()); + } + } + } +} + +Type *ArrayDestructuringContext::GetTypeFromTupleByIndex(TupleType *tuple) +{ + util::StringView memberIndex = util::Helpers::ToStringView(checker_->Allocator(), index_); + binder::Variable *memberVar = tuple->GetProperty(memberIndex, false); + + if (!memberVar) { + return nullptr; + } + + return memberVar->TsType(); +} + +Type *ArrayDestructuringContext::NextInferedType([[maybe_unused]] const util::StringView &searchName, bool throwError) +{ + if (inferedType_->IsArrayType()) { + return inferedType_->AsArrayType()->ElementType(); + } + + if (inferedType_->IsObjectType()) { + ASSERT(inferedType_->AsObjectType()->IsTupleType()); + Type *returnType = GetTypeFromTupleByIndex(inferedType_->AsObjectType()->AsTupleType()); + + if (!returnType && throwError) { + if (!validateTypeAnnotation_ && checker_->HasStatus(CheckerStatus::IN_PARAMETER)) { + return returnType; + } + + checker_->ThrowTypeError({"Tuple type ", inferedType_, " of length ", + inferedType_->AsObjectType()->AsTupleType()->FixedLength(), + " has no element at index ", index_, "."}, + id_->Start()); + } + + return returnType; + } + + ASSERT(inferedType_->IsUnionType()); + + ArenaVector unionTypes(checker_->Allocator()->Adapter()); + + for (auto *type : inferedType_->AsUnionType()->ConstituentTypes()) { + if (type->IsArrayType()) { + unionTypes.push_back(type->AsArrayType()->ElementType()); + continue; + } + + ASSERT(type->IsObjectType() && type->AsObjectType()->IsTupleType()); + Type *elementType = GetTypeFromTupleByIndex(type->AsObjectType()->AsTupleType()); + + if (!elementType) { + continue; + } + + unionTypes.push_back(elementType); + } + + if (unionTypes.empty()) { + if (throwError) { + checker_->ThrowTypeError({"Property ", index_, " does not exist on type ", inferedType_, "."}, + id_->Start()); + } + + return nullptr; + } + + return checker_->CreateUnionType(std::move(unionTypes)); +} + +Type *ArrayDestructuringContext::CreateArrayTypeForRest(UnionType *inferedType) +{ + ArenaVector unionTypes(checker_->Allocator()->Adapter()); + uint32_t savedIdx = index_; + + for (auto *it : inferedType->ConstituentTypes()) { + if (it->IsArrayType()) { + unionTypes.push_back(it->AsArrayType()->ElementType()); + continue; + } + + ASSERT(it->IsObjectType() && it->AsObjectType()->IsTupleType()); + Type *tupleElementType = GetTypeFromTupleByIndex(it->AsObjectType()->AsTupleType()); + + while (tupleElementType) { + unionTypes.push_back(tupleElementType); + index_++; + tupleElementType = GetTypeFromTupleByIndex(it->AsObjectType()->AsTupleType()); + } + + index_ = savedIdx; + } + + Type *restArrayElementType = checker_->CreateUnionType(std::move(unionTypes)); + return checker_->Allocator()->New(restArrayElementType); +} + +Type *ArrayDestructuringContext::CreateTupleTypeForRest(TupleType *tuple) +{ + ObjectDescriptor *desc = checker_->Allocator()->New(checker_->Allocator()); + ArenaVector elementFlags(checker_->Allocator()->Adapter()); + uint32_t savedIdx = index_; + uint32_t iterIndex = 0; + + Type *tupleElementType = GetTypeFromTupleByIndex(tuple); + + while (tupleElementType) { + ElementFlags memberFlag = ElementFlags::REQUIRED; + util::StringView memberIndex = util::Helpers::ToStringView(checker_->Allocator(), iterIndex); + auto *memberVar = + binder::Scope::CreateVar(checker_->Allocator(), memberIndex, binder::VariableFlags::PROPERTY, nullptr); + memberVar->SetTsType(tupleElementType); + elementFlags.push_back(memberFlag); + desc->properties.push_back(memberVar); + + index_++; + iterIndex++; + + tupleElementType = GetTypeFromTupleByIndex(tuple); + } + + index_ = savedIdx; + return checker_->CreateTupleType(desc, std::move(elementFlags), ElementFlags::REQUIRED, iterIndex, iterIndex, + false); +} + +Type *ArrayDestructuringContext::GetRestType([[maybe_unused]] const lexer::SourcePosition &loc) +{ + if (inferedType_->IsArrayType()) { + return inferedType_; + } + + if (inferedType_->IsObjectType() && inferedType_->AsObjectType()->IsTupleType()) { + return CreateTupleTypeForRest(inferedType_->AsObjectType()->AsTupleType()); + } + + ASSERT(inferedType_->IsUnionType()); + bool createArrayType = false; + + for (auto *it : inferedType_->AsUnionType()->ConstituentTypes()) { + if (it->IsArrayType()) { + createArrayType = true; + break; + } + } + + if (createArrayType) { + return CreateArrayTypeForRest(inferedType_->AsUnionType()); + } + + ArenaVector tupleUnion(checker_->Allocator()->Adapter()); + + for (auto *it : inferedType_->AsUnionType()->ConstituentTypes()) { + ASSERT(it->IsObjectType() && it->AsObjectType()->IsTupleType()); + Type *newTuple = CreateTupleTypeForRest(it->AsObjectType()->AsTupleType()); + tupleUnion.push_back(newTuple); + } + + return checker_->CreateUnionType(std::move(tupleUnion)); +} + +void ArrayDestructuringContext::HandleRest(const ir::SpreadElement *rest) +{ + Type *inferedRestType = GetRestType(rest->Start()); + + if (rest->Argument()->IsIdentifier()) { + if (inAssignment_) { + HandleDestructuringAssignment(rest->Argument()->AsIdentifier(), inferedRestType, nullptr); + return; + } + + SetInferedTypeForVariable(rest->Argument()->AsIdentifier()->Variable(), inferedRestType, rest->Start()); + return; + } + + if (rest->Argument()->IsArrayPattern()) { + ArrayDestructuringContext nextContext = ArrayDestructuringContext(checker_, rest->Argument(), inAssignment_, + convertTupleToArray_, nullptr, nullptr); + nextContext.SetInferedType(inferedRestType); + nextContext.Start(); + return; + } + + ASSERT(rest->Argument()->IsObjectPattern()); + ObjectDestructuringContext nextContext = + ObjectDestructuringContext(checker_, rest->Argument(), inAssignment_, convertTupleToArray_, nullptr, nullptr); + nextContext.SetInferedType(inferedRestType); + nextContext.Start(); +} + +Type *ArrayDestructuringContext::ConvertTupleTypeToArrayTypeIfNecessary(const ir::AstNode *node, Type *type) +{ + if (!convertTupleToArray_) { + return type; + } + + if (!type) { + return type; + } + + if (node->IsArrayPattern() || + (node->IsAssignmentPattern() && node->AsAssignmentPattern()->Left()->IsArrayPattern())) { + return type; + } + + if (type->IsObjectType() && type->AsObjectType()->IsTupleType()) { + return type->AsObjectType()->AsTupleType()->ConvertToArrayType(checker_); + } + + return type; +} + +static void SetParameterType(const ir::AstNode *parent, Type *type) +{ + parent->Iterate([type](ir::AstNode *childNode) -> void { + if (childNode->IsIdentifier() && childNode->AsIdentifier()->Variable()) { + childNode->AsIdentifier()->Variable()->SetTsType(type); + return; + } + + SetParameterType(childNode, type); + }); +} + +void ArrayDestructuringContext::SetRemainingPatameterTypes() +{ + do { + const auto *it = id_->AsArrayPattern()->Elements()[index_]; + ASSERT(it); + SetParameterType(it, checker_->GlobalAnyType()); + } while (++index_ != id_->AsArrayPattern()->Elements().size()); +} + +void ArrayDestructuringContext::Start() +{ + ASSERT(id_->IsArrayPattern()); + + ValidateInferedType(); + + util::StringView name = util::Helpers::ToStringView(checker_->Allocator(), 0); + + for (const auto *it : id_->AsArrayPattern()->Elements()) { + if (it->IsRestElement()) { + HandleRest(it->AsRestElement()); + break; + } + + Type *nextInferedType = + ConvertTupleTypeToArrayTypeIfNecessary(it, NextInferedType(name, !it->IsAssignmentPattern())); + + if (!nextInferedType && checker_->HasStatus(CheckerStatus::IN_PARAMETER)) { + SetRemainingPatameterTypes(); + return; + } + + if (convertTupleToArray_ && nextInferedType && inferedType_->IsObjectType()) { + ASSERT(inferedType_->AsObjectType()->IsTupleType()); + + binder::Variable *currentTupleElement = inferedType_->AsObjectType()->Properties()[index_]; + + if (currentTupleElement) { + currentTupleElement->SetTsType(nextInferedType); + } + } + + switch (it->Type()) { + case ir::AstNodeType::IDENTIFIER: { + if (inAssignment_) { + HandleDestructuringAssignment(it->AsIdentifier(), nextInferedType, nullptr); + break; + } + + SetInferedTypeForVariable(it->AsIdentifier()->Variable(), nextInferedType, it->Start()); + break; + } + case ir::AstNodeType::ARRAY_PATTERN: { + ArrayDestructuringContext nextContext = + ArrayDestructuringContext(checker_, it, inAssignment_, convertTupleToArray_, nullptr, nullptr); + nextContext.SetInferedType(nextInferedType); + nextContext.Start(); + break; + } + case ir::AstNodeType::OBJECT_PATTERN: { + ObjectDestructuringContext nextContext = + ObjectDestructuringContext(checker_, it, inAssignment_, convertTupleToArray_, nullptr, nullptr); + nextContext.SetInferedType(nextInferedType); + nextContext.Start(); + break; + } + case ir::AstNodeType::ASSIGNMENT_PATTERN: { + HandleAssignmentPattern(it->AsAssignmentPattern(), nextInferedType, false); + break; + } + case ir::AstNodeType::OMITTED_EXPRESSION: { + break; + } + default: { + UNREACHABLE(); + } + } + + index_++; + } +} + +void ObjectDestructuringContext::ValidateInferedType() +{ + if (!inferedType_->IsObjectType()) { + return; + } + + ValidateObjectLiteralType(inferedType_->AsObjectType(), id_->AsObjectPattern()); +} + +void ObjectDestructuringContext::HandleRest(const ir::SpreadElement *rest) +{ + Type *inferedRestType = GetRestType(rest->Start()); + ASSERT(rest->Argument()->IsIdentifier()); + + if (inAssignment_) { + HandleDestructuringAssignment(rest->Argument()->AsIdentifier(), inferedRestType, nullptr); + return; + } + + SetInferedTypeForVariable(rest->Argument()->AsIdentifier()->Variable(), inferedRestType, rest->Start()); +} + +Type *ObjectDestructuringContext::CreateObjectTypeForRest(ObjectType *objType) +{ + ObjectDescriptor *desc = checker_->Allocator()->New(checker_->Allocator()); + + for (auto *it : objType->AsObjectType()->Properties()) { + if (!it->HasFlag(binder::VariableFlags::INFERED_IN_PATTERN)) { + auto *memberVar = + binder::Scope::CreateVar(checker_->Allocator(), it->Name(), binder::VariableFlags::NONE, nullptr); + memberVar->SetTsType(it->TsType()); + memberVar->AddFlag(it->Flags()); + desc->properties.push_back(memberVar); + } + } + + Type *returnType = checker_->Allocator()->New(desc); + returnType->AsObjectType()->AddObjectFlag(ObjectFlags::RESOLVED_MEMBERS); + return returnType; +} + +Type *ObjectDestructuringContext::GetRestType([[maybe_unused]] const lexer::SourcePosition &loc) +{ + if (inferedType_->IsUnionType()) { + ArenaVector unionTypes(checker_->Allocator()->Adapter()); + + for (auto *it : inferedType_->AsUnionType()->ConstituentTypes()) { + if (it->IsObjectType()) { + unionTypes.push_back(CreateObjectTypeForRest(it->AsObjectType())); + continue; + } + + checker_->ThrowTypeError("Rest types may only be created from object types.", loc); + } + + return checker_->CreateUnionType(std::move(unionTypes)); + } + + if (inferedType_->IsObjectType()) { + return CreateObjectTypeForRest(inferedType_->AsObjectType()); + } + + checker_->ThrowTypeError("Rest types may only be created from object types.", loc); +} + +Type *ObjectDestructuringContext::ConvertTupleTypeToArrayTypeIfNecessary(const ir::AstNode *node, Type *type) +{ + if (!convertTupleToArray_) { + return type; + } + + if (!type) { + return type; + } + + ASSERT(node->IsProperty()); + + const ir::Property *property = node->AsProperty(); + + if (property->Value()->IsArrayPattern()) { + return type; + } + + if (property->Value()->IsAssignmentPattern() && + property->Value()->AsAssignmentPattern()->Left()->IsArrayPattern()) { + return type; + } + + if (type->IsObjectType() && type->AsObjectType()->IsTupleType()) { + return type->AsObjectType()->AsTupleType()->ConvertToArrayType(checker_); + } + + return type; +} + +Type *ObjectDestructuringContext::NextInferedType([[maybe_unused]] const util::StringView &searchName, bool throwError) +{ + binder::Variable *prop = + checker_->GetPropertyOfType(inferedType_, searchName, !throwError, binder::VariableFlags::INFERED_IN_PATTERN); + + if (prop) { + prop->AddFlag(binder::VariableFlags::INFERED_IN_PATTERN); + return prop->TsType(); + } + + if (inferedType_->IsObjectType()) { + checker::ObjectType *objType = inferedType_->AsObjectType(); + + if (objType->StringIndexInfo()) { + return objType->StringIndexInfo()->GetType(); + } + } + + if (throwError) { + checker_->ThrowTypeError({"Property ", searchName, " does not exist on type ", inferedType_, "."}, + id_->Start()); + } + + return nullptr; +} + +void ObjectDestructuringContext::Start() +{ + ASSERT(id_->IsObjectPattern()); + + if (!id_->AsObjectPattern()->Properties().back()->IsRestElement() && validateObjectPatternInitializer_) { + ValidateInferedType(); + } + + for (const auto *it : id_->AsObjectPattern()->Properties()) { + switch (it->Type()) { + case ir::AstNodeType::PROPERTY: { + const ir::Property *property = it->AsProperty(); + + if (property->IsComputed()) { + // TODO(aszilagyi) + return; + } + + Type *nextInferedType = ConvertTupleTypeToArrayTypeIfNecessary( + it->AsProperty(), + NextInferedType(property->Key()->AsIdentifier()->Name(), + (!property->Value()->IsAssignmentPattern() || validateTypeAnnotation_))); + + if (property->Value()->IsIdentifier()) { + if (inAssignment_) { + HandleDestructuringAssignment(property->Value()->AsIdentifier(), nextInferedType, nullptr); + break; + } + + SetInferedTypeForVariable(property->Value()->AsIdentifier()->Variable(), nextInferedType, + it->Start()); + break; + } + + if (property->Value()->IsArrayPattern()) { + ArrayDestructuringContext nextContext = + ArrayDestructuringContext(checker_, property->Value()->AsArrayPattern(), inAssignment_, + convertTupleToArray_, nullptr, nullptr); + nextContext.SetInferedType(nextInferedType); + nextContext.Start(); + break; + } + + if (property->Value()->IsObjectPattern()) { + ObjectDestructuringContext nextContext = + ObjectDestructuringContext(checker_, property->Value()->AsObjectPattern(), inAssignment_, + convertTupleToArray_, nullptr, nullptr); + nextContext.SetInferedType(nextInferedType); + nextContext.Start(); + break; + } + + ASSERT(property->Value()->IsAssignmentPattern()); + HandleAssignmentPattern(property->Value()->AsAssignmentPattern(), nextInferedType, true); + break; + } + case ir::AstNodeType::REST_ELEMENT: { + HandleRest(it->AsRestElement()); + break; + } + default: { + UNREACHABLE(); + } + } + } +} +} // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/destructuringContext.h b/es2panda/typescript/core/destructuringContext.h new file mode 100644 index 0000000000000000000000000000000000000000..4ca0c17a4f4ccf614ff82282c6c7c4cf3138dab1 --- /dev/null +++ b/es2panda/typescript/core/destructuringContext.h @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ES2PANDA_TYPESCIRPT_CORE_DESTRUCTURING_CONTEXT_H +#define ES2PANDA_TYPESCIRPT_CORE_DESTRUCTURING_CONTEXT_H + +#include +#include + +#include + +namespace panda::es2panda::ir { +class Expression; +class SpreadElement; +} // namespace panda::es2panda::ir + +namespace panda::es2panda::checker { +class Type; + +class DestructuringContext { +public: + DestructuringContext(Checker *checker, const ir::Expression *id, bool inAssignment, bool convertTupleToArray, + const ir::Expression *typeAnnotation, const ir::Expression *initializer) + : checker_(checker), id_(id), inAssignment_(inAssignment), convertTupleToArray_(convertTupleToArray) + { + Prepare(typeAnnotation, initializer, id->Start()); + } + + void SetInferedType(Type *type) + { + inferedType_ = type; + } + + void SetSignatureInfo(SignatureInfo *info) + { + signatureInfo_ = info; + } + + Type *InferedType() + { + return inferedType_; + } + + void ValidateObjectLiteralType(ObjectType *objType, const ir::ObjectExpression *objPattern); + void HandleDestructuringAssignment(const ir::Identifier *ident, Type *inferedType, Type *defaultType); + void HandleAssignmentPattern(const ir::AssignmentExpression *assignmentPattern, Type *inferedType, + bool validateDefault); + void SetInferedTypeForVariable(binder::Variable *var, Type *inferedType, const lexer::SourcePosition &loc); + void Prepare(const ir::Expression *typeAnnotation, const ir::Expression *initializer, + const lexer::SourcePosition &loc); + + DEFAULT_COPY_SEMANTIC(DestructuringContext); + DEFAULT_MOVE_SEMANTIC(DestructuringContext); + ~DestructuringContext() = default; + + virtual void Start() = 0; + virtual void ValidateInferedType() = 0; + virtual Type *NextInferedType([[maybe_unused]] const util::StringView &searchName, bool throwError) = 0; + virtual void HandleRest(const ir::SpreadElement *rest) = 0; + virtual Type *GetRestType([[maybe_unused]] const lexer::SourcePosition &loc) = 0; + virtual Type *ConvertTupleTypeToArrayTypeIfNecessary(const ir::AstNode *node, Type *type) = 0; + +protected: + Checker *checker_; + const ir::Expression *id_; + bool inAssignment_; + bool convertTupleToArray_; + Type *inferedType_ {nullptr}; + SignatureInfo *signatureInfo_ {nullptr}; + bool validateObjectPatternInitializer_ {true}; + bool validateTypeAnnotation_ {false}; +}; + +class ArrayDestructuringContext : public DestructuringContext { +public: + ArrayDestructuringContext(Checker *checker, const ir::Expression *id, bool inAssignment, bool convertTupleToArray, + const ir::Expression *typeAnnotation, const ir::Expression *initializer) + : DestructuringContext(checker, id, inAssignment, convertTupleToArray, typeAnnotation, initializer) + { + } + + Type *GetTypeFromTupleByIndex(TupleType *tuple); + Type *CreateArrayTypeForRest(UnionType *inferedType); + Type *CreateTupleTypeForRest(TupleType *tuple); + void SetRemainingPatameterTypes(); + + void Start() override; + void ValidateInferedType() override; + Type *NextInferedType([[maybe_unused]] const util::StringView &searchName, bool throwError) override; + void HandleRest(const ir::SpreadElement *rest) override; + Type *GetRestType([[maybe_unused]] const lexer::SourcePosition &loc) override; + Type *ConvertTupleTypeToArrayTypeIfNecessary(const ir::AstNode *node, Type *type) override; + +private: + uint32_t index_ {0}; +}; + +class ObjectDestructuringContext : public DestructuringContext { +public: + ObjectDestructuringContext(Checker *checker, const ir::Expression *id, bool inAssignment, bool convertTupleToArray, + const ir::Expression *typeAnnotation, const ir::Expression *initializer) + : DestructuringContext(checker, id, inAssignment, convertTupleToArray, typeAnnotation, initializer) + { + } + + Type *CreateObjectTypeForRest(ObjectType *objType); + + void Start() override; + void ValidateInferedType() override; + Type *NextInferedType([[maybe_unused]] const util::StringView &searchName, bool throwError) override; + void HandleRest(const ir::SpreadElement *rest) override; + Type *GetRestType([[maybe_unused]] const lexer::SourcePosition &loc) override; + Type *ConvertTupleTypeToArrayTypeIfNecessary(const ir::AstNode *node, Type *type) override; +}; +} // namespace panda::es2panda::checker + +#endif diff --git a/es2panda/typescript/core/function.cpp b/es2panda/typescript/core/function.cpp index 09006bd449defc4704f93e031d1a5e6a1f58e62a..cc34cf5a712a17d8c7e7f52972a287f43ae50fed 100644 --- a/es2panda/typescript/core/function.cpp +++ b/es2panda/typescript/core/function.cpp @@ -18,16 +18,25 @@ #include #include #include +#include +#include +#include +#include #include #include #include +#include + #include #include #include #include #include +#include + #include +#include #include #include @@ -38,251 +47,593 @@ #include namespace panda::es2panda::checker { - -Signature *Checker::HandleFunctionReturn(const ir::ScriptFunction *func, SignatureInfo *signatureInfo, - binder::Variable *funcVar) +Type *Checker::HandleFunctionReturn(const ir::ScriptFunction *func) { - // TODO(aszilagyi): this function only works properly for simple functions, have to implement the Async and/or - // Generator function part - Signature *callSignature = allocator_->New(signatureInfo, GlobalAnyType()); + if (func->ReturnTypeAnnotation()) { + func->ReturnTypeAnnotation()->Check(this); + Type *returnType = func->ReturnTypeAnnotation()->AsTypeNode()->GetType(this); - if (funcVar) { - Type *funcType = CreateFunctionTypeWithSignature(callSignature); - funcType->SetVariable(funcVar); - funcVar->SetTsType(funcType); - callSignature = funcVar->TsType()->AsObjectType()->CallSignatures()[0]; - } + if (func->IsArrow() && func->Body()->IsExpression()) { + ElaborateElementwise(returnType, func->Body()->AsExpression(), func->Body()->Start()); + } - if (func->ReturnTypeAnnotation()) { - Type *returnType = func->ReturnTypeAnnotation()->Check(this); - - if (func->IsArrow() && func->Body()->IsExpression() && - !ElaborateElementwise(func->Body()->AsExpression(), returnType, func->Body()->Start())) { - Type *bodyType = GetBaseTypeOfLiteralType(func->Body()->Check(this)); - IsTypeAssignableTo(bodyType, returnType, - {"Type '", bodyType, "' is not assignable to type '", returnType, "'."}, - func->Body()->Start()); - } else if (returnType->IsNeverType()) { + if (returnType->IsNeverType()) { ThrowTypeError("A function returning 'never' cannot have a reachable end point.", func->ReturnTypeAnnotation()->Start()); - } else if (!MaybeTypeOfKind(returnType, TypeFlag::ANY_OR_VOID)) { + } + + if (!MaybeTypeOfKind(returnType, TypeFlag::ANY_OR_VOID)) { CheckAllCodePathsInNonVoidFunctionReturnOrThrow( func, func->ReturnTypeAnnotation()->Start(), "A function whose declared type is neither 'void' nor 'any' must return a value."); } - callSignature->SetReturnType(returnType); - } else if (func->Declare()) { - callSignature->SetReturnType(GlobalAnyType()); - } else if (func->IsArrow() && func->Body()->IsExpression()) { - callSignature->SetReturnType(GetBaseTypeOfLiteralType(func->Body()->Check(this))); - } else { - std::vector returnTypes; - CollectTypesFromReturnStatements(func->Body(), returnTypes); + return returnType; + } - if (returnTypes.empty()) { - callSignature->SetReturnType(GlobalVoidType()); - } else { - callSignature->SetReturnType(CreateUnionType(std::move(returnTypes))); + if (func->Declare()) { + return GlobalAnyType(); + } + + if (func->IsArrow() && func->Body()->IsExpression()) { + return func->Body()->Check(this); + } + + ArenaVector returnTypes(allocator_->Adapter()); + CollectTypesFromReturnStatements(func->Body(), &returnTypes); + + if (returnTypes.empty()) { + return GlobalVoidType(); + } + + if (returnTypes.size() == 1 && returnTypes[0] == GlobalResolvingReturnType()) { + ThrowReturnTypeCircularityError(func); + } + + for (auto *it : returnTypes) { + if (it == GlobalResolvingReturnType()) { + ThrowReturnTypeCircularityError(func); } } - return callSignature; + return CreateUnionType(std::move(returnTypes)); } -void Checker::CreateTypeForObjectPatternParameter(ObjectType *patternType, const ir::Expression *patternNode, - const ir::Expression *initNode) +void Checker::ThrowReturnTypeCircularityError(const ir::ScriptFunction *func) { - if (initNode) { - ASSERT(initNode->IsObjectExpression()); - ObjectType *initObjType = CheckTypeCached(initNode)->AsObjectType(); - - for (auto *it : initObjType->Properties()) { - binder::LocalVariable *foundProp = patternType->GetProperty(it->Name()); - if (foundProp) { - foundProp->SetTsType(it->TsType()); + if (func->ReturnTypeAnnotation()) { + ThrowTypeError("Return type annotation circularly reference itself", func->ReturnTypeAnnotation()->Start()); + } + + if (func->Id()) { + ThrowTypeError({func->Id()->AsIdentifier()->Name(), + " implicitly has return type 'any' because it does not have a return type annotation and is " + "referenced directly or indirectly in one of its return expressions."}, + func->Id()->Start()); + } + + ThrowTypeError( + "Function implicitly has return type 'any' because it does not have a return type annotation and is " + "referenced directly or indirectly in one of its return expressions.", + func->Start()); +} + +std::tuple Checker::CheckFunctionIdentifierParameter( + const ir::Identifier *param) +{ + ASSERT(param->Variable()); + binder::Variable *paramVar = param->Variable(); + bool isOptional = param->IsOptional(); + + if (!param->TypeAnnotation()) { + ThrowTypeError({"Parameter ", param->Name(), " implicitly has any type."}, param->Start()); + } + + if (isOptional) { + paramVar->AddFlag(binder::VariableFlags::OPTIONAL); + } + + param->TypeAnnotation()->Check(this); + paramVar->SetTsType(param->TypeAnnotation()->AsTypeNode()->GetType(this)); + return {paramVar->AsLocalVariable(), nullptr, isOptional}; +} + +Type *Checker::CreateParameterTypeForArrayAssignmentPattern(const ir::ArrayExpression *arrayPattern, Type *inferedType) +{ + if (!inferedType->IsObjectType()) { + return inferedType; + } + + ASSERT(inferedType->AsObjectType()->IsTupleType()); + TupleType *inferedTuple = inferedType->AsObjectType()->AsTupleType(); + + if (inferedTuple->FixedLength() > arrayPattern->Elements().size()) { + return inferedType; + } + + TupleType *newTuple = inferedTuple->Instantiate(allocator_, relation_, globalTypes_)->AsObjectType()->AsTupleType(); + + for (uint32_t index = inferedTuple->FixedLength(); index < arrayPattern->Elements().size(); index++) { + util::StringView memberIndex = util::Helpers::ToStringView(allocator_, index); + binder::LocalVariable *newMember = binder::Scope::CreateVar( + allocator_, memberIndex, binder::VariableFlags::PROPERTY | binder::VariableFlags::OPTIONAL, nullptr); + newMember->SetTsType(GlobalAnyType()); + newTuple->AddProperty(newMember); + } + + return newTuple; +} + +Type *Checker::CreateParameterTypeForObjectAssignmentPattern(const ir::ObjectExpression *objectPattern, + Type *inferedType) +{ + if (!inferedType->IsObjectType()) { + return inferedType; + } + + ObjectType *newObject = inferedType->Instantiate(allocator_, relation_, globalTypes_)->AsObjectType(); + + for (const auto *it : objectPattern->Properties()) { + if (it->IsRestElement()) { + continue; + } + + const ir::Property *prop = it->AsProperty(); + binder::LocalVariable *foundVar = newObject->GetProperty(prop->Key()->AsIdentifier()->Name(), true); + + if (foundVar) { + if (prop->Value()->IsAssignmentPattern()) { + foundVar->AddFlag(binder::VariableFlags::OPTIONAL); } + + continue; + } + + ASSERT(prop->Value()->IsAssignmentPattern()); + const ir::AssignmentExpression *assignmentPattern = prop->Value()->AsAssignmentPattern(); + + binder::LocalVariable *newProp = + binder::Scope::CreateVar(allocator_, prop->Key()->AsIdentifier()->Name(), + binder::VariableFlags::PROPERTY | binder::VariableFlags::OPTIONAL, nullptr); + newProp->SetTsType(GetBaseTypeOfLiteralType(CheckTypeCached(assignmentPattern->Right()))); + newObject->AddProperty(newProp); + } + + newObject->AddObjectFlag(ObjectFlags::RESOLVED_MEMBERS); + return newObject; +} + +std::tuple Checker::CheckFunctionAssignmentPatternParameter( + const ir::AssignmentExpression *param) +{ + if (param->Left()->IsIdentifier()) { + const ir::Identifier *paramIdent = param->Left()->AsIdentifier(); + binder::Variable *paramVar = paramIdent->Variable(); + ASSERT(paramVar); + + if (paramIdent->TypeAnnotation()) { + paramIdent->TypeAnnotation()->Check(this); + Type *paramType = paramIdent->TypeAnnotation()->AsTypeNode()->GetType(this); + paramVar->SetTsType(paramType); + ElaborateElementwise(paramType, param->Right(), paramIdent->Start()); + return {paramVar->AsLocalVariable(), nullptr, true}; + } + + paramVar->SetTsType(GetBaseTypeOfLiteralType(param->Right()->Check(this))); + paramVar->AddFlag(binder::VariableFlags::OPTIONAL); + return {paramVar->AsLocalVariable(), nullptr, true}; + } + + Type *paramType = nullptr; + std::stringstream ss; + + auto savedContext = SavedCheckerContext(this, CheckerStatus::FORCE_TUPLE | CheckerStatus::IN_PARAMETER); + + if (param->Left()->IsArrayPattern()) { + const ir::ArrayExpression *arrayPattern = param->Left()->AsArrayPattern(); + auto context = + ArrayDestructuringContext(this, arrayPattern, false, true, arrayPattern->TypeAnnotation(), param->Right()); + context.Start(); + paramType = CreateParameterTypeForArrayAssignmentPattern(arrayPattern, context.InferedType()); + CreatePatternParameterName(param->Left(), ss); + } else { + const ir::ObjectExpression *objectPattern = param->Left()->AsObjectPattern(); + auto context = ObjectDestructuringContext(this, objectPattern, false, true, objectPattern->TypeAnnotation(), + param->Right()); + context.Start(); + paramType = CreateParameterTypeForObjectAssignmentPattern(objectPattern, context.InferedType()); + CreatePatternParameterName(param->Left(), ss); + } + + util::UString pn(ss.str(), allocator_); + binder::LocalVariable *patternVar = + binder::Scope::CreateVar(allocator_, pn.View(), binder::VariableFlags::NONE, param); + patternVar->SetTsType(paramType); + patternVar->AddFlag(binder::VariableFlags::OPTIONAL); + return {patternVar->AsLocalVariable(), nullptr, true}; +} + +std::tuple Checker::CheckFunctionRestParameter( + const ir::SpreadElement *param, SignatureInfo *signatureInfo) +{ + const ir::Expression *typeAnnotation = nullptr; + switch (param->Argument()->Type()) { + case ir::AstNodeType::IDENTIFIER: { + typeAnnotation = param->Argument()->AsIdentifier()->TypeAnnotation(); + break; + } + case ir::AstNodeType::OBJECT_PATTERN: { + typeAnnotation = param->Argument()->AsArrayPattern()->TypeAnnotation(); + break; + } + case ir::AstNodeType::ARRAY_PATTERN: { + typeAnnotation = param->Argument()->AsObjectPattern()->TypeAnnotation(); + break; + } + default: { + UNREACHABLE(); } } - for (auto *it : patternNode->AsObjectPattern()->Properties()) { - if (it->IsProperty() && it->AsProperty()->Value()->IsAssignmentPattern() && - !it->AsProperty()->Value()->AsAssignmentPattern()->Left()->IsIdentifier()) { - const ir::AssignmentExpression *assignmentPattern = it->AsProperty()->Value()->AsAssignmentPattern(); + Type *restType = allocator_->New(GlobalAnyType()); - binder::LocalVariable *foundProp = - patternType->GetProperty(ToPropertyName(it->AsProperty()->Key(), TypeFlag::COMPUTED_TYPE_LITERAL_NAME)); + if (typeAnnotation) { + typeAnnotation->Check(this); + restType = typeAnnotation->AsTypeNode()->GetType(this); - foundProp->SetTsType(CreateTypeForPatternParameter(assignmentPattern->Left(), assignmentPattern->Right())); + if (!restType->IsArrayType()) { + // TODO(aszilagyi): handle tuple type for rest + ThrowTypeError("A rest parameter must be of an array type", param->Start()); + } + } + + switch (param->Argument()->Type()) { + case ir::AstNodeType::IDENTIFIER: { + const ir::Identifier *restIdent = param->Argument()->AsIdentifier(); + ASSERT(restIdent->Variable()); + restIdent->Variable()->SetTsType(restType->AsArrayType()->ElementType()); + return {nullptr, restIdent->Variable()->AsLocalVariable(), false}; + } + case ir::AstNodeType::OBJECT_PATTERN: { + ASSERT(param->Argument()->IsObjectPattern()); + auto savedContext = SavedCheckerContext(this, CheckerStatus::FORCE_TUPLE); + auto destructuringContext = + ObjectDestructuringContext(this, param->Argument(), false, false, nullptr, nullptr); + destructuringContext.SetInferedType(restType); + destructuringContext.SetSignatureInfo(signatureInfo); + destructuringContext.Start(); + return {nullptr, nullptr, false}; + } + case ir::AstNodeType::ARRAY_PATTERN: { + auto savedContext = SavedCheckerContext(this, CheckerStatus::FORCE_TUPLE); + auto destructuringContext = + ArrayDestructuringContext(this, param->Argument(), false, false, nullptr, nullptr); + destructuringContext.SetInferedType(restType); + destructuringContext.SetSignatureInfo(signatureInfo); + destructuringContext.Start(); + return {nullptr, nullptr, false}; + } + default: { + UNREACHABLE(); } } } -Type *Checker::CreateTypeForPatternParameter(const ir::Expression *patternNode, const ir::Expression *initNode) +std::tuple Checker::CheckFunctionArrayPatternParameter( + const ir::ArrayExpression *param) { - Type *paramType = CheckTypeCached(patternNode); + std::stringstream ss; + CreatePatternParameterName(param, ss); + util::UString pn(ss.str(), allocator_); + binder::LocalVariable *patternVar = + binder::Scope::CreateVar(allocator_, pn.View(), binder::VariableFlags::NONE, param); + + if (param->TypeAnnotation()) { + auto savedContext = SavedCheckerContext(this, CheckerStatus::FORCE_TUPLE); + auto destructuringContext = + ArrayDestructuringContext(this, param->AsArrayPattern(), false, false, param->TypeAnnotation(), nullptr); + destructuringContext.Start(); + patternVar->SetTsType(destructuringContext.InferedType()); + return {patternVar->AsLocalVariable(), nullptr, false}; + } + + patternVar->SetTsType(param->CheckPattern(this)); + return {patternVar->AsLocalVariable(), nullptr, false}; +} - if (patternNode->IsObjectPattern()) { - ASSERT(paramType->IsObjectType()); - CreateTypeForObjectPatternParameter(paramType->AsObjectType(), patternNode, initNode); +std::tuple Checker::CheckFunctionObjectPatternParameter( + const ir::ObjectExpression *param) +{ + std::stringstream ss; + CreatePatternParameterName(param, ss); + util::UString pn(ss.str(), allocator_); + binder::LocalVariable *patternVar = + binder::Scope::CreateVar(allocator_, pn.View(), binder::VariableFlags::NONE, param); + + if (param->TypeAnnotation()) { + auto savedContext = SavedCheckerContext(this, CheckerStatus::FORCE_TUPLE); + auto destructuringContext = + ObjectDestructuringContext(this, param->AsObjectPattern(), false, false, param->TypeAnnotation(), nullptr); + destructuringContext.Start(); + patternVar->SetTsType(destructuringContext.InferedType()); + return {patternVar->AsLocalVariable(), nullptr, false}; } - if (patternNode->IsArrayPattern() && initNode) { - ASSERT(initNode->IsArrayExpression() && paramType->IsObjectType() && paramType->AsObjectType()->IsTupleType()); + patternVar->SetTsType(param->CheckPattern(this)); + return {patternVar->AsLocalVariable(), nullptr, false}; +} - paramType = CheckTypeCached(initNode); +std::tuple Checker::CheckFunctionParameter( + const ir::Expression *param, SignatureInfo *signatureInfo) +{ + auto found = nodeCache_.find(param); - for (size_t it = 0; it < paramType->AsObjectType()->Properties().size(); it++) { - if (it < patternNode->AsArrayPattern()->Elements().size()) { - const ir::Expression *patternElement = patternNode->AsArrayPattern()->Elements()[it]; + if (found != nodeCache_.end()) { + ASSERT(found->second->Variable()); + binder::Variable *var = found->second->Variable(); + return {var->AsLocalVariable(), nullptr, var->HasFlag(binder::VariableFlags::OPTIONAL)}; + } - if (patternElement->IsArrayPattern() || patternElement->IsObjectPattern()) { - paramType->AsObjectType()->Properties()[it]->SetTsType( - CreateTypeForPatternParameter(patternElement, initNode->AsArrayExpression()->Elements()[it])); - } - } + std::tuple result; + bool cache = true; + + switch (param->Type()) { + case ir::AstNodeType::IDENTIFIER: { + result = CheckFunctionIdentifierParameter(param->AsIdentifier()); + break; + } + case ir::AstNodeType::ASSIGNMENT_PATTERN: { + result = CheckFunctionAssignmentPatternParameter(param->AsAssignmentPattern()); + break; + } + case ir::AstNodeType::REST_ELEMENT: { + result = CheckFunctionRestParameter(param->AsRestElement(), signatureInfo); + cache = false; + break; + } + case ir::AstNodeType::ARRAY_PATTERN: { + result = CheckFunctionArrayPatternParameter(param->AsArrayPattern()); + break; + } + case ir::AstNodeType::OBJECT_PATTERN: { + result = CheckFunctionObjectPatternParameter(param->AsObjectPattern()); + break; } + default: { + UNREACHABLE(); + } + } + + if (cache) { + Type *placeholder = allocator_->New(GlobalAnyType()); + placeholder->SetVariable(std::get<0>(result)); + nodeCache_.insert({param, placeholder}); } - return paramType; + return result; } -void Checker::CheckFunctionParameterDeclaration(const ArenaVector ¶ms, - SignatureInfo *signatureInfo) +void Checker::CheckFunctionParameterDeclarations(const ArenaVector ¶ms, + SignatureInfo *signatureInfo) { signatureInfo->restVar = nullptr; signatureInfo->minArgCount = 0; - for (auto *it : params) { - FunctionParameterInfo paramInfo = GetFunctionParameterInfo(it); + for (auto it = params.rbegin(); it != params.rend(); it++) { + auto [paramVar, restVar, isOptional] = CheckFunctionParameter(*it, signatureInfo); - VariableBindingContext context = VariableBindingContext::REGULAR; + if (restVar) { + signatureInfo->restVar = restVar; + continue; + } - Type *annotationType = paramInfo.typeAnnotation ? CheckTypeCached(paramInfo.typeAnnotation) : nullptr; + if (!paramVar) { + continue; + } - TypeOrNode elaborateSource; + signatureInfo->params.insert(signatureInfo->params.begin(), paramVar); - if (paramInfo.initNode && annotationType) { - elaborateSource = paramInfo.initNode; - if (!ElaborateElementwise(elaborateSource, annotationType, it->Start()) && - !IsTypeAssignableTo(paramInfo.initType, annotationType)) { - ThrowTypeError( - {"Type '", AsSrc(paramInfo.initType), "' is not assignable to type '", annotationType, "'"}, - it->Start()); - } + if (!isOptional) { + signatureInfo->minArgCount++; } + } +} - Type *patternType = paramInfo.destructuringType != DestructuringType::NO_DESTRUCTURING - ? paramInfo.bindingNode->Check(this) - : nullptr; +bool ShouldCreatePropertyValueName(const ir::Expression *propValue) +{ + return propValue->IsArrayPattern() || propValue->IsObjectPattern() || + (propValue->IsAssignmentPattern() && (propValue->AsAssignmentPattern()->Left()->IsArrayPattern() || + propValue->AsAssignmentPattern()->Left()->IsObjectPattern())); +} - if (patternType) { - if (annotationType) { - elaborateSource = patternType; - ElaborateElementwise(elaborateSource, annotationType, it->Start()); - } else if (paramInfo.initNode) { - paramInfo.initType = CreateInitializerTypeForPattern(patternType, paramInfo.initNode); - } +void Checker::CreatePatternParameterName(const ir::AstNode *node, std::stringstream &ss) +{ + switch (node->Type()) { + case ir::AstNodeType::IDENTIFIER: { + ss << node->AsIdentifier()->Name(); + break; } + case ir::AstNodeType::ARRAY_PATTERN: { + ss << "["; + + const auto &elements = node->AsArrayPattern()->Elements(); + for (auto it = elements.begin(); it != elements.end(); it++) { + CreatePatternParameterName(*it, ss); + if (std::next(it) != elements.end()) { + ss << ", "; + } + } - Type *paramType = GetParamTypeFromParamInfo(paramInfo, annotationType, patternType); + ss << "]"; + break; + } + case ir::AstNodeType::OBJECT_PATTERN: { + ss << "{ "; + + const auto &properties = node->AsObjectPattern()->Properties(); + for (auto it = properties.begin(); it != properties.end(); it++) { + CreatePatternParameterName(*it, ss); + if (std::next(it) != properties.end()) { + ss << ", "; + } + } - HandleVariableDeclarationWithContext(paramInfo.bindingNode, paramType, context, paramInfo.destructuringType, - paramInfo.typeAnnotation); + ss << " }"; + break; + } + case ir::AstNodeType::ASSIGNMENT_PATTERN: { + CreatePatternParameterName(node->AsAssignmentPattern()->Left(), ss); + break; + } + case ir::AstNodeType::PROPERTY: { + const ir::Property *prop = node->AsProperty(); + util::StringView propName; - // TODO(aszilagyi): get the variable from the function scope - binder::LocalVariable *paramVar = nullptr; + if (prop->Key()->IsIdentifier()) { + propName = prop->Key()->AsIdentifier()->Name(); + } else { + switch (prop->Key()->Type()) { + case ir::AstNodeType::NUMBER_LITERAL: { + propName = util::Helpers::ToStringView(allocator_, prop->Key()->AsNumberLiteral()->Number()); + break; + } + case ir::AstNodeType::BIGINT_LITERAL: { + propName = prop->Key()->AsBigIntLiteral()->Str(); + break; + } + case ir::AstNodeType::STRING_LITERAL: { + propName = prop->Key()->AsStringLiteral()->Str(); + break; + } + default: { + UNREACHABLE(); + break; + } + } + } - paramType = paramInfo.destructuringType != DestructuringType::NO_DESTRUCTURING - ? CreateTypeForPatternParameter(paramInfo.bindingNode, paramInfo.initNode) - : paramType; + ss << propName; - paramType->SetVariable(paramVar); - paramVar->SetTsType(paramType); + if (ShouldCreatePropertyValueName(prop->Value())) { + ss << ": "; + Checker::CreatePatternParameterName(prop->Value(), ss); + } - if (paramInfo.restType) { - signatureInfo->restVar = paramVar; - continue; + break; } - - if (!paramInfo.optionalParam) { - signatureInfo->minArgCount++; - } else { - paramVar->AddFlag(binder::VariableFlags::OPTIONAL); + case ir::AstNodeType::REST_ELEMENT: { + ss << "..."; + Checker::CreatePatternParameterName(node->AsRestElement()->Argument(), ss); + break; } + default: + break; + } +} - signatureInfo->funcParams.push_back(paramVar); +const ir::Statement *FindSubsequentFunctionNode(const ir::BlockStatement *block, const ir::ScriptFunction *node) +{ + for (auto it = block->Statements().begin(); it != block->Statements().end(); it++) { + if ((*it)->IsFunctionDeclaration() && (*it)->AsFunctionDeclaration()->Function() == node) { + return *(++it); + } } + + UNREACHABLE(); + return nullptr; } void Checker::InferFunctionDeclarationType(const binder::FunctionDecl *decl, binder::Variable *funcVar) { - ObjectDescriptor *descWithOverload = allocator_->New(); + const ir::ScriptFunction *bodyDeclaration = decl->Decls().back(); - for (const auto *it : decl->Decls()) { - const ir::ScriptFunction *func = it->Function(); + if (bodyDeclaration->IsOverload()) { + ThrowTypeError("Function implementation is missing or not immediately following the declaration.", + bodyDeclaration->Id()->Start()); + } - if (func->IsOverload() && !func->Declare()) { - ScopeContext scopeCtx(this, func->Scope()); + ObjectDescriptor *descWithOverload = allocator_->New(allocator_); - auto *signatureInfo = allocator_->New(); - CheckFunctionParameterDeclaration(func->Params(), signatureInfo); - Type *returnType = GlobalAnyType(); + for (auto it = decl->Decls().begin(); it != decl->Decls().end() - 1; it++) { + const ir::ScriptFunction *func = *it; + ASSERT(func->IsOverload() && (*it)->Parent()->Parent()->IsBlockStatement()); + const ir::Statement *subsequentNode = + FindSubsequentFunctionNode((*it)->Parent()->Parent()->AsBlockStatement(), func); + ASSERT(subsequentNode); - if (func->ReturnTypeAnnotation()) { - returnType = func->ReturnTypeAnnotation()->Check(this); - } + if (!subsequentNode->IsFunctionDeclaration()) { + ThrowTypeError("Function implementation is missing or not immediately following the declaration.", + func->Id()->Start()); + } - Signature *overloadSignature = allocator_->New(signatureInfo, returnType); + const ir::ScriptFunction *subsequentFunc = subsequentNode->AsFunctionDeclaration()->Function(); - descWithOverload->callSignatures.push_back(overloadSignature); + if (subsequentFunc->Id()->Name() != func->Id()->Name()) { + ThrowTypeError("Function implementation is missing or not immediately following the declaration.", + func->Id()->Start()); + } - continue; + if (subsequentFunc->Declare() != func->Declare()) { + ThrowTypeError("Overload signatures must all be ambient or non-ambient.", func->Id()->Start()); } - if (descWithOverload->callSignatures.empty()) { - ScopeContext scopeCtx(this, func->Scope()); + ScopeContext scopeCtx(this, func->Scope()); - auto *signatureInfo = allocator_->New(); - CheckFunctionParameterDeclaration(func->Params(), signatureInfo); + auto *overloadSignatureInfo = allocator_->New(allocator_); + CheckFunctionParameterDeclarations(func->Params(), overloadSignatureInfo); - HandleFunctionReturn(func, signatureInfo, funcVar); - return; + Type *returnType = GlobalAnyType(); + + if (func->ReturnTypeAnnotation()) { + func->ReturnTypeAnnotation()->Check(this); + returnType = func->ReturnTypeAnnotation()->AsTypeNode()->GetType(this); } - Type *funcType = allocator_->New(descWithOverload); + Signature *overloadSignature = allocator_->New(overloadSignatureInfo, returnType); + overloadSignature->SetNode(func); + descWithOverload->callSignatures.push_back(overloadSignature); + } + + ScopeContext scopeCtx(this, bodyDeclaration->Scope()); + + auto *signatureInfo = allocator_->New(allocator_); + CheckFunctionParameterDeclarations(bodyDeclaration->Params(), signatureInfo); + auto *bodyCallSignature = allocator_->New(signatureInfo, GlobalResolvingReturnType()); + + if (descWithOverload->callSignatures.empty()) { + Type *funcType = CreateFunctionTypeWithSignature(bodyCallSignature); funcType->SetVariable(funcVar); funcVar->SetTsType(funcType); + } - ScopeContext scopeCtx(this, func->Scope()); - - auto *signatureInfo = allocator_->New(); - CheckFunctionParameterDeclaration(func->Params(), signatureInfo); + bodyCallSignature->SetReturnType(HandleFunctionReturn(bodyDeclaration)); - Signature *baseCallSignature = HandleFunctionReturn(func, signatureInfo); + if (!descWithOverload->callSignatures.empty()) { + Type *funcType = allocator_->New(descWithOverload); + funcType->SetVariable(funcVar); + funcVar->SetTsType(funcType); - for (auto *iter : funcType->AsObjectType()->CallSignatures()) { - if (baseCallSignature->ReturnType()->IsVoidType() || - IsTypeAssignableTo(baseCallSignature->ReturnType(), iter->ReturnType()) || - IsTypeAssignableTo(iter->ReturnType(), baseCallSignature->ReturnType())) { - baseCallSignature->AssignmentTarget(relation_, iter); + for (auto *iter : descWithOverload->callSignatures) { + if (bodyCallSignature->ReturnType()->IsVoidType() || + IsTypeAssignableTo(bodyCallSignature->ReturnType(), iter->ReturnType()) || + IsTypeAssignableTo(iter->ReturnType(), bodyCallSignature->ReturnType())) { + bodyCallSignature->AssignmentTarget(relation_, iter); if (relation_->IsTrue()) { continue; } } + ASSERT(iter->Node() && iter->Node()->IsScriptFunction()); ThrowTypeError("This overload signature is not compatible with its implementation signature", - func->Start()); + iter->Node()->AsScriptFunction()->Id()->Start()); } - - return; } } -void Checker::CollectTypesFromReturnStatements(const ir::AstNode *parent, std::vector &returnTypes) +void Checker::CollectTypesFromReturnStatements(const ir::AstNode *parent, ArenaVector *returnTypes) { - parent->Iterate([this, &returnTypes](ir::AstNode *childNode) -> void { + parent->Iterate([this, returnTypes](ir::AstNode *childNode) -> void { if (childNode->IsScriptFunction()) { return; } @@ -294,7 +645,8 @@ void Checker::CollectTypesFromReturnStatements(const ir::AstNode *parent, std::v return; } - returnTypes.push_back(GetBaseTypeOfLiteralType(childNode->AsReturnStatement()->Argument()->Check(this))); + returnTypes->push_back( + GetBaseTypeOfLiteralType(CheckTypeCached(childNode->AsReturnStatement()->Argument()))); } CollectTypesFromReturnStatements(childNode, returnTypes); @@ -331,111 +683,109 @@ void Checker::CheckAllCodePathsInNonVoidFunctionReturnOrThrow(const ir::ScriptFu // noImplicitReturn compiler option for TypeScript we should update this function } -FunctionParameterInfo Checker::GetFunctionParameterInfo(ir::Expression *expr) +ArgRange Checker::GetArgRange(const ArenaVector &signatures, ArenaVector *potentialSignatures, + uint32_t callArgsSize, bool *haveSignatureWithRest) { - std::stringstream ss; - FunctionParameterInfo paramInfo; - paramInfo.bindingNode = expr; - - if (expr->IsArrayPattern()) { - paramInfo.typeAnnotation = expr->AsArrayPattern()->TypeAnnotation(); - paramInfo.destructuringType = DestructuringType::ARRAY_DESTRUCTURING; - CreatePatternName(expr, ss); - util::UString pn(ss.str(), allocator_); - paramInfo.paramName = pn.View(); - return paramInfo; - } - - if (expr->IsObjectPattern()) { - paramInfo.typeAnnotation = expr->AsObjectPattern()->TypeAnnotation(); - paramInfo.destructuringType = DestructuringType::OBJECT_DESTRUCTURING; - CreatePatternName(expr, ss); - util::UString pn(ss.str(), allocator_); - paramInfo.paramName = pn.View(); - return paramInfo; - } - - if (expr->IsAssignmentPattern()) { - ir::AssignmentExpression *assignmentPattern = expr->AsAssignmentPattern(); - paramInfo.initNode = assignmentPattern->Right(); - paramInfo.bindingNode = assignmentPattern->Left(); - paramInfo.optionalParam = true; - - if (paramInfo.bindingNode->IsArrayPattern()) { - paramInfo.typeAnnotation = paramInfo.bindingNode->AsArrayPattern()->TypeAnnotation(); - // TODO(aszilagyi): 1st param true - paramInfo.initType = expr->AsAssignmentPattern()->Right()->Check(this); - paramInfo.destructuringType = DestructuringType::ARRAY_DESTRUCTURING; - CreatePatternName(expr, ss); - util::UString pn(ss.str(), allocator_); - paramInfo.paramName = pn.View(); - } else { - if (paramInfo.bindingNode->IsObjectPattern()) { - paramInfo.typeAnnotation = paramInfo.bindingNode->AsObjectPattern()->TypeAnnotation(); - paramInfo.destructuringType = DestructuringType::OBJECT_DESTRUCTURING; - CreatePatternName(expr, ss); - util::UString pn(ss.str(), allocator_); - paramInfo.paramName = pn.View(); - } else { - ASSERT(paramInfo.bindingNode->IsIdentifier()); - paramInfo.typeAnnotation = paramInfo.bindingNode->AsIdentifier()->TypeAnnotation(); - paramInfo.paramName = paramInfo.bindingNode->AsIdentifier()->Name(); - } + uint32_t minArg = UINT32_MAX; + uint32_t maxArg = 0; + + for (auto *it : signatures) { + if (it->RestVar()) { + *haveSignatureWithRest = true; + } + + if (it->MinArgCount() < minArg) { + minArg = it->MinArgCount(); + } - paramInfo.initType = expr->AsAssignmentPattern()->Right()->Check(this); + if (it->Params().size() > maxArg) { + maxArg = it->Params().size(); } - return paramInfo; + if (callArgsSize >= it->MinArgCount() && (callArgsSize <= it->Params().size() || it->RestVar())) { + potentialSignatures->push_back(it); + } } - if (expr->IsRestElement()) { - ir::SpreadElement *restElement = expr->AsRestElement(); - paramInfo.restType = GlobalAnyType(); + return {minArg, maxArg}; +} - if (restElement->TypeAnnotation()) { - Type *restArrayType = restElement->TypeAnnotation()->Check(this); +bool Checker::CallMatchesSignature(const ArenaVector &args, Signature *signature, bool throwError) +{ + for (size_t index = 0; index < args.size(); index++) { + checker::Type *sigArgType = nullptr; + bool validateRestArg = false; + + if (index >= signature->Params().size()) { + ASSERT(signature->RestVar()); + validateRestArg = true; + sigArgType = signature->RestVar()->TsType(); + } else { + sigArgType = signature->Params()[index]->TsType(); + } - if (!restArrayType->IsArrayType()) { - ThrowTypeError("A rest parameter must be of an array type", expr->Start()); + if (validateRestArg || !throwError) { + checker::Type *callArgType = GetBaseTypeOfLiteralType(args[index]->Check(this)); + if (!IsTypeAssignableTo(callArgType, sigArgType)) { + if (throwError) { + ThrowTypeError({"Argument of type '", callArgType, "' is not assignable to parameter of type '", + sigArgType, "'."}, + args[index]->Start()); + } + + return false; } - paramInfo.restType = restArrayType->AsArrayType()->ElementType(); + continue; } - paramInfo.paramName = restElement->Argument()->AsIdentifier()->Name(); - paramInfo.bindingNode = restElement->Argument(); - - return paramInfo; + ElaborateElementwise(sigArgType, args[index], args[index]->Start()); } - ASSERT(expr->IsIdentifier()); - paramInfo.typeAnnotation = expr->AsIdentifier()->TypeAnnotation(); - paramInfo.optionalParam = expr->AsIdentifier()->IsOptional(); - paramInfo.paramName = expr->AsIdentifier()->Name(); - - return paramInfo; + return true; } -Type *Checker::GetParamTypeFromParamInfo(const FunctionParameterInfo ¶mInfo, Type *annotationType, - Type *patternType) +Type *Checker::resolveCallOrNewExpression(const ArenaVector &signatures, + ArenaVector arguments, const lexer::SourcePosition &errPos) { - if (paramInfo.typeAnnotation) { - return annotationType; + if (signatures.empty()) { + ThrowTypeError("This expression is not callable.", errPos); } - if (paramInfo.initType) { - return paramInfo.initType; + ArenaVector potentialSignatures(allocator_->Adapter()); + bool haveSignatureWithRest = false; + + auto argRange = GetArgRange(signatures, &potentialSignatures, arguments.size(), &haveSignatureWithRest); + + if (potentialSignatures.empty()) { + if (haveSignatureWithRest) { + ThrowTypeError({"Expected at least ", argRange.first, " arguments, but got ", arguments.size(), "."}, + errPos); + } + + if (signatures.size() == 1 && argRange.first == argRange.second) { + lexer::SourcePosition loc = + (argRange.first > arguments.size()) ? errPos : arguments[argRange.second]->Start(); + ThrowTypeError({"Expected ", argRange.first, " arguments, but got ", arguments.size(), "."}, loc); + } + + ThrowTypeError({"Expected ", argRange.first, "-", argRange.second, " arguments, but got ", arguments.size()}, + errPos); } - if (patternType) { - return patternType; + checker::Type *returnType = nullptr; + for (auto *it : potentialSignatures) { + if (CallMatchesSignature(arguments, it, potentialSignatures.size() == 1)) { + returnType = it->ReturnType(); + break; + } } - if (paramInfo.restType) { - return paramInfo.restType; + if (!returnType) { + ThrowTypeError("No overload matches this call.", errPos); } - return GlobalAnyType(); + return returnType; } } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/generics.cpp b/es2panda/typescript/core/generics.cpp deleted file mode 100644 index b3ee8bb7f3e781bedf6d124f3b79050def368c84..0000000000000000000000000000000000000000 --- a/es2panda/typescript/core/generics.cpp +++ /dev/null @@ -1,293 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -namespace panda::es2panda::checker { - -void Checker::ValidateTypeParameterInstantiation(size_t typeArgumentCount, size_t minTypeArgumentCount, - size_t numOfTypeArguments, const util::StringView &name, - const lexer::SourcePosition &locInfo) -{ - if (numOfTypeArguments < minTypeArgumentCount || numOfTypeArguments > typeArgumentCount) { - if (minTypeArgumentCount == typeArgumentCount) { - ThrowTypeError({"Generic type '", name, "' requires '", minTypeArgumentCount, "' type argument(s)."}, - locInfo); - } - - ThrowTypeError({"Generic type '", name, "' requires between '", minTypeArgumentCount, "' and '", - typeArgumentCount, "' type arguments."}, - locInfo); - } -} - -Type *Checker::InstantiateGenericTypeAlias(binder::Variable *bindingVar, const ir::TSTypeParameterDeclaration *decl, - const ir::TSTypeParameterInstantiation *typeParams, - const lexer::SourcePosition &locInfo) -{ - ValidateTypeParameterInstantiation(decl->Params().size(), decl->RequiredParams(), - typeParams ? typeParams->Params().size() : 0, bindingVar->Name(), locInfo); - - std::vector> savedDefaultTypes; - - if (typeParams) { - ScopeContext scopeCtx(this, decl->Scope()); - - for (size_t it = 0; it < typeParams->Params().size(); it++) { - binder::ScopeFindResult res = scope_->Find(decl->Params()[it]->Name()->Name()); - - ASSERT(res.variable && res.variable->TsType() && res.variable->TsType()->IsTypeParameter()); - - TypeParameter *currentTypeParameterType = res.variable->TsType()->AsTypeParameter(); - - savedDefaultTypes.emplace_back(currentTypeParameterType, currentTypeParameterType->DefaultType()); - - currentTypeParameterType->SetDefaultType(typeParams->Params()[it]->Check(this)); - } - } - - Type *newGenericType = bindingVar->TsType()->Instantiate(allocator_, relation_, globalTypes_); - - for (auto it : savedDefaultTypes) { - it.first->SetDefaultType(it.second); - } - - return newGenericType; -} - -Type *Checker::InstantiateGenericInterface(binder::Variable *bindingVar, const binder::Decl *decl, - const ir::TSTypeParameterInstantiation *typeParams, - const lexer::SourcePosition &locInfo) -{ - const std::pair, size_t> &mergedTypeParams = - bindingVar->TsType()->AsObjectType()->AsInterfaceType()->GetMergedTypeParams(); - - ValidateTypeParameterInstantiation(mergedTypeParams.first.size(), mergedTypeParams.second, - typeParams ? typeParams->Params().size() : 0, bindingVar->Name(), locInfo); - - std::vector typeParamInstantiationTypes; - - if (typeParams) { - for (auto *it : typeParams->Params()) { - typeParamInstantiationTypes.push_back(it->Check(this)); - } - } - - std::vector> savedDefaultTypes; - - for (size_t i = 0; i < typeParamInstantiationTypes.size(); i++) { - TypeParameter *mergedTypeParam = mergedTypeParams.first[i]->TsType()->AsTypeParameter(); - - savedDefaultTypes.emplace_back(mergedTypeParam, mergedTypeParam->DefaultType()); - - mergedTypeParam->SetDefaultType(typeParamInstantiationTypes[i]); - } - - const auto &declarations = decl->AsInterfaceDecl()->Decls(); - - for (const auto *it : declarations) { - const ir::TSInterfaceDeclaration *currentDecl = it->AsTSInterfaceDeclaration(); - - if (!currentDecl->TypeParams()) { - continue; - } - - const ir::TSTypeParameterDeclaration *currentTypeParams = currentDecl->TypeParams(); - - ScopeContext scopeCtx(this, currentTypeParams->Scope()); - - for (size_t i = 0; i < currentTypeParams->Params().size(); i++) { - binder::ScopeFindResult res = scope_->Find(currentTypeParams->Params()[i]->Name()->Name()); - - ASSERT(res.variable && res.variable->TsType() && res.variable->TsType()->IsTypeParameter()); - - TypeParameter *currentTypeParameterType = res.variable->TsType()->AsTypeParameter(); - - savedDefaultTypes.emplace_back(currentTypeParameterType, currentTypeParameterType->DefaultType()); - - currentTypeParameterType->SetDefaultType( - mergedTypeParams.first[i]->TsType()->AsTypeParameter()->DefaultType()); - } - } - - Type *newGenericType = bindingVar->TsType()->Instantiate(allocator_, relation_, globalTypes_); - - newGenericType->AsObjectType()->AsInterfaceType()->SetTypeParamTypes(std::move(typeParamInstantiationTypes)); - - for (auto it = savedDefaultTypes.rbegin(); it != savedDefaultTypes.rend(); it++) { - (*it).first->SetDefaultType((*it).second); - } - - return newGenericType; -} - -void Checker::CheckTypeParametersNotReferenced(const ir::AstNode *parent, - const ir::TSTypeParameterDeclaration *typeParams, size_t index) -{ - parent->Iterate([this, typeParams, index](ir::AstNode *childNode) -> void { - if (childNode->IsTSTypeReference() && childNode->AsTSTypeReference()->TypeName()->IsIdentifier()) { - const util::StringView &defaultTypeName = - childNode->AsTSTypeReference()->TypeName()->AsIdentifier()->Name(); - - for (size_t i = index; i < typeParams->Params().size(); i++) { - const ir::TSTypeParameter *currentParam = typeParams->Params()[i]; - - if (currentParam->Name()->Name() == defaultTypeName) { - ThrowTypeError("Type paremeter defaults can only reference previously declared type parameters.", - childNode->Start()); - } - } - } - - CheckTypeParametersNotReferenced(childNode, typeParams, index); - }); -} - -std::vector Checker::CheckTypeParameters(const ir::TSTypeParameterDeclaration *typeParams) -{ - ScopeContext scopeCtx(this, typeParams->Scope()); - std::vector params; - - for (size_t i = 0; i < typeParams->Params().size(); i++) { - const ir::TSTypeParameter *currentParam = typeParams->Params()[i]; - - binder::ScopeFindResult res = scope_->Find(currentParam->Name()->Name()); - ASSERT(res.variable); - - if (!res.variable->TsType()) { - Type *defaultType = nullptr; - if (currentParam->DefaultType()) { - CheckTypeParametersNotReferenced(currentParam->DefaultType(), typeParams, i + 1); - - if (!typeStack_.insert(currentParam->DefaultType()).second) { - ThrowTypeError({"Type parameter '", currentParam->Name()->Name(), "' has a circular default."}, - currentParam->DefaultType()->Start()); - } - - defaultType = currentParam->DefaultType()->Check(this); - - typeStack_.erase(currentParam->DefaultType()); - } - - // TODO(aszilagyi): handle type parameter constraints - auto *paramType = allocator_->New(nullptr, defaultType); - - res.variable->SetTsType(paramType); - } - - params.push_back(res.variable); - } - - return params; -} - -std::pair, size_t> Checker::CollectTypeParametersFromDeclarations( - const ArenaVector &declarations) -{ - std::pair, size_t> collectedTypeParams; - - for (const auto *decl : declarations) { - ASSERT(decl->IsTSInterfaceDeclaration()); - - const ir::TSInterfaceDeclaration *interfaceDecl = decl->AsTSInterfaceDeclaration(); - - if (!interfaceDecl->TypeParams()) { - continue; - } - - std::vector currentParams = CheckTypeParameters(interfaceDecl->TypeParams()); - - for (auto *currentParam : currentParams) { - bool addParam = true; - - for (auto &collectedTypeParam : collectedTypeParams.first) { - if (currentParam->Name() != collectedTypeParam->Name()) { - continue; - } - - if (currentParam->Name() == collectedTypeParam->Name()) { - if (!collectedTypeParam->TsType()->AsTypeParameter()->DefaultType() && - currentParam->TsType()->AsTypeParameter()->DefaultType()) { - collectedTypeParam = currentParam; - } - - addParam = false; - break; - } - } - - if (addParam) { - collectedTypeParams.first.push_back(currentParam); - } - } - } - - size_t minTypeArgumentCount = 0; - - for (size_t i = 0; i < collectedTypeParams.first.size(); i++) { - if (!collectedTypeParams.first[i]->TsType()->AsTypeParameter()->DefaultType()) { - minTypeArgumentCount = i + 1; - } - } - - collectedTypeParams.second = minTypeArgumentCount; - - return collectedTypeParams; -} - -bool Checker::CheckTypeParametersAreIdentical( - const std::pair, size_t> &collectedTypeParams, - std::vector ¤tTypeParams) const -{ - size_t maxTypeArgumentCount = collectedTypeParams.first.size(); - size_t minTypeArgumentCount = collectedTypeParams.second; - - size_t numTypeParameters = currentTypeParams.size(); - if (numTypeParameters < minTypeArgumentCount || numTypeParameters > maxTypeArgumentCount) { - return true; - } - - for (size_t i = 0; i < currentTypeParams.size(); i++) { - binder::Variable *sourceParam = currentTypeParams[i]; - binder::Variable *targetParam = collectedTypeParams.first[i]; - - if (sourceParam->Name() != targetParam->Name()) { - return true; - } - - Type *sourceDefaultType = sourceParam->TsType()->AsTypeParameter()->DefaultType(); - Type *targetDefaultType = targetParam->TsType()->AsTypeParameter()->DefaultType(); - - if (sourceDefaultType && targetDefaultType && !IsTypeIdenticalTo(sourceDefaultType, targetDefaultType)) { - return true; - } - } - - return false; -} - -} // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/helpers.cpp b/es2panda/typescript/core/helpers.cpp index 18d6640aa6f30463d60fda0df39fc126141f0a34..b09b499e8558d9e499a07a8979cd7b97f7b0bb15 100644 --- a/es2panda/typescript/core/helpers.cpp +++ b/es2panda/typescript/core/helpers.cpp @@ -13,40 +13,83 @@ * limitations under the License. */ +#include #include #include #include #include +#include +#include #include #include #include +#include +#include +#include +#include #include #include #include +#include namespace panda::es2panda::checker { -const ir::TSQualifiedName *Checker::ResolveLeftMostQualifiedName(const ir::TSQualifiedName *qualifiedName) +void Checker::CheckTruthinessOfType(Type *type, lexer::SourcePosition lineInfo) { - const ir::TSQualifiedName *iter = qualifiedName; + if (type->IsVoidType()) { + ThrowTypeError("An expression of type void cannot be tested for truthiness", lineInfo); + } +} + +Type *Checker::CheckNonNullType(Type *type, lexer::SourcePosition lineInfo) +{ + if (type->IsNullType()) { + ThrowTypeError("Object is possibly 'null'.", lineInfo); + } - while (iter->Left()->IsTSQualifiedName()) { - iter = iter->Left()->AsTSQualifiedName(); + if (type->IsUndefinedType()) { + ThrowTypeError("Object is possibly 'undefined'.", lineInfo); } - return iter; + return type; } -const ir::MemberExpression *Checker::ResolveLeftMostMemberExpression(const ir::MemberExpression *expr) +Type *Checker::GetBaseTypeOfLiteralType(Type *type) { - const ir::MemberExpression *iter = expr; + if (HasStatus(CheckerStatus::KEEP_LITERAL_TYPE)) { + return type; + } - while (iter->Object()->IsMemberExpression()) { - iter = iter->Object()->AsMemberExpression(); + if (type->IsStringLiteralType()) { + return GlobalStringType(); } - return iter; + if (type->IsNumberLiteralType()) { + return GlobalNumberType(); + } + + if (type->IsBooleanLiteralType()) { + return GlobalBooleanType(); + } + + if (type->IsBigintLiteralType()) { + return GlobalBigintType(); + } + + if (type->IsUnionType()) { + auto &constituentTypes = type->AsUnionType()->ConstituentTypes(); + ArenaVector newConstituentTypes(allocator_->Adapter()); + + newConstituentTypes.reserve(constituentTypes.size()); + for (auto *it : constituentTypes) { + newConstituentTypes.push_back(GetBaseTypeOfLiteralType(it)); + } + + return CreateUnionType(std::move(newConstituentTypes)); + } + + return type; } void Checker::CheckReferenceExpression(const ir::Expression *expr, const char *invalidReferenceMsg, @@ -69,57 +112,11 @@ void Checker::CheckReferenceExpression(const ir::Expression *expr, const char *i } } -void Checker::CheckTestingKnownTruthyCallableOrAwaitableType(const ir::Expression *condExpr, Type *type, - const ir::AstNode *body) +void Checker::CheckTestingKnownTruthyCallableOrAwaitableType([[maybe_unused]] const ir::Expression *condExpr, + [[maybe_unused]] Type *type, + [[maybe_unused]] const ir::AstNode *body) { - if (GetFalsyFlags(type) != TypeFlag::NONE) { - return; - } - - const ir::AstNode *location = condExpr; - if (condExpr->IsBinaryExpression()) { - location = condExpr->AsBinaryExpression()->Right(); - } else if (condExpr->IsAssignmentExpression()) { - location = condExpr->AsAssignmentExpression()->Right(); - } - - binder::Variable *testVar = nullptr; - binder::ScopeFindResult result {}; - - if (location->IsIdentifier()) { - result = scope_->Find(location->AsIdentifier()->Name(), binder::ResolveBindingOptions::ALL); - ASSERT(result.variable); - testVar = result.variable; - } else if (location->IsBinaryExpression() && location->AsBinaryExpression()->Right()->IsIdentifier()) { - result = scope_->Find(location->AsBinaryExpression()->Right()->AsIdentifier()->Name(), - binder::ResolveBindingOptions::ALL); - ASSERT(result.variable); - testVar = result.variable; - } else if (location->IsAssignmentExpression() && location->AsAssignmentExpression()->Right()->IsIdentifier()) { - result = scope_->Find(location->AsAssignmentExpression()->Right()->AsIdentifier()->Name(), - binder::ResolveBindingOptions::ALL); - ASSERT(result.variable); - testVar = result.variable; - } else if (location->IsMemberExpression() && !location->AsMemberExpression()->IsComputed()) { - testVar = ResolveNonComputedObjectProperty(location->AsMemberExpression()); - } - - if (!testVar) { - return; - } - - if (testVar->TsType() && testVar->TsType()->IsObjectType() && - !testVar->TsType()->AsObjectType()->CallSignatures().empty()) { - if (condExpr->Parent()->IsBinaryExpression() && - IsVariableUsedInBinaryExpressionChain(condExpr->Parent(), testVar) && - IsVariableUsedInConditionBody(body, testVar)) { - ThrowTypeError( - "This condition will always return true since this function appears to always be defined. " - "Did " - "you mean to call it insted?", - location->Start()); - } - } + // TODO(aszilagyi) rework this } Type *Checker::ExtractDefinitelyFalsyTypes(Type *type) @@ -145,8 +142,8 @@ Type *Checker::ExtractDefinitelyFalsyTypes(Type *type) } if (type->IsUnionType()) { - std::vector &constituentTypes = type->AsUnionType()->ConstituentTypes(); - std::vector newConstituentTypes; + auto &constituentTypes = type->AsUnionType()->ConstituentTypes(); + ArenaVector newConstituentTypes(allocator_->Adapter()); newConstituentTypes.reserve(constituentTypes.size()); for (auto &it : constituentTypes) { @@ -163,8 +160,8 @@ Type *Checker::RemoveDefinitelyFalsyTypes(Type *type) { if (static_cast(GetFalsyFlags(type)) & static_cast(TypeFlag::DEFINITELY_FALSY)) { if (type->IsUnionType()) { - std::vector &constituentTypes = type->AsUnionType()->ConstituentTypes(); - std::vector newConstituentTypes; + auto &constituentTypes = type->AsUnionType()->ConstituentTypes(); + ArenaVector newConstituentTypes(allocator_->Adapter()); for (auto &it : constituentTypes) { if (!(static_cast(GetFalsyFlags(it)) & static_cast(TypeFlag::DEFINITELY_FALSY))) { @@ -208,7 +205,7 @@ TypeFlag Checker::GetFalsyFlags(Type *type) } if (type->IsUnionType()) { - std::vector &constituentTypes = type->AsUnionType()->ConstituentTypes(); + auto &constituentTypes = type->AsUnionType()->ConstituentTypes(); TypeFlag returnFlag = TypeFlag::NONE; for (auto &it : constituentTypes) { @@ -227,9 +224,7 @@ bool Checker::IsVariableUsedInConditionBody(const ir::AstNode *parent, binder::V parent->Iterate([this, searchVar, &found](const ir::AstNode *childNode) -> void { binder::Variable *resultVar = nullptr; - if (childNode->IsMemberExpression()) { - resultVar = ResolveNonComputedObjectProperty(childNode->AsMemberExpression()); - } else if (childNode->IsIdentifier()) { + if (childNode->IsIdentifier()) { binder::ScopeFindResult result = scope_->Find(childNode->AsIdentifier()->Name()); ASSERT(result.variable); resultVar = result.variable; @@ -282,30 +277,243 @@ bool Checker::IsVariableUsedInBinaryExpressionChain(const ir::AstNode *parent, b return false; } -Type *Checker::CreateTupleTypeFromEveryArrayExpression(const ir::Expression *expr) +void Checker::ThrowBinaryLikeError(lexer::TokenType op, Type *leftType, Type *rightType, lexer::SourcePosition lineInfo) { - status_ |= CheckerStatus::FORCE_TUPLE; + if (!HasStatus(CheckerStatus::IN_CONST_CONTEXT)) { + ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", AsSrc(rightType)}, + lineInfo); + } - Type *returnType = expr->Check(this); + ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", rightType}, lineInfo); +} - status_ &= ~CheckerStatus::FORCE_TUPLE; +void Checker::ThrowAssignmentError(Type *source, Type *target, lexer::SourcePosition lineInfo, bool isAsSrcLeftType) +{ + if (isAsSrcLeftType || !target->HasTypeFlag(TypeFlag::LITERAL)) { + ThrowTypeError({"Type '", AsSrc(source), "' is not assignable to type '", target, "'."}, lineInfo); + } - return returnType; + ThrowTypeError({"Type '", source, "' is not assignable to type '", target, "'."}, lineInfo); } -void Checker::ThrowBinaryLikeError(lexer::TokenType op, Type *leftType, Type *rightType, lexer::SourcePosition lineInfo) +Type *Checker::GetUnaryResultType(Type *operandType) { - ThrowTypeError({"operator ", op, " cannot be applied to types ", leftType, " and ", rightType}, lineInfo); + if (checker::Checker::MaybeTypeOfKind(operandType, checker::TypeFlag::BIGINT_LIKE)) { + if (operandType->HasTypeFlag(checker::TypeFlag::UNION_OR_INTERSECTION) && + checker::Checker::MaybeTypeOfKind(operandType, checker::TypeFlag::NUMBER_LIKE)) { + return GlobalNumberOrBigintType(); + } + + return GlobalBigintType(); + } + + return GlobalNumberType(); +} + +void Checker::ElaborateElementwise(Type *targetType, const ir::Expression *sourceNode, const lexer::SourcePosition &pos) +{ + auto savedContext = SavedCheckerContext(this, CheckerStatus::FORCE_TUPLE | CheckerStatus::KEEP_LITERAL_TYPE); + + Type *sourceType = CheckTypeCached(sourceNode); + + if (IsTypeAssignableTo(sourceType, targetType)) { + return; + } + + if (targetType->IsArrayType() && sourceNode->IsArrayExpression()) { + ArrayElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); + } else if (targetType->IsObjectType() || targetType->IsUnionType()) { + if (sourceNode->IsObjectExpression()) { + ObjectElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); + } else if (sourceNode->IsArrayExpression()) { + ArrayElaborationContext(this, targetType, sourceType, sourceNode, pos).Start(); + } + } + + ThrowAssignmentError(sourceType, targetType, pos); +} + +void Checker::InferSimpleVariableDeclaratorType(const ir::VariableDeclarator *declarator) +{ + ASSERT(declarator->Id()->IsIdentifier()); + + binder::Variable *var = declarator->Id()->AsIdentifier()->Variable(); + ASSERT(var); + + if (declarator->Id()->AsIdentifier()->TypeAnnotation()) { + var->SetTsType(declarator->Id()->AsIdentifier()->TypeAnnotation()->AsTypeNode()->GetType(this)); + return; + } + + if (declarator->Init()) { + var->SetTsType(CheckTypeCached(declarator->Init())); + return; + } + + ThrowTypeError({"Variable ", declarator->Id()->AsIdentifier()->Name(), " implicitly has an any type."}, + declarator->Id()->Start()); +} + +Type *Checker::GetTypeOfVariable(binder::Variable *var) +{ + if (var->TsType()) { + return var->TsType(); + } + + const binder::Decl *decl = var->Declaration(); + + if (!typeStack_.insert(decl->Node()).second) { + ThrowTypeError({"'", var->Name(), + "' is referenced directly or indirectly in its " + "own initializer ot type annotation."}, + decl->Node()->Start()); + } + + switch (decl->Type()) { + case binder::DeclType::CONST: + case binder::DeclType::LET: { + if (!decl->Node()->Parent()->IsTSTypeQuery()) { + ThrowTypeError({"Block-scoped variable '", var->Name(), "' used before its declaration"}, + decl->Node()->Start()); + break; + } + + [[fallthrough]]; + } + case binder::DeclType::VAR: { + const ir::AstNode *declarator = FindAncestorGivenByType(decl->Node(), ir::AstNodeType::VARIABLE_DECLARATOR); + ASSERT(declarator); + + if (declarator->AsVariableDeclarator()->Id()->IsIdentifier()) { + InferSimpleVariableDeclaratorType(declarator->AsVariableDeclarator()); + break; + } + + declarator->Check(this); + break; + } + case binder::DeclType::PROPERTY: { + var->SetTsType(decl->Node()->AsTSPropertySignature()->TypeAnnotation()->AsTypeNode()->GetType(this)); + break; + } + case binder::DeclType::METHOD: { + auto *signatureInfo = allocator_->New(allocator_); + auto *callSignature = allocator_->New(signatureInfo, GlobalAnyType()); + var->SetTsType(CreateFunctionTypeWithSignature(callSignature)); + break; + } + case binder::DeclType::FUNC: { + checker::ScopeContext scopeCtx(this, decl->Node()->AsScriptFunction()->Scope()); + InferFunctionDeclarationType(decl->AsFunctionDecl(), var); + break; + } + case binder::DeclType::PARAM: { + const ir::AstNode *declaration = FindAncestorUntilGivenType(decl->Node(), ir::AstNodeType::SCRIPT_FUNCTION); + + if (declaration->IsIdentifier()) { + const ir::Identifier *ident = declaration->AsIdentifier(); + if (ident->TypeAnnotation()) { + ASSERT(ident->Variable() == var); + var->SetTsType(ident->TypeAnnotation()->AsTypeNode()->GetType(this)); + break; + } + + ThrowTypeError({"Parameter ", ident->Name(), " implicitly has an 'any' type."}, ident->Start()); + } + + if (declaration->IsAssignmentPattern() && declaration->AsAssignmentPattern()->Left()->IsIdentifier()) { + const ir::Identifier *ident = declaration->AsAssignmentPattern()->Left()->AsIdentifier(); + + if (ident->TypeAnnotation()) { + ASSERT(ident->Variable() == var); + var->SetTsType(ident->TypeAnnotation()->AsTypeNode()->GetType(this)); + break; + } + + var->SetTsType(declaration->AsAssignmentPattern()->Right()->Check(this)); + } + + CheckFunctionParameter(declaration->AsExpression(), nullptr); + break; + } + case binder::DeclType::ENUM: { + ASSERT(var->IsEnumVariable()); + binder::EnumVariable *enumVar = var->AsEnumVariable(); + + if (std::holds_alternative(enumVar->Value())) { + ThrowTypeError( + "A member initializer in a enum declaration cannot reference members declared after it, " + "including " + "members defined in other enums.", + decl->Node()->Start()); + } + + var->SetTsType(std::holds_alternative(enumVar->Value()) ? GlobalNumberType() : GlobalStringType()); + break; + } + case binder::DeclType::ENUM_LITERAL: { + UNREACHABLE(); // TODO(aszilagyi) + } + default: { + break; + } + } + + typeStack_.erase(decl->Node()); + return var->TsType(); } -void Checker::ThrowAssignmentError(Type *leftType, Type *rightType, lexer::SourcePosition lineInfo, - bool isAsSrcLeftType) +Type *Checker::GetTypeFromClassOrInterfaceReference([[maybe_unused]] const ir::TSTypeReference *node, + binder::Variable *var) { - if (isAsSrcLeftType) { - ThrowTypeError({"Type '", AsSrc(leftType), "' is not assignable to type '", rightType, "'."}, lineInfo); - } else { - ThrowTypeError({"Type '", leftType, "' is not assignable to type '", rightType, "'."}, lineInfo); + Type *resolvedType = var->TsType(); + + if (!resolvedType) { + ObjectDescriptor *desc = allocator_->New(allocator_); + resolvedType = allocator_->New(allocator_, var->Name(), desc); + resolvedType->SetVariable(var); + var->SetTsType(resolvedType); } + + return resolvedType; +} + +Type *Checker::GetTypeFromTypeAliasReference(const ir::TSTypeReference *node, binder::Variable *var) +{ + Type *resolvedType = var->TsType(); + + if (!resolvedType) { + if (!typeStack_.insert(var).second) { + ThrowTypeError({"Type alias ", var->Name(), " circularly refences itself"}, node->Start()); + } + + ASSERT(var->Declaration()->Node() && var->Declaration()->Node()->IsTSTypeAliasDeclaration()); + const ir::TSTypeAliasDeclaration *declaration = var->Declaration()->Node()->AsTSTypeAliasDeclaration(); + resolvedType = declaration->TypeAnnotation()->AsTypeNode()->GetType(this); + var->SetTsType(resolvedType); + + typeStack_.erase(var); + } + + return resolvedType; +} + +Type *Checker::GetTypeReferenceType(const ir::TSTypeReference *node, binder::Variable *var) +{ + ASSERT(var->Declaration()); + binder::Decl *decl = var->Declaration(); + + if (decl->IsInterfaceDecl()) { + return GetTypeFromClassOrInterfaceReference(node, var); + } + + if (decl->IsTypeAliasDecl()) { + return GetTypeFromTypeAliasReference(node, var); + } + + ThrowTypeError("This reference refers to a value, but is beign used as a type here. Did you mean to use 'typeof'?", + node->Start()); + return nullptr; } } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/object.cpp b/es2panda/typescript/core/object.cpp index 917e5b2ab6f1d10db8a7addea378f9776fdfb39f..92397dcbb19a80535713d48ef3a5dd1cd1d49389 100644 --- a/es2panda/typescript/core/object.cpp +++ b/es2panda/typescript/core/object.cpp @@ -19,13 +19,18 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include +#include +#include +#include #include #include #include @@ -35,727 +40,514 @@ namespace panda::es2panda::checker { -ObjectLiteralPropertyInfo Checker::HandleObjectLiteralProperty(const ir::Property *prop, ObjectDescriptor *desc, - std::vector *stringIndexTypes, bool readonly) +void Checker::CheckIndexConstraints(Type *type) { - ObjectLiteralPropertyInfo propInfo; - bool computed = prop->IsComputed(); - bool shorthand = prop->IsShorthand(); + if (!type->IsObjectType()) { + return; + } - const ir::Expression *propValue = prop->Value(); - // TODO(aszilagyi): params readonly, readonly - propInfo.propType = shorthand ? GlobalAnyType() : propValue->Check(this); + ObjectType *objType = type->AsObjectType(); + ResolveStructuredTypeMembers(objType); - if (prop->Kind() == ir::PropertyKind::GET) { - const ir::ScriptFunction *func = prop->Value()->AsFunctionExpression()->Function(); - CheckAllCodePathsInNonVoidFunctionReturnOrThrow(func, prop->Start(), "A 'get' accessor must return a value."); + IndexInfo *numberInfo = objType->NumberIndexInfo(); + IndexInfo *stringInfo = objType->StringIndexInfo(); + const ArenaVector &properties = objType->Properties(); - ASSERT(propInfo.propType->AsObjectType()->IsFunctionType()); - propInfo.propType = propInfo.propType->AsObjectType()->CallSignatures()[0]->ReturnType(); - } else if (prop->Kind() == ir::PropertyKind::SET) { - ASSERT(propInfo.propType->AsObjectType()->IsFunctionType()); - propInfo.propType = propInfo.propType->AsObjectType()->CallSignatures()[0]->Params()[0]->TsType(); + if (numberInfo) { + for (auto *it : properties) { + if (it->HasFlag(binder::VariableFlags::NUMERIC_NAME)) { + Type *propType = GetTypeOfVariable(it); + IsTypeAssignableTo(propType, numberInfo->GetType(), + {"Property '", it->Name(), "' of type '", propType, + "' is not assignable to numeric index type '", numberInfo->GetType(), "'."}, + it->Declaration()->Node()->Start()); + } + } } - if (!readonly) { - propInfo.propType = GetBaseTypeOfLiteralType(propInfo.propType); + if (stringInfo) { + for (auto *it : properties) { + Type *propType = GetTypeOfVariable(it); + IsTypeAssignableTo(propType, stringInfo->GetType(), + {"Property '", it->Name(), "' of type '", propType, + "' is not assignable to string index type '", stringInfo->GetType(), "'."}, + it->Declaration()->Node()->Start()); + } + + if (numberInfo && !IsTypeAssignableTo(numberInfo->GetType(), stringInfo->GetType())) { + ThrowTypeError({"Number index info type ", numberInfo->GetType(), + " is not assignable to string index info type ", stringInfo->GetType(), "."}, + numberInfo->Pos()); + } } +} - if (computed) { - propInfo.propName = HandleComputedPropertyName(prop->Key(), desc, propInfo.propType, stringIndexTypes, - &propInfo.handleNextProp, prop->Start(), readonly); +void Checker::ResolveStructuredTypeMembers(Type *type) +{ + if (type->IsObjectType()) { + ObjectType *objType = type->AsObjectType(); - if (propInfo.handleNextProp) { - return propInfo; + if (objType->IsObjectLiteralType()) { + ResolveObjectTypeMembers(objType); + return; } - } else { - propInfo.propName = ToPropertyName(prop->Key(), TypeFlag::COMPUTED_TYPE_LITERAL_NAME); - } - if (shorthand) { - binder::ScopeFindResult result = scope_->Find(propInfo.propName); - if (!result.variable) { - ThrowTypeError({"No value exists in scope for the shorthand property '", propInfo.propName, - "'. Either declare one ", "or provide an initializer."}, - prop->Start()); - } else { - // TODO(aszilagyi): param readonly - propInfo.propType = prop->Key()->Check(this); + if (objType->IsInterfaceType()) { + ResolveInterfaceOrClassTypeMembers(objType->AsInterfaceType()); + return; } } - return propInfo; + if (type->IsUnionType()) { + ResolveUnionTypeMembers(type->AsUnionType()); + return; + } } -void Checker::HandleSpreadElement(const ir::SpreadElement *spreadElem, ObjectDescriptor *desc, - lexer::SourcePosition locInfo, bool readonly) +void Checker::ResolveUnionTypeMembers(UnionType *type) { - // TODO(aszilagyi): handle other types of spread elements, for example ...[a,b,c], or ...{a,b,c} - if (!spreadElem->Argument()->IsIdentifier()) { + if (type->MergedObjectType()) { return; } - Type *spreadType = nullptr; - binder::ScopeFindResult result = scope_->Find(spreadElem->Argument()->AsIdentifier()->Name()); - if (!result.variable) { - ThrowTypeError("Cannot find name ", locInfo); - } + ObjectDescriptor *desc = allocator_->New(allocator_); + ArenaVector stringInfoTypes(allocator_->Adapter()); + ArenaVector numberInfoTypes(allocator_->Adapter()); + ArenaVector callSignatures(allocator_->Adapter()); + ArenaVector constructSignatures(allocator_->Adapter()); - spreadType = spreadElem->Argument()->Check(this); - if (!spreadType->IsObjectType()) { - ThrowTypeError("Spread types may only be created from object types", locInfo); - } + for (auto *it : type->AsUnionType()->ConstituentTypes()) { + if (!it->IsObjectType()) { + continue; + } - ObjectType *spreadObj = spreadType->AsObjectType(); - for (auto *it : spreadObj->Properties()) { - binder::LocalVariable *res = desc->FindProperty(it->Name()); - if (res) { - if (readonly) { - res->AddFlag(binder::VariableFlags::READONLY); - } - res->SetTsType(it->TsType()); - } else { - auto *var = binder::Scope::CreateVar(allocator_, it->Name(), it->Flags(), nullptr); + ObjectType *objType = it->AsObjectType(); + ResolveObjectTypeMembers(objType); - if (readonly) { - var->AddFlag(binder::VariableFlags::READONLY); + if (!objType->CallSignatures().empty()) { + for (auto *signature : objType->CallSignatures()) { + callSignatures.push_back(signature); } - desc->properties.push_back(var); } - } - if (spreadObj->IsInterfaceType()) { - InterfaceType *spreadInterface = spreadObj->AsInterfaceType(); - for (auto *base : spreadInterface->Bases()) { - for (auto *prop : base->Properties()) { - binder::LocalVariable *res = desc->FindProperty(prop->Name()); - if (res) { - res->SetTsType(prop->TsType()); - } else { - auto *var = binder::Scope::CreateVar(allocator_, prop->Name(), prop->Flags(), nullptr); - desc->properties.push_back(var); - } + if (!objType->ConstructSignatures().empty()) { + for (auto *signature : objType->ConstructSignatures()) { + constructSignatures.push_back(signature); } } - } -} -Type *Checker::CollectStringIndexInfoTypes(const ObjectDescriptor *desc, const std::vector &stringIndexTypes) -{ - if (stringIndexTypes.empty()) { - return nullptr; - } - - std::vector collectedTypes; - - for (const auto *it : desc->properties) { - if (it->TsType()->IsUnionType()) { - const auto &constituentTypes = it->TsType()->AsUnionType()->ConstituentTypes(); - for (auto *type : constituentTypes) { - collectedTypes.push_back(type); - } - } else { - collectedTypes.push_back(it->TsType()); + if (objType->StringIndexInfo()) { + stringInfoTypes.push_back(objType->StringIndexInfo()->GetType()); } - } - for (const auto &it : stringIndexTypes) { - if (it->IsUnionType()) { - std::vector &constituentTypes = it->AsUnionType()->ConstituentTypes(); - for (auto *type : constituentTypes) { - collectedTypes.push_back(type); - } - } else { - collectedTypes.push_back(it); + if (objType->NumberIndexInfo()) { + numberInfoTypes.push_back(objType->NumberIndexInfo()->GetType()); } } - if (desc->numberIndexInfo) { - if (desc->numberIndexInfo->InfoType()->IsUnionType()) { - std::vector &constituentTypes = - desc->numberIndexInfo->InfoType()->AsUnionType()->ConstituentTypes(); - for (auto *type : constituentTypes) { - collectedTypes.push_back(type); - } - } else { - collectedTypes.push_back(desc->numberIndexInfo->InfoType()); - } - } + desc->callSignatures = callSignatures; + desc->constructSignatures = constructSignatures; - if (collectedTypes.empty()) { - return nullptr; + if (!stringInfoTypes.empty()) { + desc->stringIndexInfo = allocator_->New(CreateUnionType(std::move(stringInfoTypes)), "x", false); } - if (collectedTypes.size() == 1) { - return collectedTypes[0]; + if (!numberInfoTypes.empty()) { + desc->numberIndexInfo = allocator_->New(CreateUnionType(std::move(numberInfoTypes)), "x", false); } - return CreateUnionType(std::move(collectedTypes)); + ObjectType *mergedType = allocator_->New(desc); + mergedType->AddObjectFlag(ObjectFlags::RESOLVED_MEMBERS); + type->SetMergedObjectType(mergedType); } -binder::Variable *Checker::ResolveNonComputedObjectProperty(const ir::MemberExpression *expr) +void Checker::ResolveInterfaceOrClassTypeMembers(InterfaceType *type) { - const ir::MemberExpression *memberLocation = ResolveLeftMostMemberExpression(expr); - Type *baseType = nullptr; + if (type->HasObjectFlag(ObjectFlags::RESOLVED_MEMBERS)) { + return; + } - while (true) { - baseType = memberLocation->Object()->Check(this); - baseType = ResolveBaseProp(baseType, memberLocation->Property(), false, memberLocation->Start()); + ResolveDeclaredMembers(type); + GetBaseTypes(type); - if (!memberLocation->Parent()->IsMemberExpression() || - memberLocation->Parent()->AsMemberExpression()->IsComputed()) { - break; - } + type->AddObjectFlag(ObjectFlags::RESOLVED_MEMBERS); +} + +void Checker::ResolveObjectTypeMembers(ObjectType *type) +{ + if (!type->IsObjectLiteralType() || type->HasObjectFlag(ObjectFlags::RESOLVED_MEMBERS)) { + return; + } + + ASSERT(type->Variable() && type->Variable()->Declaration()->Node()->IsTSTypeLiteral()); + const ir::TSTypeLiteral *typeLiteral = type->Variable()->Declaration()->Node()->AsTSTypeLiteral(); + ArenaVector signatureDeclarations(allocator_->Adapter()); + ArenaVector indexDeclarations(allocator_->Adapter()); - memberLocation = memberLocation->Parent()->AsMemberExpression(); + for (auto *it : typeLiteral->Members()) { + ResolvePropertiesOfObjectType(type, it, signatureDeclarations, indexDeclarations, false); } - return baseType->Variable(); + type->AddObjectFlag(ObjectFlags::RESOLVED_MEMBERS); + + ResolveSignaturesOfObjectType(type, signatureDeclarations); + ResolveIndexInfosOfObjectType(type, indexDeclarations); } -binder::Variable *Checker::ResolveObjectProperty(const ir::MemberExpression *expr) +void Checker::ResolvePropertiesOfObjectType(ObjectType *type, const ir::Expression *member, + ArenaVector &signatureDeclarations, + ArenaVector &indexDeclarations, + bool isInterface) { - const ir::MemberExpression *memberLocation = ResolveLeftMostMemberExpression(expr); - Type *baseType = nullptr; + if (member->IsTSPropertySignature()) { + binder::Variable *prop = member->AsTSPropertySignature()->Variable(); + + if (!isInterface || + ValidateInterfaceMemberRedeclaration(type, prop, member->AsTSPropertySignature()->Key()->Start())) { + type->AddProperty(prop->AsLocalVariable()); + } + + return; + } - while (true) { - baseType = memberLocation->Object()->Check(this); - baseType = ResolveBaseProp(baseType, memberLocation->Property(), memberLocation->IsComputed(), - memberLocation->Start()); + if (member->IsTSMethodSignature()) { + binder::Variable *method = member->AsTSMethodSignature()->Variable(); - if (!memberLocation->Parent()->IsMemberExpression()) { - break; + if (!isInterface || + ValidateInterfaceMemberRedeclaration(type, method, member->AsTSMethodSignature()->Key()->Start())) { + type->AddProperty(method->AsLocalVariable()); } - memberLocation = memberLocation->Parent()->AsMemberExpression(); + return; + } + + if (member->IsTSSignatureDeclaration()) { + signatureDeclarations.push_back(member->AsTSSignatureDeclaration()); + return; } - return baseType->Variable(); + ASSERT(member->IsTSIndexSignature()); + indexDeclarations.push_back(member->AsTSIndexSignature()); } -util::StringView Checker::ToPropertyName(const ir::Expression *expr, TypeFlag propNameFlags, bool computed, - bool *hasName, Type **exprType) +void Checker::ResolveSignaturesOfObjectType(ObjectType *type, + ArenaVector &signatureDeclarations) { - if (computed) { - Type *propType = expr->Check(this); - if (!propType->HasTypeFlag(propNameFlags)) { - ThrowTypeError( - "A computed property name in a type literal must refer to an expression whose type is a literal " - "type " - "or a 'unique symbol' type", - expr->Start()); - } - - if (exprType) { - *exprType = propType; - } + for (auto *it : signatureDeclarations) { + Type *placeholderObj = it->Check(this); - if (propType->IsStringLiteralType()) { - return propType->AsStringLiteralType()->Value(); + if (it->AsTSSignatureDeclaration()->Kind() == + ir::TSSignatureDeclaration::TSSignatureDeclarationKind::CALL_SIGNATURE) { + type->AddCallSignature(placeholderObj->AsObjectType()->CallSignatures()[0]); + continue; } - if (propType->IsNumberLiteralType()) { - return util::Helpers::ToStringView(allocator_, propType->AsNumberLiteralType()->Value()); - } + type->AddConstructSignature(placeholderObj->AsObjectType()->ConstructSignatures()[0]); + } +} +void Checker::ResolveIndexInfosOfObjectType(ObjectType *type, + ArenaVector &indexDeclarations) +{ + for (auto *it : indexDeclarations) { + Type *placeholderObj = it->Check(this); - if (propType->TypeFlags() == TypeFlag::ENUM) { - EnumType *enumType = propType->AsEnumType(); + if (it->AsTSIndexSignature()->Kind() == ir::TSIndexSignature::TSIndexSignatureKind::NUMBER) { + IndexInfo *numberInfo = placeholderObj->AsObjectType()->NumberIndexInfo(); - if (std::holds_alternative(enumType->EnumVar()->Value())) { - return util::Helpers::ToStringView(allocator_, std::get(enumType->EnumVar()->Value())); + if (type->NumberIndexInfo()) { + ThrowTypeError("Duplicated index signature for type 'number'", it->Start()); } - if (std::holds_alternative(enumType->EnumVar()->Value())) { - return std::get(enumType->EnumVar()->Value()); - } + type->Desc()->numberIndexInfo = numberInfo; + continue; } - if (hasName) { - *hasName = false; + IndexInfo *stringInfo = placeholderObj->AsObjectType()->StringIndexInfo(); + + if (type->StringIndexInfo()) { + ThrowTypeError("Duplicated index signature for type 'string'", it->Start()); } - return util::StringView(); + type->Desc()->stringIndexInfo = stringInfo; } +} - if (exprType) { - *exprType = GlobalStringType(); +binder::Variable *Checker::GetPropertyOfType(Type *type, const util::StringView &name, bool getPartial, + binder::VariableFlags propagateFlags) +{ + if (type->IsObjectType()) { + ResolveObjectTypeMembers(type->AsObjectType()); + return type->AsObjectType()->GetProperty(name, true); } - if (expr->IsIdentifier()) { - const ir::Identifier *identNode = expr->AsIdentifier(); - return identNode->Name(); + if (type->IsUnionType()) { + return GetPropertyOfUnionType(type->AsUnionType(), name, getPartial, propagateFlags); } - switch (expr->Type()) { - case ir::AstNodeType::NUMBER_LITERAL: { - return util::Helpers::ToStringView(allocator_, expr->AsNumberLiteral()->Number()); - } - case ir::AstNodeType::STRING_LITERAL: { - return expr->AsStringLiteral()->Str(); - } - case ir::AstNodeType::BIGINT_LITERAL: { - return expr->AsBigIntLiteral()->Str(); - } - default: { - break; - } - } - - UNREACHABLE(); - - return util::StringView(); + return nullptr; } -void Checker::PrefetchTypeLiteralProperties(const ir::Expression *current, checker::ObjectDescriptor *desc) +binder::Variable *Checker::GetPropertyOfUnionType(UnionType *type, const util::StringView &name, bool getPartial, + binder::VariableFlags propagateFlags) { - ASSERT(current->IsTSPropertySignature() || current->IsTSMethodSignature()); - util::StringView propName; - bool isComputed = false; - bool isComputedIdent = false; - bool isOptional = false; - bool isPropSignature = false; - bool isReadonly = false; - Type *propNameType = nullptr; - const ir::Expression *key = nullptr; + auto found = type->CachedSyntheticPropertis().find(name); - if (current->IsTSPropertySignature()) { - const ir::TSPropertySignature *propSignature = current->AsTSPropertySignature(); - isOptional = propSignature->Optional(); - key = propSignature->Key(); - isComputed = propSignature->Computed(); - isReadonly = propSignature->Readonly(); - isPropSignature = true; - } else { - const ir::TSMethodSignature *methodSignature = current->AsTSMethodSignature(); - isOptional = methodSignature->Optional(); - key = methodSignature->Key(); - isComputed = methodSignature->Computed(); + if (found != type->CachedSyntheticPropertis().end()) { + return found->second; } - if (isComputed) { - isComputedIdent = key->IsIdentifier(); - } + binder::VariableFlags flags = binder::VariableFlags::PROPERTY; + ArenaVector collectedTypes(allocator_->Adapter()); - propName = ToPropertyName(key, TypeFlag::COMPUTED_TYPE_LITERAL_NAME, isComputed, nullptr, &propNameType); + for (auto *it : type->ConstituentTypes()) { + binder::Variable *prop = GetPropertyOfType(it, name); - auto *prop = binder::Scope::CreateVar(allocator_, propName, binder::VariableFlags::NONE, current); + if (!prop) { + if (it->IsArrayType()) { + collectedTypes.push_back(it->AsArrayType()->ElementType()); + continue; + } - if (isOptional) { - prop->AddFlag(binder::VariableFlags::OPTIONAL); - } + if (!it->IsObjectType()) { + if (getPartial) { + continue; + } - if (isReadonly) { - prop->AddFlag(binder::VariableFlags::READONLY); - } + return nullptr; + } - if (propNameType->HasTypeFlag(TypeFlag::NUMBER_LIKE_ENUM)) { - prop->AddFlag(binder::VariableFlags::COMPUTED_INDEX); - } + ObjectType *objType = it->AsObjectType(); - if (key->IsLiteral() && key->AsLiteral()->IsNumberLiteral()) { - prop->AddFlag(binder::VariableFlags::INDEX_NAME); - } + if (!objType->StringIndexInfo()) { + if (getPartial) { + continue; + } - if (isComputed) { - prop->AddFlag(binder::VariableFlags::COMPUTED); - } + return nullptr; + } - if (isComputedIdent) { - prop->AddFlag(binder::VariableFlags::COMPUTED_IDENT); - } + collectedTypes.push_back(objType->StringIndexInfo()->GetType()); + continue; + } - if (isPropSignature) { - prop->AddFlag(binder::VariableFlags::PROPERTY); - } else { - prop->AddFlag(binder::VariableFlags::METHOD); - } + prop->AddFlag(propagateFlags); - desc->properties.push_back(prop); -} + if (prop->HasFlag(binder::VariableFlags::OPTIONAL)) { + flags |= binder::VariableFlags::OPTIONAL; + } -void Checker::CheckTsTypeLiteralOrInterfaceMember(const ir::Expression *current, ObjectDescriptor *desc) -{ - if (current->IsTSPropertySignature() || (current->IsTSMethodSignature())) { - CheckTsPropertyOrMethodSignature(current, desc); - return; + collectedTypes.push_back(GetTypeOfVariable(prop)); } - if (current->IsTSSignatureDeclaration()) { - CheckTsSignatureDeclaration(current->AsTSSignatureDeclaration(), desc); - } else if (current->IsTSIndexSignature()) { - CheckTsIndexSignature(current->AsTSIndexSignature(), desc); + if (collectedTypes.empty()) { + return nullptr; } -} -Type *Checker::CheckIndexInfoProperty(IndexInfo *info, Type *objType, lexer::SourcePosition loc) -{ - if (info->Readonly() && !objType->AsObjectType()->IsTupleType()) { - ThrowTypeError({"Index signature in type '", objType, "' only permits reading."}, loc); - } - return info->InfoType(); + binder::Variable *syntheticProp = binder::Scope::CreateVar(allocator_, name, flags, nullptr); + syntheticProp->SetTsType(CreateUnionType(std::move(collectedTypes))); + type->CachedSyntheticPropertis().insert({name, syntheticProp}); + return syntheticProp; } -Type *Checker::ResolveBasePropForObject(ObjectType *objType, util::StringView &name, Type *propNameType, - bool isComputed, bool inAssignment, lexer::SourcePosition propLoc, - lexer::SourcePosition exprLoc) +Type *Checker::CheckComputedPropertyName(const ir::Expression *key) { - binder::LocalVariable *prop = objType->GetProperty(name); - - if (prop) { - if (prop && prop->HasFlag(binder::VariableFlags::READONLY) && inAssignment) { - ThrowTypeError({"Cannot assign to '", prop->Name(), "' because it is a read-only property."}, propLoc); - } - - if (prop->TsType()) { - return prop->TsType(); - } + auto found = nodeCache_.find(key); - const ir::AstNode *declNode = prop->Declaration()->Node(); - Type *resolvedType = nullptr; - - if (prop->HasFlag(binder::VariableFlags::PROPERTY)) { - ASSERT(declNode->IsTSPropertySignature()); - resolvedType = CheckTsPropertySignature(declNode->AsTSPropertySignature(), prop); - } + if (found != nodeCache_.end()) { + return found->second; + } - if (prop->HasFlag(binder::VariableFlags::METHOD)) { - ASSERT(declNode->IsTSMethodSignature()); - resolvedType = CheckTsMethodSignature(declNode->AsTSMethodSignature()); - } + Type *keyType = key->Check(this); - prop->SetTsType(resolvedType); - return resolvedType; + if (!keyType->HasTypeFlag(TypeFlag::STRING_LIKE | TypeFlag::NUMBER_LIKE)) { + ThrowTypeError( + "A computed property name in a type literal must refer to an expression whose type is a literal " + "type " + "or a 'unique symbol' type", + key->Start()); } - if (objType->IsTupleType()) { - ThrowTypeError({"Tuple type '", objType, "' of length '", objType->AsTupleType()->FixedLength(), - "' has no element at index '", name, "'."}, - propLoc); - } + nodeCache_.insert({key, keyType}); + return keyType; +} - IndexInfo *numberInfo = objType->NumberIndexInfo(); +IndexInfo *Checker::GetApplicableIndexInfo(Type *type, Type *indexType) +{ + ResolveStructuredTypeMembers(type); + bool getNumberInfo = indexType->HasTypeFlag(TypeFlag::NUMBER_LIKE); - if (!numberInfo && objType->IsInterfaceType()) { - numberInfo = objType->AsInterfaceType()->FindIndexInfo(true); - } + if (type->IsObjectType()) { + if (getNumberInfo) { + return type->AsObjectType()->NumberIndexInfo(); + } - if (numberInfo && propNameType && propNameType->HasTypeFlag(TypeFlag::NUMBER_LIKE)) { - return CheckIndexInfoProperty(numberInfo, objType, exprLoc); + return type->AsObjectType()->StringIndexInfo(); } - IndexInfo *stringInfo = objType->StringIndexInfo(); - - if (!stringInfo && objType->IsInterfaceType()) { - stringInfo = objType->AsInterfaceType()->FindIndexInfo(false); - } + if (type->IsUnionType()) { + ASSERT(type->AsUnionType()->MergedObjectType()); - if (stringInfo) { - return CheckIndexInfoProperty(stringInfo, objType, exprLoc); - } + if (getNumberInfo) { + return type->AsUnionType()->MergedObjectType()->NumberIndexInfo(); + } - if (isComputed) { - return GlobalAnyType(); + return type->AsUnionType()->MergedObjectType()->StringIndexInfo(); } - ThrowTypeError({"Property '", name, "' does not exist on type '", objType, "'."}, propLoc); - return nullptr; } -Type *Checker::ResolveBaseProp(Type *baseType, const ir::Expression *prop, bool isComputed, - lexer::SourcePosition exprLoc) +Type *Checker::GetPropertyTypeForIndexType(Type *type, Type *indexType) { - Type *propNameType = nullptr; - bool hasName = true; - util::StringView name = ToPropertyName(prop, TypeFlag::COMPUTED_NAME, isComputed, &hasName, &propNameType); + if (type->IsArrayType()) { + return type->AsArrayType()->ElementType(); + } - if (baseType->IsEnumLiteralType()) { - EnumLiteralType *enumType = baseType->AsEnumLiteralType(); + if (indexType->HasTypeFlag(TypeFlag::STRING_LITERAL | TypeFlag::NUMBER_LITERAL)) { + binder::Variable *prop = nullptr; - if (!hasName) { - if (propNameType->HasTypeFlag(TypeFlag::NUMBER_LIKE)) { - return GlobalStringType(); - } - - return GlobalAnyType(); + if (indexType->IsStringLiteralType()) { + prop = GetPropertyOfType(type, indexType->AsStringLiteralType()->Value()); + } else { + util::StringView propName = + util::Helpers::ToStringView(allocator_, indexType->AsNumberLiteralType()->Value()); + prop = GetPropertyOfType(type, propName); } - binder::Variable *enumVar = enumType->Scope()->FindLocal(name); + if (prop) { + Type *propType = GetTypeOfVariable(prop); - if (enumVar) { - if (enumVar->AsEnumVariable()->BackReference()) { - ThrowTypeError( - "Element implicitly has an 'any' type because index expression is not of type " - "'number'.", - prop->Start()); + if (prop->HasFlag(binder::VariableFlags::READONLY)) { + propType->AddTypeFlag(TypeFlag::READONLY); } - return allocator_->New(baseType->Variable(), enumVar->AsEnumVariable()); + return propType; } } - if (baseType->IsObjectType()) { - return ResolveBasePropForObject(baseType->AsObjectType(), name, propNameType, isComputed, - (!prop->Parent()->Parent()->IsMemberExpression() || - (baseType->IsObjectType() && baseType->AsObjectType()->IsTupleType())) && - InAssignment(prop), - prop->Start(), exprLoc); - } + if (indexType->HasTypeFlag(TypeFlag::STRING_LIKE | TypeFlag::NUMBER_LIKE)) { + IndexInfo *indexInfo = GetApplicableIndexInfo(type, indexType); - if (baseType->IsArrayType()) { - return baseType->AsArrayType()->ElementType(); - } + if (indexInfo) { + Type *indexInfoType = indexInfo->GetType(); - if (baseType->IsUnionType()) { - std::vector types; + if (indexInfo->Readonly()) { + indexInfoType->AddTypeFlag(TypeFlag::READONLY); + } - for (auto *it : baseType->AsUnionType()->ConstituentTypes()) { - types.push_back(ResolveBaseProp(it, prop, isComputed, exprLoc)); + return indexInfoType; } - - return CreateUnionType(std::move(types)); } - ThrowTypeError({"Property '", name, "' does not exist on type '", baseType, "'."}, prop->Start()); - return nullptr; } -Type *Checker::CheckTsPropertySignature(const ir::TSPropertySignature *propSignature, binder::LocalVariable *savedProp) +ArenaVector Checker::GetBaseTypes(InterfaceType *type) { - if (!propSignature->TypeAnnotation()) { - return GlobalAnyType(); + if (type->HasObjectFlag(ObjectFlags::RESOLVED_BASE_TYPES)) { + return type->Bases(); } - // TODO(aszilagyi) : saved_prop - (void)savedProp; - return propSignature->TypeAnnotation()->Check(this); -} - -Type *Checker::CheckTsMethodSignature(const ir::TSMethodSignature *methodSignature) -{ - Type *returnType = GlobalAnyType(); + ASSERT(type->Variable() && type->Variable()->Declaration()->IsInterfaceDecl()); + binder::InterfaceDecl *decl = type->Variable()->Declaration()->AsInterfaceDecl(); - if (methodSignature->ReturnTypeAnnotation()) { - returnType = methodSignature->ReturnTypeAnnotation()->Check(this); + if (!typeStack_.insert(type).second) { + ThrowTypeError({"Type ", type->Name(), " recursively references itself as a base type."}, + decl->Node()->AsTSInterfaceDeclaration()->Id()->Start()); } - ScopeContext scopeCtx(this, methodSignature->Scope()); + for (const auto *declaration : decl->Decls()) { + if (declaration->Extends().empty()) { + continue; + } - auto *signatureInfo = allocator_->New(); - CheckFunctionParameterDeclaration(methodSignature->Params(), signatureInfo); + for (const auto *extends : declaration->Extends()) { + Type *baseType = extends->Expr()->AsTypeNode()->GetType(this); - auto *callSiganture = allocator_->New(signatureInfo, returnType); - Type *propType = CreateFunctionTypeWithSignature(callSiganture); + if (!baseType->HasTypeFlag(TypeFlag::OBJECT | TypeFlag::NON_PRIMITIVE | TypeFlag::ANY)) { + ThrowTypeError( + "An interface can only extend an object type or intersection of object types with statically " + "known " + "members", + extends->Start()); + } - return propType; -} + if (!baseType->IsObjectType()) { + continue; + } -void Checker::CheckTsIndexSignature(const ir::TSIndexSignature *indexSignature, ObjectDescriptor *desc) -{ - const util::StringView ¶mName = indexSignature->Param()->AsIdentifier()->Name(); - Type *indexType = indexSignature->TypeAnnotation()->Check(this); + ObjectType *baseObj = baseType->AsObjectType(); - if (indexSignature->Kind() == ir::TSIndexSignature::TSIndexSignatureKind::NUMBER) { - if (desc->numberIndexInfo) { - ThrowTypeError("Duplicate number index signature", indexSignature->Start()); - } - - desc->numberIndexInfo = allocator_->New(indexType, paramName, indexSignature->Readonly()); + if (baseType == type) { + ThrowTypeError({"Type ", type->Name(), " recursively references itself as a base type."}, + decl->Node()->AsTSInterfaceDeclaration()->Id()->Start()); + } - if (desc->stringIndexInfo) { - IsTypeAssignableTo(indexType, desc->stringIndexInfo->InfoType(), - {"Numeric index type '", indexType, "' is not assignable to string index type '", - desc->stringIndexInfo->InfoType(), "'"}, - indexSignature->Start()); - } - } else { - ASSERT(indexSignature->Kind() == ir::TSIndexSignature::TSIndexSignatureKind::STRING); - if (desc->stringIndexInfo) { - ThrowTypeError("Duplicate string index signature", indexSignature->Start()); - } + type->AddBase(baseObj); - desc->stringIndexInfo = allocator_->New(indexType, paramName, indexSignature->Readonly()); + if (!baseObj->IsInterfaceType()) { + continue; + } - if (desc->numberIndexInfo) { - IsTypeAssignableTo(desc->numberIndexInfo->InfoType(), indexType, - {"Numeric index type '", desc->numberIndexInfo->InfoType(), - "' is not assignable to string index type '", indexType, "'"}, - indexSignature->Start()); + ArenaVector extendsBases = GetBaseTypes(baseObj->AsInterfaceType()); + for (auto *extendBase : extendsBases) { + if (extendBase == type) { + ThrowTypeError({"Type ", type->Name(), " recursively references itself as a base type."}, + decl->Node()->AsTSInterfaceDeclaration()->Id()->Start()); + } + } } } -} - -void Checker::CheckTsSignatureDeclaration(const ir::TSSignatureDeclaration *signatureNode, ObjectDescriptor *desc) -{ - ScopeContext scopeCtx(this, signatureNode->Scope()); - - auto *signatureInfo = allocator_->New(); - CheckFunctionParameterDeclaration(signatureNode->Params(), signatureInfo); - - Type *returnType = GlobalAnyType(); - if (signatureNode->ReturnTypeAnnotation()) { - returnType = signatureNode->ReturnTypeAnnotation()->Check(this); - } - auto *signature = allocator_->New(signatureInfo, returnType); - - if (signatureNode->Kind() == ir::TSSignatureDeclaration::TSSignatureDeclarationKind::CALL_SIGNATURE) { - desc->callSignatures.push_back(signature); - } else { - desc->constructSignatures.push_back(signature); - } + type->AddObjectFlag(ObjectFlags::RESOLVED_BASE_TYPES); + typeStack_.erase(type); + return type->Bases(); } -void Checker::CheckTsPropertyOrMethodSignature(const ir::Expression *current, ObjectDescriptor *desc) +void Checker::ResolveDeclaredMembers(InterfaceType *type) { - bool isComputed = false; - bool isPropSignature = false; - Type *propNameType = nullptr; - const ir::Expression *key = nullptr; - - if (current->IsTSPropertySignature()) { - const auto *propSignature = current->AsTSPropertySignature(); - key = propSignature->Key(); - isComputed = propSignature->Computed(); - isPropSignature = true; - } else { - const auto *methodSignature = current->AsTSMethodSignature(); - key = methodSignature->Key(); - isComputed = methodSignature->Computed(); - } - - util::StringView propName = - ToPropertyName(key, TypeFlag::COMPUTED_TYPE_LITERAL_NAME, isComputed, nullptr, &propNameType); - binder::LocalVariable *prop = desc->FindProperty(propName); - ASSERT(prop); - - if (prop->TsType()) { + if (type->HasObjectFlag(ObjectFlags::RESOLVED_DECLARED_MEMBERS)) { return; } - Type *propType = nullptr; - if (isPropSignature) { - propType = CheckTsPropertySignature(current->AsTSPropertySignature(), prop); - } else { - propType = CheckTsMethodSignature(current->AsTSMethodSignature()); - } + ASSERT(type->Variable() && type->Variable()->Declaration()->IsInterfaceDecl()); + binder::InterfaceDecl *decl = type->Variable()->Declaration()->AsInterfaceDecl(); - propType->SetVariable(prop); - prop->SetTsType(propType); -} + ArenaVector signatureDeclarations(allocator_->Adapter()); + ArenaVector indexDeclarations(allocator_->Adapter()); -void Checker::HandleNumberIndexInfo(ObjectDescriptor *desc, Type *indexType, bool readonly) -{ - if (desc->numberIndexInfo) { - if (desc->numberIndexInfo->InfoType()->IsUnionType()) { - desc->numberIndexInfo->InfoType()->AsUnionType()->AddConstituentType(indexType, relation_); - } else { - Type *numIndexType = CreateUnionType({desc->numberIndexInfo->InfoType(), indexType}); - desc->numberIndexInfo->SetInfoType(numIndexType); + for (const auto *declaration : decl->Decls()) { + for (const auto *member : declaration->Body()->Body()) { + ResolvePropertiesOfObjectType(type, member, signatureDeclarations, indexDeclarations, true); } - } else { - auto *numIndexInfo = allocator_->New(indexType, "x", readonly); - desc->numberIndexInfo = numIndexInfo; - } -} - -util::StringView Checker::HandleComputedPropertyName(const ir::Expression *propKey, ObjectDescriptor *desc, - Type *propType, std::vector *stringIndexTypes, - bool *handleNextProp, lexer::SourcePosition locInfo, bool readonly) -{ - util::StringView propName; - if (propKey->IsIdentifier()) { - const ir::Identifier *identKey = propKey->AsIdentifier(); - binder::ScopeFindResult result = scope_->Find(identKey->Name()); - if (!result.variable) { - ThrowTypeError({"Cannot find name '", identKey->Name(), "'"}, locInfo); - } + type->AddObjectFlag(ObjectFlags::RESOLVED_DECLARED_MEMBERS); - Type *computedPropType = identKey->Check(this); - - if (!computedPropType->HasTypeFlag(TypeFlag::COMPUTED_NAME)) { - ThrowTypeError("A computed property name must be of type 'string', 'number', 'symbol', or 'any'", locInfo); - } else if (computedPropType->HasTypeFlag(TypeFlag::NUMBER_OR_ANY)) { - HandleNumberIndexInfo(desc, propType, readonly); - *handleNextProp = true; - } else if (computedPropType->IsStringType()) { - stringIndexTypes->push_back(propType); - *handleNextProp = true; - } else if (computedPropType->IsNumberLiteralType()) { - propName = util::Helpers::ToStringView(allocator_, computedPropType->AsNumberLiteralType()->Value()); - } else if (computedPropType->IsStringLiteralType()) { - propName = computedPropType->AsStringLiteralType()->Value(); - } - } else if (propKey->IsLiteral()) { - if (propKey->IsNumberLiteral()) { - propName = util::Helpers::ToStringView(allocator_, propKey->AsNumberLiteral()->Number()); - } else if (propKey->IsStringLiteral()) { - propName = propKey->AsStringLiteral()->Str(); - } else { - ThrowTypeError("A computed property name must be of type 'string', 'number', 'symbol', or 'any'", locInfo); - } - } else { - Type *computedKeyType = propKey->Check(this); - if (computedKeyType->HasTypeFlag(TypeFlag::NUMBER_LIKE_ENUM)) { - HandleNumberIndexInfo(desc, propType, readonly); - *handleNextProp = true; - } else if (computedKeyType->IsStringType()) { - stringIndexTypes->push_back(propType); - *handleNextProp = true; - } else { - ThrowTypeError("A computed property name must be of type 'string', 'number', 'symbol', or 'any'", locInfo); - } + ResolveSignaturesOfObjectType(type, signatureDeclarations); + ResolveIndexInfosOfObjectType(type, indexDeclarations); } - - return propName; } -void Checker::CheckIndexConstraints(Type *type) const +bool Checker::ValidateInterfaceMemberRedeclaration(ObjectType *type, binder::Variable *prop, + const lexer::SourcePosition &locInfo) { - if (!type->IsObjectType()) { - return; + if (prop->HasFlag(binder::VariableFlags::COMPUTED)) { + return true; } - ObjectType *objType = type->AsObjectType(); - - const IndexInfo *numberInfo = objType->NumberIndexInfo(); - const IndexInfo *stringInfo = objType->StringIndexInfo(); - std::vector properties; - - if (objType->IsInterfaceType()) { - if (!numberInfo) { - numberInfo = objType->AsInterfaceType()->FindIndexInfo(true); - } - if (!stringInfo) { - stringInfo = objType->AsInterfaceType()->FindIndexInfo(false); - } - - objType->AsInterfaceType()->CollectProperties(&properties); - } else { - properties = objType->Properties(); - } + binder::Variable *found = type->GetProperty(prop->Name(), false); - if (numberInfo) { - for (auto *it : properties) { - if (it->HasFlag(binder::VariableFlags::INDEX_LIKE)) { - IsTypeAssignableTo(it->TsType(), numberInfo->InfoType(), - {"Property '", it->Name(), "' of type '", it->TsType(), - "' is not assignable to numeric index type '", numberInfo->InfoType(), "'."}, - it->Declaration()->Node()->Start()); - } - } + if (!found) { + return true; } - if (stringInfo) { - for (auto *it : properties) { - IsTypeAssignableTo(it->TsType(), stringInfo->InfoType(), - {"Property '", it->Name(), "' of type '", it->TsType(), - "' is not assignable to string index type '", stringInfo->InfoType(), "'."}, - it->Declaration()->Node()->Start()); - } - } + Type *targetType = GetTypeOfVariable(prop); + Type *sourceType = GetTypeOfVariable(found); + IsTypeIdenticalTo(targetType, sourceType, + {"Subsequent property declarations must have the same type. Property ", prop->Name(), + " must be of type ", sourceType, ", but here has type ", targetType, "."}, + locInfo); + return false; } } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/typeCreation.cpp b/es2panda/typescript/core/typeCreation.cpp index 1b3aab4d5f5f584e2d10fc36d8040a49d5d76f42..fba445080943fffc9c8e0396287a3d4a1ae1b92f 100644 --- a/es2panda/typescript/core/typeCreation.cpp +++ b/es2panda/typescript/core/typeCreation.cpp @@ -56,7 +56,8 @@ Type *Checker::CreateStringLiteralType(const util::StringView &str) Type *Checker::CreateUnionType(std::initializer_list constituentTypes) { - std::vector newConstituentTypes; + ArenaVector newConstituentTypes(allocator_->Adapter()); + for (auto *it : constituentTypes) { newConstituentTypes.push_back(it); } @@ -64,59 +65,110 @@ Type *Checker::CreateUnionType(std::initializer_list constituentTypes) return CreateUnionType(std::move(newConstituentTypes)); } -Type *Checker::CreateUnionType(std::vector &&constituentTypes) +Type *Checker::CreateUnionType(ArenaVector &constituentTypes) { - UnionType::RemoveDuplicatedTypes(relation_, constituentTypes); + ArenaVector newConstituentTypes(allocator_->Adapter()); + + for (auto *it : constituentTypes) { + if (it->IsUnionType()) { + for (auto *type : it->AsUnionType()->ConstituentTypes()) { + newConstituentTypes.push_back(type); + } - if (constituentTypes.size() == 1) { - return constituentTypes[0]; + continue; + } + + newConstituentTypes.push_back(it); } - auto *newUnionType = allocator_->New(std::move(constituentTypes)); + UnionType::RemoveDuplicatedTypes(relation_, newConstituentTypes); + + if (newConstituentTypes.size() == 1) { + return newConstituentTypes[0]; + } + + auto *newUnionType = allocator_->New(newConstituentTypes); return UnionType::HandleUnionType(newUnionType, globalTypes_); } +Type *Checker::CreateUnionType(ArenaVector &&constituentTypes) +{ + if (constituentTypes.empty()) { + return nullptr; + } + + ArenaVector newConstituentTypes(allocator_->Adapter()); + + for (auto *it : constituentTypes) { + if (it->IsUnionType()) { + for (auto *type : it->AsUnionType()->ConstituentTypes()) { + newConstituentTypes.push_back(type); + } + + continue; + } + + newConstituentTypes.push_back(it); + } + + UnionType::RemoveDuplicatedTypes(relation_, newConstituentTypes); + + if (newConstituentTypes.size() == 1) { + return newConstituentTypes[0]; + } + + auto *newUnionType = allocator_->New(std::move(newConstituentTypes)); + + return UnionType::HandleUnionType(newUnionType, globalTypes_); +} + +Type *Checker::CreateObjectTypeWithCallSignature(Signature *callSignature) +{ + auto *objType = allocator_->New(allocator_->New(allocator_)); + objType->AddCallSignature(callSignature); + return objType; +} + +Type *Checker::CreateObjectTypeWithConstructSignature(Signature *constructSignature) +{ + auto *objType = allocator_->New(allocator_->New(allocator_)); + objType->AddConstructSignature(constructSignature); + return objType; +} + Type *Checker::CreateFunctionTypeWithSignature(Signature *callSignature) { - auto *funcObjType = allocator_->New(allocator_->New()); - funcObjType->AddSignature(callSignature); + auto *funcObjType = allocator_->New(allocator_->New(allocator_)); + funcObjType->AddCallSignature(callSignature); return funcObjType; } Type *Checker::CreateConstructorTypeWithSignature(Signature *constructSignature) { - auto *constructObjType = allocator_->New(allocator_->New()); - constructObjType->AddSignature(constructSignature, false); + auto *constructObjType = allocator_->New(allocator_->New(allocator_)); + constructObjType->AddConstructSignature(constructSignature); return constructObjType; } -Type *Checker::CreateTupleType(ObjectDescriptor *desc, TupleElementFlagPool &&elementFlags, ElementFlags combinedFlags, - uint32_t minLength, uint32_t fixedLength, bool readonly) +Type *Checker::CreateTupleType(ObjectDescriptor *desc, ArenaVector &&elementFlags, + ElementFlags combinedFlags, uint32_t minLength, uint32_t fixedLength, bool readonly) { - desc->stringIndexInfo = allocator_->New(GlobalAnyType(), "x"); - - auto *tupleType = - allocator_->New(desc, std::move(elementFlags), combinedFlags, minLength, fixedLength, readonly); - - return tupleType; + desc->stringIndexInfo = allocator_->New(GlobalAnyType(), "x", readonly); + return allocator_->New(desc, std::move(elementFlags), combinedFlags, minLength, fixedLength, readonly); } -Type *Checker::CreateTupleType(ObjectDescriptor *desc, TupleElementFlagPool &&elementFlags, ElementFlags combinedFlags, - uint32_t minLength, uint32_t fixedLength, bool readonly, +Type *Checker::CreateTupleType(ObjectDescriptor *desc, ArenaVector &&elementFlags, + ElementFlags combinedFlags, uint32_t minLength, uint32_t fixedLength, bool readonly, NamedTupleMemberPool &&namedMembers) { - desc->stringIndexInfo = allocator_->New(GlobalAnyType(), "x"); - ObjectType *tupleType = nullptr; + desc->stringIndexInfo = allocator_->New(GlobalAnyType(), "x", readonly); if (!namedMembers.empty()) { - tupleType = allocator_->New(desc, std::move(elementFlags), combinedFlags, minLength, fixedLength, - readonly, std::move(namedMembers)); - } else { - tupleType = - allocator_->New(desc, std::move(elementFlags), combinedFlags, minLength, fixedLength, readonly); + return allocator_->New(desc, std::move(elementFlags), combinedFlags, minLength, fixedLength, + readonly, std::move(namedMembers)); } - return tupleType; + return allocator_->New(desc, std::move(elementFlags), combinedFlags, minLength, fixedLength, readonly); } } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/typeElaboration.cpp b/es2panda/typescript/core/typeElaboration.cpp deleted file mode 100644 index 61cd7c2be45f189b5531ae52e91ed122a68e3dd8..0000000000000000000000000000000000000000 --- a/es2panda/typescript/core/typeElaboration.cpp +++ /dev/null @@ -1,704 +0,0 @@ -/** - * Copyright (c) 2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace panda::es2panda::checker { - -bool Checker::ElaborateElementwise(TypeOrNode source, const Type *targetType, lexer::SourcePosition locInfo) -{ - const ir::AstNode *sourceNode = nullptr; - Type *sourceType = nullptr; - - if (std::holds_alternative(source)) { - sourceNode = std::get(source); - } else { - ASSERT(std::holds_alternative(source)); - sourceType = std::get(source); - } - - if (((sourceNode && sourceNode->IsArrayExpression()) || - (sourceType && sourceType->IsObjectType() && sourceType->AsObjectType()->IsTupleType())) && - (MaybeTypeOfKind(targetType, TypeFlag::ARRAY) || - MaybeTypeOfKind(targetType, ObjectType::ObjectTypeKind::TUPLE))) { - return ElaborateArrayLiteral(source, targetType, locInfo); - } - - if (((sourceNode && sourceNode->IsObjectExpression()) || - (sourceType && sourceType->IsObjectType() && sourceType->AsObjectType()->IsObjectLiteralType())) && - (MaybeTypeOfKind(targetType, ObjectType::ObjectTypeKind::LITERAL) || - MaybeTypeOfKind(targetType, ObjectType::ObjectTypeKind::INTERFACE))) { - return ElaborateObjectLiteral(source, targetType, locInfo); - } - - return false; -} - -bool Checker::ElaborateObjectLiteral(TypeOrNode source, const Type *targetType, lexer::SourcePosition locInfo) -{ - const ir::ObjectExpression *sourceNode = nullptr; - ObjectLiteralType *sourceType = nullptr; - - if (std::holds_alternative(source)) { - sourceNode = std::get(source)->AsObjectExpression(); - } else { - ASSERT(std::holds_alternative(source)); - sourceType = std::get(source)->AsObjectType()->AsObjectLiteralType(); - } - - bool targetIsUnion = targetType->IsUnionType(); - if (targetIsUnion) { - for (auto *it : targetType->AsUnionType()->ConstituentTypes()) { - if (it->IsObjectType() && - (it->AsObjectType()->IsObjectLiteralType() || it->AsObjectType()->IsInterfaceType()) && - it->GetTypeFacts() == TypeFacts::EMPTY_OBJECT_FACTS) { - return true; - } - } - } else if (sourceNode && targetType->GetTypeFacts() == TypeFacts::EMPTY_OBJECT_FACTS) { - return true; - } - - ObjectLiteralElaborationData elaborationData; - elaborationData.desc = allocator_->New(); - GetPotentialTypesAndIndexInfosForElaboration(targetType, &elaborationData); - - if (sourceNode) { - bool excessCheckNeeded = ElaborateObjectLiteralWithNode(sourceNode, targetType, &elaborationData); - if (!excessCheckNeeded) { - excessCheckNeeded = CheckIfExcessTypeCheckNeededForObjectElaboration(targetType, &elaborationData); - } - - if (excessCheckNeeded) { - for (const auto *it : elaborationData.spreads) { - HandleSpreadElement(it->AsSpreadElement(), elaborationData.desc, it->Start()); - } - - Type *sourceObjType = allocator_->New(elaborationData.desc); - - IsTypeAssignableTo(sourceObjType, targetType, - {"Type '", sourceObjType, "' is not assignable to type '", targetType, "'."}, locInfo); - } - - return true; - } - - ASSERT(sourceType); - ElaborateObjectLiteralWithType(sourceType, targetType, elaborationData.potentialObjectTypes, locInfo); - - return true; -} - -void Checker::GetPotentialTypesAndIndexInfosForElaboration(const Type *targetType, - ObjectLiteralElaborationData *elaborationData) -{ - if (targetType->IsUnionType()) { - std::vector numberInfoTypes; - std::vector stringInfoTypes; - - for (auto *it : targetType->AsUnionType()->ConstituentTypes()) { - if (it->IsObjectType() && - (it->AsObjectType()->IsObjectLiteralType() || it->AsObjectType()->IsInterfaceType())) { - IndexInfoTypePair infoTypePair = GetIndexInfoTypePair(it->AsObjectType()); - if (infoTypePair.first) { - stringInfoTypes.push_back(infoTypePair.first); - } - - if (infoTypePair.second) { - numberInfoTypes.push_back(infoTypePair.second); - } - - elaborationData->potentialObjectTypes.insert({it->Id(), it->AsObjectType()}); - } - } - - Type *numberInfosType = nullptr; - if (!numberInfoTypes.empty()) { - numberInfosType = CreateUnionType(std::move(numberInfoTypes)); - } - - Type *stringInfosType = nullptr; - if (!stringInfoTypes.empty()) { - stringInfosType = CreateUnionType(std::move(stringInfoTypes)); - } - - elaborationData->numberInfosType = numberInfosType; - elaborationData->stringInfosType = stringInfosType; - } else { - IndexInfoTypePair infoTypePair = GetIndexInfoTypePair(targetType->AsObjectType()); - - elaborationData->stringInfosType = infoTypePair.first; - elaborationData->numberInfosType = infoTypePair.second; - } -} - -IndexInfoTypePair Checker::GetIndexInfoTypePair(const ObjectType *type) -{ - const IndexInfo *stringIndexInfo = type->StringIndexInfo(); - const IndexInfo *numberIndexInfo = type->NumberIndexInfo(); - - if (type->IsInterfaceType()) { - if (!stringIndexInfo) { - stringIndexInfo = type->AsInterfaceType()->FindIndexInfo(false); - } - - if (!numberIndexInfo) { - numberIndexInfo = type->AsInterfaceType()->FindIndexInfo(true); - } - } - - return {stringIndexInfo ? const_cast(stringIndexInfo->InfoType()) : nullptr, - numberIndexInfo ? const_cast(numberIndexInfo->InfoType()) : nullptr}; -} - -bool Checker::CheckIfExcessTypeCheckNeededForObjectElaboration(const Type *targetType, - ObjectLiteralElaborationData *elaborationData) -{ - if (targetType->IsUnionType()) { - for (auto it : elaborationData->potentialObjectTypes) { - if (!it.second->CallSignatures().empty() || !it.second->ConstructSignatures().empty()) { - return true; - } - } - } else if (!targetType->AsObjectType()->CallSignatures().empty() || - !targetType->AsObjectType()->ConstructSignatures().empty()) { - return true; - } - - if (targetType->IsUnionType()) { - uint32_t targetPropCount = 0; - - for (auto it : elaborationData->potentialObjectTypes) { - targetPropCount = it.second->Properties().size(); - - if (it.second->IsInterfaceType()) { - std::vector interfaceProperties; - it.second->AsInterfaceType()->CollectProperties(&interfaceProperties); - targetPropCount += interfaceProperties.size(); - } - - if (elaborationData->desc->properties.size() < targetPropCount) { - return true; - } - } - } else { - uint32_t targetPropCount = targetType->AsObjectType()->Properties().size(); - - if (targetType->AsObjectType()->IsInterfaceType()) { - std::vector interfaceProperties; - targetType->AsObjectType()->AsInterfaceType()->CollectProperties(&interfaceProperties); - targetPropCount += interfaceProperties.size(); - } - - if (elaborationData->desc->properties.size() < targetPropCount) { - return true; - } - } - - return false; -} - -bool Checker::ElaborateObjectLiteralWithNode(const ir::ObjectExpression *sourceNode, const Type *targetType, - ObjectLiteralElaborationData *elaborationData) -{ - bool excessCheckNeeded = false; - - for (auto *sourceProp : sourceNode->Properties()) { - if (!sourceProp->IsProperty()) { - ASSERT(sourceProp->IsSpreadElement()); - elaborationData->spreads.push_back(sourceProp->AsSpreadElement()); - excessCheckNeeded = true; - continue; - } - const ir::Property *currentProp = sourceProp->AsProperty(); - - ObjectLiteralPropertyInfo propInfo = - HandleObjectLiteralProperty(currentProp, elaborationData->desc, &elaborationData->stringIndexTypes); - if (propInfo.handleNextProp) { - excessCheckNeeded = true; - continue; - } - - bool numberLiteralName = currentProp->Key()->IsNumberLiteral(); - - Type *targetPropType = GetTargetPropertyTypeFromTargetForElaborationWithNode( - targetType, elaborationData, propInfo.propName, currentProp->Value()); - - if (!targetPropType) { - targetPropType = - GetindexInfoTypeOrThrowError(targetType, elaborationData, propInfo.propName, currentProp->IsComputed(), - numberLiteralName, sourceProp->Start()); - } - - if (!IsLiteralType(targetPropType) || targetPropType->IsBooleanType()) { - propInfo.propType = GetBaseTypeOfLiteralType(propInfo.propType); - } - - if (!ElaborateElementwise(currentProp->Value(), targetPropType, sourceProp->Start()) && - !IsTypeAssignableTo(propInfo.propType, targetPropType)) { - if (currentProp->IsComputed() && currentProp->Key()->IsIdentifier()) { - ThrowTypeError({"Type of computed property's value is '", propInfo.propType, - "', which is not assignable to type '", targetPropType, "'."}, - sourceProp->Start()); - } else { - ThrowTypeError({"Type '", propInfo.propType, "' is not assignable to type '", targetPropType, "'."}, - sourceProp->Start()); - } - } - - auto *objLitProp = - binder::Scope::CreateVar(allocator_, propInfo.propName, binder::VariableFlags::NONE, currentProp); - - objLitProp->AddFlag(currentProp->IsMethod() ? binder::VariableFlags::METHOD : binder::VariableFlags::PROPERTY); - propInfo.propType->SetVariable(objLitProp); - propInfo.propType->AddTypeFlag(TypeFlag::RELATION_CHECKED); - objLitProp->SetTsType(propInfo.propType); - elaborationData->desc->properties.push_back(objLitProp); - } - - return excessCheckNeeded; -} - -Type *Checker::GetindexInfoTypeOrThrowError(const Type *targetType, ObjectLiteralElaborationData *elaborationData, - const util::StringView &propName, bool computed, bool numberLiteralName, - lexer::SourcePosition locInfo) -{ - if ((!elaborationData->stringInfosType && !elaborationData->numberInfosType) || - (!numberLiteralName && !elaborationData->stringInfosType)) { - std::stringstream ss; - if (computed) { - ss << "[" << propName << "]"; - } else { - ss << propName; - } - - std::string str = ss.str(); - - ThrowTypeError({"Object literal may only specify known properties, and '", - util::StringView(std::string_view(str)), "' does not exist in type '", targetType, "'"}, - locInfo); - } - - if (numberLiteralName && elaborationData->numberInfosType) { - return elaborationData->numberInfosType; - } - - return elaborationData->stringInfosType; -} - -void Checker::ElaborateObjectLiteralWithType(const ObjectLiteralType *sourceType, const Type *targetType, - const std::unordered_map &potentialObjectTypes, - [[maybe_unused]] lexer::SourcePosition locInfo) -{ - for (auto *sourceProp : sourceType->Properties()) { - Type *targetPropType = - GetTargetPropertyTypeFromTargetForElaborationWithType(targetType, potentialObjectTypes, sourceProp->Name()); - - if (!targetPropType) { - // TODO(aszilagyi): search for index info and then throw error if its missing - ThrowTypeError({"Property '", sourceProp->Name(), "' does not exist on type '", targetType, "'"}, - sourceProp->Declaration()->Node()->Start()); - } - - Type *sourcePropType = sourceProp->TsType(); - - if (!ElaborateElementwise(sourcePropType, targetPropType, sourceProp->Declaration()->Node()->Start()) && - !IsTypeAssignableTo(sourcePropType, targetPropType)) { - ThrowTypeError({"Type '", sourcePropType, "' is not assignable to type '", targetPropType, "'."}, - sourceProp->Declaration()->Node()->Start()); - } - } -} - -Type *Checker::GetTargetPropertyTypeFromTargetForElaborationWithNode(const Type *targetType, - ObjectLiteralElaborationData *elaborationData, - const util::StringView &propName, - const ir::Expression *propValue) -{ - binder::LocalVariable *searchProp = nullptr; - - if (targetType->IsUnionType()) { - std::vector targetPropTypes; - for (auto potentialType = elaborationData->potentialObjectTypes.begin(); - potentialType != elaborationData->potentialObjectTypes.end();) { - searchProp = potentialType->second->GetProperty(propName); - if (searchProp) { - if (searchProp->TsType()->IsUnionType()) { - for (auto *type : searchProp->TsType()->AsUnionType()->ConstituentTypes()) { - targetPropTypes.push_back(type); - } - } else { - targetPropTypes.push_back(searchProp->TsType()); - } - - if (!IsTypeAssignableTo(CreateTupleTypeFromEveryArrayExpression(propValue), searchProp->TsType())) { - potentialType = elaborationData->potentialObjectTypes.erase(potentialType); - continue; - } - - potentialType++; - continue; - } - - potentialType = elaborationData->potentialObjectTypes.erase(potentialType); - } - - if (targetPropTypes.empty()) { - return nullptr; - } - - return CreateUnionType(std::move(targetPropTypes)); - } - - ASSERT(targetType->IsObjectType()); - searchProp = targetType->AsObjectType()->GetProperty(propName); - if (!searchProp) { - return nullptr; - } - - return searchProp->TsType(); -} - -Type *Checker::GetTargetPropertyTypeFromTargetForElaborationWithType( - const Type *targetType, const std::unordered_map &potentialObjectTypes, - const util::StringView &propName) -{ - binder::LocalVariable *searchProp = nullptr; - - if (targetType->IsUnionType()) { - std::vector targetPropTypes; - for (auto it : potentialObjectTypes) { - searchProp = it.second->GetProperty(propName); - if (searchProp) { - if (searchProp->TsType()->IsUnionType()) { - for (auto *type : searchProp->TsType()->AsUnionType()->ConstituentTypes()) { - targetPropTypes.push_back(type); - } - } else { - targetPropTypes.push_back(searchProp->TsType()); - } - } - } - - if (targetPropTypes.empty()) { - return nullptr; - } - - return CreateUnionType(std::move(targetPropTypes)); - } - - ASSERT(targetType->IsObjectType()); - searchProp = targetType->AsObjectType()->GetProperty(propName); - if (!searchProp) { - return nullptr; - } - - return searchProp->TsType(); -} - -bool Checker::ElaborateArrayLiteral(TypeOrNode source, const Type *targetType, lexer::SourcePosition locInfo) -{ - const ir::ArrayExpression *sourceNode = nullptr; - TupleType *sourceType = nullptr; - - if (std::holds_alternative(source)) { - sourceNode = std::get(source)->AsArrayExpression(); - } else { - ASSERT(std::holds_alternative(source)); - sourceType = std::get(source)->AsObjectType()->AsTupleType(); - } - - std::unordered_map potentialTypes; - - if (targetType->IsUnionType()) { - for (auto *it : targetType->AsUnionType()->ConstituentTypes()) { - if (it->IsArrayType() || (it->IsObjectType() && it->AsObjectType()->IsTupleType())) { - potentialTypes.insert({it->Id(), it}); - } - } - } - - if (sourceNode) { - ElaborateArrayLiteralWithNode(sourceNode, targetType, &potentialTypes, locInfo); - } else { - ASSERT(sourceType); - ElaborateArrayLiteralWithType(sourceType, targetType, potentialTypes); - } - - if (sourceNode) { - CheckTargetTupleLengthConstraints(targetType, sourceNode, &potentialTypes, locInfo); - } - - return true; -} - -void Checker::ElaborateArrayLiteralWithNode(const ir::ArrayExpression *sourceNode, const Type *targetType, - std::unordered_map *potentialTypes, - lexer::SourcePosition locInfo) -{ - uint32_t tupleIdx = 0; - for (auto *it : sourceNode->Elements()) { - Type *currentElementType = it->Check(this); - const Type *targetElementType = nullptr; - - if (targetType->IsUnionType()) { - std::vector newElementUnion = - CollectTargetTypesForArrayElaborationWithNodeFromTargetUnion(potentialTypes, it, tupleIdx); - if (newElementUnion.empty()) { - ThrowTypeError({"Type '", sourceNode->Check(this), "' is not assignable to type '", targetType, "'."}, - locInfo); - } - - targetElementType = CreateUnionType(std::move(newElementUnion)); - } else if (targetType->IsObjectType() && targetType->AsObjectType()->IsTupleType()) { - const TupleType *targetTuple = targetType->AsObjectType()->AsTupleType(); - - if (targetTuple->FixedLength() <= tupleIdx) { - ThrowTypeError({"Type '", sourceNode->Check(this), "' is not assignable to type '", targetTuple, "'."}, - locInfo); - } - - targetElementType = targetTuple->Properties()[tupleIdx]->TsType(); - } else { - ASSERT(targetType->IsArrayType()); - targetElementType = targetType->AsArrayType()->ElementType(); - } - - tupleIdx++; - - if (!ElaborateElementwise(it, targetElementType, it->Start()) && - !IsTypeAssignableTo(currentElementType, targetElementType)) { - if (targetElementType->HasTypeFlag(TypeFlag::LITERAL)) { - ThrowTypeError({"Type '", currentElementType, "' is not assignable to type '", targetElementType, "'."}, - it->Start()); - } else { - ThrowTypeError( - {"Type '", AsSrc(currentElementType), "' is not assignable to type '", targetElementType, "'."}, - it->Start()); - } - } - } -} - -void Checker::ElaborateArrayLiteralWithType(const TupleType *sourceType, const Type *targetType, - const std::unordered_map &potentialTypes) -{ - for (size_t tupleIdx = 0; tupleIdx < sourceType->Properties().size(); tupleIdx++) { - binder::Variable *sourceProp = sourceType->Properties()[tupleIdx]; - Type *sourceElementType = sourceProp->TsType(); - const Type *targetElementType = nullptr; - - if (tupleIdx == sourceType->Properties().size() - 1 && (sourceType->CombinedFlags() & ElementFlags::REST)) { - return; - } - - if (targetType->IsUnionType()) { - std::vector newElementUnion = - CollectTargetTypesForArrayElaborationWithTypeFromTargetUnion(potentialTypes, tupleIdx); - if (newElementUnion.empty()) { - ThrowTypeError({"Property '", tupleIdx, "' does not exist on type '", targetType}, - sourceProp->Declaration()->Node()->Start()); - } - - targetElementType = CreateUnionType(std::move(newElementUnion)); - } else if (targetType->IsObjectType() && targetType->AsObjectType()->IsTupleType()) { - const TupleType *targetTuple = targetType->AsObjectType()->AsTupleType(); - - if (tupleIdx >= targetTuple->FixedLength()) { - ThrowTypeError({"Tuple type '", targetType, "' of length '", targetTuple->FixedLength(), - "' has no element at index '", tupleIdx, "' ."}, - sourceProp->Declaration()->Node()->Start()); - } - - targetElementType = targetTuple->Properties()[tupleIdx]->TsType(); - } else { - ASSERT(targetType->IsArrayType()); - targetElementType = targetType->AsArrayType()->ElementType(); - } - - if (!ElaborateElementwise(sourceElementType, targetElementType, sourceProp->Declaration()->Node()->Start()) && - !IsTypeAssignableTo(sourceElementType, targetElementType)) { - ThrowTypeError({"Type '", sourceElementType, "' is not assignable to type '", targetElementType, "'."}, - sourceProp->Declaration()->Node()->Start()); - } - } -} - -std::vector Checker::CollectTargetTypesForArrayElaborationWithNodeFromTargetUnion( - std::unordered_map *potentialTypes, const ir::Expression *currentSourceElement, uint32_t tupleIdx) -{ - std::vector newElementUnion; - - for (auto potentialType = potentialTypes->begin(); potentialType != potentialTypes->end();) { - if (potentialType->second->IsObjectType() && potentialType->second->AsObjectType()->IsTupleType()) { - TupleType *currentTargetTuple = potentialType->second->AsObjectType()->AsTupleType(); - - if (currentTargetTuple->FixedLength() <= tupleIdx) { - potentialType = potentialTypes->erase(potentialType); - continue; - } - - Type *elementType = currentTargetTuple->Properties()[tupleIdx]->TsType(); - - if (elementType->IsUnionType()) { - std::vector &types = elementType->AsUnionType()->ConstituentTypes(); - newElementUnion.insert(newElementUnion.end(), types.begin(), types.end()); - } else { - newElementUnion.push_back(elementType); - } - - if (!IsTypeAssignableTo(CreateTupleTypeFromEveryArrayExpression(currentSourceElement), elementType)) { - potentialType = potentialTypes->erase(potentialType); - continue; - } - } else if (potentialType->second->IsArrayType()) { - Type *potentialArrayElementType = potentialType->second->AsArrayType()->ElementType(); - - if (potentialArrayElementType->IsUnionType()) { - std::vector &types = potentialArrayElementType->AsUnionType()->ConstituentTypes(); - newElementUnion.insert(newElementUnion.end(), types.begin(), types.end()); - } else { - newElementUnion.push_back(potentialArrayElementType); - } - } - - potentialType++; - } - - return newElementUnion; -} - -std::vector Checker::CollectTargetTypesForArrayElaborationWithTypeFromTargetUnion( - const std::unordered_map &potentialTypes, uint32_t tupleIdx) -{ - std::vector newElementUnion; - - for (const auto &potentialType : potentialTypes) { - if (potentialType.second->IsObjectType() && potentialType.second->AsObjectType()->IsTupleType()) { - TupleType *currentTargetTuple = potentialType.second->AsObjectType()->AsTupleType(); - - if (currentTargetTuple->FixedLength() <= tupleIdx) { - continue; - } - - Type *elementType = currentTargetTuple->Properties()[tupleIdx]->TsType(); - - if (elementType->IsUnionType()) { - std::vector &types = elementType->AsUnionType()->ConstituentTypes(); - newElementUnion.insert(newElementUnion.end(), types.begin(), types.end()); - } else { - newElementUnion.push_back(elementType); - } - } else if (potentialType.second->IsArrayType()) { - Type *potentialArrayElementType = potentialType.second->AsArrayType()->ElementType(); - - if (potentialArrayElementType->IsUnionType()) { - std::vector &types = potentialArrayElementType->AsUnionType()->ConstituentTypes(); - newElementUnion.insert(newElementUnion.end(), types.begin(), types.end()); - } else { - newElementUnion.push_back(potentialArrayElementType); - } - } - } - - return newElementUnion; -} - -void Checker::CheckTargetTupleLengthConstraints(const Type *targetType, const ir::ArrayExpression *sourceNode, - std::unordered_map *potentialTypes, - const lexer::SourcePosition &locInfo) -{ - if (targetType->IsUnionType()) { - for (auto it = potentialTypes->begin(); it != potentialTypes->end();) { - if (it->second->IsObjectType() && it->second->AsObjectType()->IsTupleType()) { - TupleType *currentTargetTuple = it->second->AsObjectType()->AsTupleType(); - - if (currentTargetTuple->MinLength() > sourceNode->Elements().size() || - (sourceNode->Elements().empty() && currentTargetTuple->MinLength() > 0)) { - it = potentialTypes->erase(it); - continue; - } - } - - it++; - } - - if (potentialTypes->empty()) { - ThrowTypeError({"Type '", sourceNode->Check(this), "' is not assignable to type '", targetType, "'."}, - locInfo); - } - } else if (targetType->IsObjectType() && targetType->AsObjectType()->IsTupleType()) { - const TupleType *targetTuple = targetType->AsObjectType()->AsTupleType(); - - if ((targetTuple->MinLength() > sourceNode->Elements().size()) || - (sourceNode->Elements().empty() && targetTuple->MinLength() > 0)) { - ThrowTypeError({"Type '", sourceNode->Check(this), "' is not assignable to type '", targetTuple, "'."}, - locInfo); - } - } -} - -Type *Checker::GetUnaryResultType(Type *operandType) -{ - if (MaybeTypeOfKind(operandType, TypeFlag::BIGINT_LIKE)) { - if (operandType->HasTypeFlag(TypeFlag::UNION_OR_INTERSECTION) && - MaybeTypeOfKind(operandType, TypeFlag::NUMBER_LIKE)) { - return GlobalNumberOrBigintType(); - } - - return GlobalBigintType(); - } - - return GlobalNumberType(); -} - -Type *Checker::InferVariableDeclarationType(const ir::Identifier *decl) -{ - if (!typeStack_.insert(decl).second) { - if (decl->TypeAnnotation()) { - ThrowTypeError({"'", decl->Name(), - "' is referenced directly or indirectly in its " - "own type annotation."}, - decl->Start()); - } - - ThrowTypeError({"'", decl->Name(), - "' is referenced directly or indirectly in its " - "own initializer."}, - decl->Start()); - } - - Type *inferedType = nullptr; - if (decl->TypeAnnotation()) { - inferedType = decl->TypeAnnotation()->Check(this); - } else if (decl->Parent()->AsVariableDeclarator()->Init()) { - inferedType = decl->Parent()->AsVariableDeclarator()->Init()->Check(this); - } - - TypeStack().erase(decl); - return inferedType; -} - -} // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/typeElaborationContext.cpp b/es2panda/typescript/core/typeElaborationContext.cpp new file mode 100644 index 0000000000000000000000000000000000000000..682e44ad2a4cb2120731273dd7e7d20e1a7812a4 --- /dev/null +++ b/es2panda/typescript/core/typeElaborationContext.cpp @@ -0,0 +1,173 @@ +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "typeElaborationContext.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace panda::es2panda::checker { +Type *ElaborationContext::GetBestMatchingType(Type *indexType, const ir::Expression *sourceNode) +{ + ArenaVector bestMatchingType(checker_->Allocator()->Adapter()); + Type *sourceType = sourceNode ? checker_->CheckTypeCached(sourceNode) : checker_->GlobalAnyType(); + + for (auto it = potentialTypes_.begin(); it != potentialTypes_.end();) { + Type *currentType = checker_->GetPropertyTypeForIndexType(*it, indexType); + + if (!currentType) { + it = potentialTypes_.erase(it); + continue; + } + + if (!checker_->IsTypeAssignableTo(sourceType, currentType)) { + it = potentialTypes_.erase(it); + } else { + it++; + } + + bestMatchingType.push_back(currentType); + } + + return checker_->CreateUnionType(std::move(bestMatchingType)); +} + +void ArrayElaborationContext::Start() +{ + ASSERT(sourceNode_->IsArrayExpression()); + RemoveUnnecessaryTypes(); + + for (auto *it : sourceNode_->AsArrayExpression()->Elements()) { + if (it->IsOmittedExpression()) { + index_++; + continue; + } + + util::StringView memberIndex = util::Helpers::ToStringView(checker_->Allocator(), index_); + + Type *targetElementType = nullptr; + + if (targetType_->IsUnionType()) { + targetElementType = GetBestMatchingType(checker_->CreateStringLiteralType(memberIndex), it); + } else { + targetElementType = + checker_->GetPropertyTypeForIndexType(targetType_, checker_->CreateStringLiteralType(memberIndex)); + } + + if (!targetElementType) { + return; + } + + checker_->ElaborateElementwise(targetElementType, it, it->Start()); + index_++; + } +} + +void ArrayElaborationContext::RemoveUnnecessaryTypes() +{ + if (!targetType_->IsUnionType()) { + return; + } + + for (auto *it : targetType_->AsUnionType()->ConstituentTypes()) { + if (it->IsArrayType() || it->IsObjectType()) { + potentialTypes_.push_back(it); + } + } +} + +void ObjectElaborationContext::Start() +{ + ASSERT(sourceNode_->IsObjectExpression()); + RemoveUnnecessaryTypes(); + + for (auto *it : sourceNode_->AsObjectExpression()->Properties()) { + if (it->IsSpreadElement()) { + continue; + } + + const ir::Property *prop = it->AsProperty(); + + Type *propKeyType = nullptr; + if (prop->IsComputed()) { + propKeyType = checker_->CheckComputedPropertyName(prop->Key()); + } else { + switch (prop->Key()->Type()) { + case ir::AstNodeType::IDENTIFIER: { + propKeyType = checker_->Allocator()->New(prop->Key()->AsIdentifier()->Name()); + break; + } + case ir::AstNodeType::NUMBER_LITERAL: { + propKeyType = + checker_->Allocator()->New(prop->Key()->AsNumberLiteral()->Number()); + break; + } + case ir::AstNodeType::STRING_LITERAL: { + propKeyType = checker_->Allocator()->New(prop->Key()->AsStringLiteral()->Str()); + break; + } + default: { + UNREACHABLE(); + break; + } + } + } + + Type *targetElementType = nullptr; + + if (targetType_->IsUnionType()) { + targetElementType = GetBestMatchingType(propKeyType, prop->IsShorthand() ? nullptr : prop->Value()); + } else { + targetElementType = checker_->GetPropertyTypeForIndexType(targetType_, propKeyType); + } + + if (!targetElementType) { + if (propKeyType->HasTypeFlag(TypeFlag::LITERAL)) { + checker_->ThrowTypeError({"Object literal may only specify known properties, and ", propKeyType, + " does not exist in type '", targetType_, "'."}, + it->Start()); + } + + return; + } + + if (prop->IsShorthand()) { + continue; + } + + checker_->ElaborateElementwise(targetElementType, prop->Value(), it->Start()); + } +} + +void ObjectElaborationContext::RemoveUnnecessaryTypes() +{ + if (!targetType_->IsUnionType()) { + return; + } + + for (auto *it : targetType_->AsUnionType()->ConstituentTypes()) { + if (it->IsObjectType()) { + potentialTypes_.push_back(it); + } + } +} +} // namespace panda::es2panda::checker diff --git a/es2panda/typescript/core/typeElaborationContext.h b/es2panda/typescript/core/typeElaborationContext.h new file mode 100644 index 0000000000000000000000000000000000000000..641f20864b29ad88f93026cf5e5643b56657daa7 --- /dev/null +++ b/es2panda/typescript/core/typeElaborationContext.h @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ES2PANDA_TYPESCIRPT_CORE_TYPE_ELABORATION_CONTEXT_H +#define ES2PANDA_TYPESCIRPT_CORE_TYPE_ELABORATION_CONTEXT_H + +#include +#include + +#include + +namespace panda::es2panda::ir { +class Expression; +class SpreadElement; +} // namespace panda::es2panda::ir + +namespace panda::es2panda::checker { +class Type; + +class ElaborationContext { +public: + ElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, + const lexer::SourcePosition &startPos) + : checker_(checker), + targetType_(targetType), + sourceType_(sourceType), + sourceNode_(sourceNode), + startPos_(startPos), + potentialTypes_(checker->Allocator()->Adapter()) + { + } + + virtual void Start() = 0; + virtual void RemoveUnnecessaryTypes() = 0; + + Type *GetBestMatchingType(Type *indexType, const ir::Expression *sourceNode); + +protected: + Checker *checker_; + Type *targetType_; + Type *sourceType_; + const ir::Expression *sourceNode_; + const lexer::SourcePosition startPos_; + ArenaVector potentialTypes_; +}; + +class ArrayElaborationContext : public ElaborationContext { +public: + ArrayElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, + const lexer::SourcePosition &startPos) + : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) + { + } + + void Start() override; + void RemoveUnnecessaryTypes() override; + +private: + uint32_t index_ {0}; +}; + +class ObjectElaborationContext : public ElaborationContext { +public: + ObjectElaborationContext(Checker *checker, Type *targetType, Type *sourceType, const ir::Expression *sourceNode, + const lexer::SourcePosition &startPos) + : ElaborationContext(checker, targetType, sourceType, sourceNode, startPos) + { + } + + void Start() override; + void RemoveUnnecessaryTypes() override; +}; +} // namespace panda::es2panda::checker + +#endif diff --git a/es2panda/typescript/core/typeRelation.cpp b/es2panda/typescript/core/typeRelation.cpp index 22363fdf3b3407bf4db6c292f1a96ef4e8afdffb..74a349e67634e8e225b39ca79f8f7a9aa2323a56 100644 --- a/es2panda/typescript/core/typeRelation.cpp +++ b/es2panda/typescript/core/typeRelation.cpp @@ -31,13 +31,13 @@ bool Checker::IsAllTypesAssignableTo(Type *source, Type *target) return relation_->IsAssignableTo(source, target); } -bool Checker::IsTypeIdenticalTo(const Type *source, const Type *target) const +bool Checker::IsTypeIdenticalTo(Type *source, Type *target) { return relation_->IsIdenticalTo(source, target); } -bool Checker::IsTypeIdenticalTo(const Type *source, const Type *target, const std::string &errMsg, - const lexer::SourcePosition &errPos) const +bool Checker::IsTypeIdenticalTo(Type *source, Type *target, const std::string &errMsg, + const lexer::SourcePosition &errPos) { if (!IsTypeIdenticalTo(source, target)) { relation_->RaiseError(errMsg, errPos); @@ -46,9 +46,8 @@ bool Checker::IsTypeIdenticalTo(const Type *source, const Type *target, const st return true; } -bool Checker::IsTypeIdenticalTo(const Type *source, const Type *target, - std::initializer_list list, - const lexer::SourcePosition &errPos) const +bool Checker::IsTypeIdenticalTo(Type *source, Type *target, std::initializer_list list, + const lexer::SourcePosition &errPos) { if (!IsTypeIdenticalTo(source, target)) { relation_->RaiseError(list, errPos); @@ -57,13 +56,13 @@ bool Checker::IsTypeIdenticalTo(const Type *source, const Type *target, return true; } -bool Checker::IsTypeAssignableTo(const Type *source, const Type *target) const +bool Checker::IsTypeAssignableTo(Type *source, Type *target) { return relation_->IsAssignableTo(source, target); } -bool Checker::IsTypeAssignableTo(const Type *source, const Type *target, const std::string &errMsg, - const lexer::SourcePosition &errPos) const +bool Checker::IsTypeAssignableTo(Type *source, Type *target, const std::string &errMsg, + const lexer::SourcePosition &errPos) { if (!IsTypeAssignableTo(source, target)) { relation_->RaiseError(errMsg, errPos); @@ -72,9 +71,8 @@ bool Checker::IsTypeAssignableTo(const Type *source, const Type *target, const s return true; } -bool Checker::IsTypeAssignableTo(const Type *source, const Type *target, - std::initializer_list list, - const lexer::SourcePosition &errPos) const +bool Checker::IsTypeAssignableTo(Type *source, Type *target, std::initializer_list list, + const lexer::SourcePosition &errPos) { if (!IsTypeAssignableTo(source, target)) { relation_->RaiseError(list, errPos); @@ -83,13 +81,13 @@ bool Checker::IsTypeAssignableTo(const Type *source, const Type *target, return true; } -bool Checker::IsTypeComparableTo(const Type *source, const Type *target) const +bool Checker::IsTypeComparableTo(Type *source, Type *target) { return relation_->IsComparableTo(source, target); } -bool Checker::IsTypeComparableTo(const Type *source, const Type *target, const std::string &errMsg, - const lexer::SourcePosition &errPos) const +bool Checker::IsTypeComparableTo(Type *source, Type *target, const std::string &errMsg, + const lexer::SourcePosition &errPos) { if (!IsTypeComparableTo(source, target)) { relation_->RaiseError(errMsg, errPos); @@ -98,9 +96,8 @@ bool Checker::IsTypeComparableTo(const Type *source, const Type *target, const s return true; } -bool Checker::IsTypeComparableTo(const Type *source, const Type *target, - std::initializer_list list, - const lexer::SourcePosition &errPos) const +bool Checker::IsTypeComparableTo(Type *source, Type *target, std::initializer_list list, + const lexer::SourcePosition &errPos) { if (!IsTypeComparableTo(source, target)) { relation_->RaiseError(list, errPos); @@ -109,12 +106,12 @@ bool Checker::IsTypeComparableTo(const Type *source, const Type *target, return true; } -bool Checker::AreTypesComparable(const Type *source, const Type *target) const +bool Checker::AreTypesComparable(Type *source, Type *target) { return IsTypeComparableTo(source, target) || IsTypeComparableTo(target, source); } -bool Checker::IsTypeEqualityComparableTo(const Type *source, const Type *target) const +bool Checker::IsTypeEqualityComparableTo(Type *source, Type *target) { return target->HasTypeFlag(TypeFlag::NULLABLE) || IsTypeComparableTo(source, target); } diff --git a/es2panda/typescript/core/util.cpp b/es2panda/typescript/core/util.cpp index 155db3b9ef463a8867ddcad9982496ad8e8b15c4..ccf60ea4f8c215cfb97c1ed5eb88dddcc790ba5f 100644 --- a/es2panda/typescript/core/util.cpp +++ b/es2panda/typescript/core/util.cpp @@ -17,11 +17,34 @@ #include #include #include +#include #include namespace panda::es2panda::checker { +const ir::TSQualifiedName *Checker::ResolveLeftMostQualifiedName(const ir::TSQualifiedName *qualifiedName) +{ + const ir::TSQualifiedName *iter = qualifiedName; + + while (iter->Left()->IsTSQualifiedName()) { + iter = iter->Left()->AsTSQualifiedName(); + } + + return iter; +} + +const ir::MemberExpression *Checker::ResolveLeftMostMemberExpression(const ir::MemberExpression *expr) +{ + const ir::MemberExpression *iter = expr; + + while (iter->Object()->IsMemberExpression()) { + iter = iter->Object()->AsMemberExpression(); + } + + return iter; +} + bool Checker::InAssignment(const ir::AstNode *node) { const ir::AstNode *parent = node; @@ -69,39 +92,6 @@ bool Checker::IsAssignmentOperator(lexer::TokenType op) } } -Type *Checker::GetBaseTypeOfLiteralType(Type *type) -{ - if (type->IsStringLiteralType()) { - return GlobalStringType(); - } - - if (type->IsNumberLiteralType()) { - return GlobalNumberType(); - } - - if (type->IsBooleanLiteralType()) { - return GlobalBooleanType(); - } - - if (type->IsBigintLiteralType()) { - return GlobalBigintType(); - } - - if (type->IsUnionType()) { - std::vector &constituentTypes = type->AsUnionType()->ConstituentTypes(); - std::vector newConstituentTypes; - - newConstituentTypes.reserve(constituentTypes.size()); - for (auto *it : constituentTypes) { - newConstituentTypes.push_back(GetBaseTypeOfLiteralType(it)); - } - - return CreateUnionType(std::move(newConstituentTypes)); - } - - return type; -} - bool Checker::IsLiteralType(const Type *type) { if (type->IsBooleanType()) { @@ -109,7 +99,7 @@ bool Checker::IsLiteralType(const Type *type) } if (type->IsUnionType()) { - std::vector constituentTypes = type->AsUnionType()->ConstituentTypes(); + auto &constituentTypes = type->AsUnionType()->ConstituentTypes(); bool result = true; for (auto *it : constituentTypes) { result &= it->HasTypeFlag(TypeFlag::UNIT); @@ -136,15 +126,18 @@ const ir::AstNode *Checker::FindAncestorGivenByType(const ir::AstNode *node, ir: return node; } -void Checker::CheckNonNullType(Type *type, lexer::SourcePosition lineInfo) +const ir::AstNode *Checker::FindAncestorUntilGivenType(const ir::AstNode *node, ir::AstNodeType stop) { - if (type->IsNullType()) { - ThrowTypeError("Object is possibly 'null'.", lineInfo); - } + while (node->Parent()->Type() != stop) { + if (node->Parent()) { + node = node->Parent(); + continue; + } - if (type->IsUndefinedType()) { - ThrowTypeError("Object is possibly 'undefined'.", lineInfo); + return nullptr; } + + return node; } bool Checker::MaybeTypeOfKind(const Type *type, TypeFlag flags) @@ -155,7 +148,7 @@ bool Checker::MaybeTypeOfKind(const Type *type, TypeFlag flags) if (type->HasTypeFlag(TypeFlag::UNION_OR_INTERSECTION)) { if (type->IsUnionType()) { - const std::vector &constituentTypes = type->AsUnionType()->ConstituentTypes(); + const auto &constituentTypes = type->AsUnionType()->ConstituentTypes(); for (auto *it : constituentTypes) { if (MaybeTypeOfKind(it, flags)) { return true; @@ -175,7 +168,7 @@ bool Checker::MaybeTypeOfKind(const Type *type, ObjectType::ObjectTypeKind kind) if (type->HasTypeFlag(TypeFlag::UNION_OR_INTERSECTION)) { if (type->IsUnionType()) { - const std::vector &constituentTypes = type->AsUnionType()->ConstituentTypes(); + const auto &constituentTypes = type->AsUnionType()->ConstituentTypes(); for (auto *it : constituentTypes) { if (MaybeTypeOfKind(it, kind)) { return true; @@ -217,11 +210,4 @@ bool Checker::IsStringLike(const ir::Expression *expr) return false; } -void Checker::CheckTruthinessOfType(Type *type, lexer::SourcePosition lineInfo) -{ - if (type->IsVoidType()) { - ThrowTypeError("An expression of type void cannot be tested for truthiness", lineInfo); - } -} - } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/anyType.cpp b/es2panda/typescript/types/anyType.cpp index 2ff37e3073cb0aa5c082e35e31c52fbf6ec8b37f..c1e3a198ef3361072c7d95735ab2e08bdb3fa8c2 100644 --- a/es2panda/typescript/types/anyType.cpp +++ b/es2panda/typescript/types/anyType.cpp @@ -17,26 +17,24 @@ namespace panda::es2panda::checker { -AnyType::AnyType() : Type(TypeFlag::ANY) {} - void AnyType::ToString(std::stringstream &ss) const { ss << "any"; } -void AnyType::Identical(TypeRelation *relation, const Type *other) const +void AnyType::Identical(TypeRelation *relation, Type *other) { if (other->IsAnyType()) { relation->Result(true); } } -void AnyType::AssignmentTarget(TypeRelation *relation, [[maybe_unused]] const Type *source) const +void AnyType::AssignmentTarget(TypeRelation *relation, [[maybe_unused]] Type *source) { relation->Result(true); } -bool AnyType::AssignmentSource(TypeRelation *relation, [[maybe_unused]] const Type *target) const +bool AnyType::AssignmentSource(TypeRelation *relation, [[maybe_unused]] Type *target) { relation->Result(true); return true; diff --git a/es2panda/typescript/types/anyType.h b/es2panda/typescript/types/anyType.h index cf8800f8f5d2a9d8cf9675e45813021abcf51ed3..56f2631d8e8c55ca959730fe8938df827f4b40ec 100644 --- a/es2panda/typescript/types/anyType.h +++ b/es2panda/typescript/types/anyType.h @@ -22,12 +22,12 @@ namespace panda::es2panda::checker { class AnyType : public Type { public: - AnyType(); + AnyType() : Type(TypeFlag::ANY) {} void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; - bool AssignmentSource(TypeRelation *relation, const Type *target) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; + bool AssignmentSource(TypeRelation *relation, Type *target) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/arrayType.cpp b/es2panda/typescript/types/arrayType.cpp index 531131b3514bfb935056e951328f50b7a935ea49..959507c354c920da87a339692262b2a846c7bf49 100644 --- a/es2panda/typescript/types/arrayType.cpp +++ b/es2panda/typescript/types/arrayType.cpp @@ -20,18 +20,6 @@ namespace panda::es2panda::checker { -ArrayType::ArrayType(Type *elementType) : Type(TypeFlag::ARRAY), element_(elementType) {} - -Type *ArrayType::ElementType() -{ - return element_; -} - -const Type *ArrayType::ElementType() const -{ - return element_; -} - void ArrayType::ToString(std::stringstream &ss) const { bool elemIsUnion = (element_->TypeFlags() == TypeFlag::UNION); @@ -45,21 +33,20 @@ void ArrayType::ToString(std::stringstream &ss) const ss << "[]"; } -void ArrayType::Identical(TypeRelation *relation, const Type *other) const +void ArrayType::Identical(TypeRelation *relation, Type *other) { if (other->IsArrayType()) { relation->IsIdenticalTo(element_, other->AsArrayType()->ElementType()); } } -void ArrayType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void ArrayType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsArrayType()) { - const Type *targetElementType = source->AsArrayType()->ElementType(); - relation->IsAssignableTo(targetElementType, element_); + relation->IsAssignableTo(source->AsArrayType()->ElementType(), element_); } else if (source->IsObjectType() && source->AsObjectType()->IsTupleType()) { - const ObjectType *sourceObj = source->AsObjectType(); - for (const auto *it : sourceObj->Properties()) { + ObjectType *sourceObj = source->AsObjectType(); + for (auto *it : sourceObj->Properties()) { if (!relation->IsAssignableTo(it->TsType(), element_)) { return; } diff --git a/es2panda/typescript/types/arrayType.h b/es2panda/typescript/types/arrayType.h index a28df06fbe47ba774dedda3b02429c3efc1788f4..a0537a35bd5be34816ffbf6d25bf06ea00e00854 100644 --- a/es2panda/typescript/types/arrayType.h +++ b/es2panda/typescript/types/arrayType.h @@ -22,14 +22,21 @@ namespace panda::es2panda::checker { class ArrayType : public Type { public: - explicit ArrayType(Type *elementType); + explicit ArrayType(Type *elementType) : Type(TypeFlag::ARRAY), element_(elementType) {} - Type *ElementType(); - const Type *ElementType() const; + Type *ElementType() + { + return element_; + } + + const Type *ElementType() const + { + return element_; + } void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; diff --git a/es2panda/typescript/types/bigintLiteralType.cpp b/es2panda/typescript/types/bigintLiteralType.cpp index 875731aaf7e627c83c87ba359a5b27855f6efcec..9464ba1ee2fc9a360cc1100acbd4e7c0b9b6824b 100644 --- a/es2panda/typescript/types/bigintLiteralType.cpp +++ b/es2panda/typescript/types/bigintLiteralType.cpp @@ -17,21 +17,6 @@ namespace panda::es2panda::checker { -BigintLiteralType::BigintLiteralType(util::StringView value, bool negative) - : Type(TypeFlag::BIGINT_LITERAL), value_(value), negative_(negative) -{ -} - -const util::StringView &BigintLiteralType::Value() const -{ - return value_; -} - -bool BigintLiteralType::Negative() const -{ - return negative_; -} - void BigintLiteralType::ToString(std::stringstream &ss) const { ss << value_; @@ -42,7 +27,7 @@ void BigintLiteralType::ToStringAsSrc(std::stringstream &ss) const ss << "bigint"; } -void BigintLiteralType::Identical(TypeRelation *relation, const Type *other) const +void BigintLiteralType::Identical(TypeRelation *relation, Type *other) { if (other->IsBigintLiteralType()) { if (negative_ == other->AsBigintLiteralType()->Negative()) { @@ -51,10 +36,7 @@ void BigintLiteralType::Identical(TypeRelation *relation, const Type *other) con } } -void BigintLiteralType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, - [[maybe_unused]] const Type *source) const -{ -} +void BigintLiteralType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *source) {} TypeFacts BigintLiteralType::GetTypeFacts() const { diff --git a/es2panda/typescript/types/bigintLiteralType.h b/es2panda/typescript/types/bigintLiteralType.h index e5d65269e00f8506c166e98084e4887f26e3474e..d0e240558af0a54131b743777c4136187bc3ec71 100644 --- a/es2panda/typescript/types/bigintLiteralType.h +++ b/es2panda/typescript/types/bigintLiteralType.h @@ -22,14 +22,25 @@ namespace panda::es2panda::checker { class BigintLiteralType : public Type { public: - BigintLiteralType(util::StringView value, bool negative); + BigintLiteralType(util::StringView value, bool negative) + : Type(TypeFlag::BIGINT_LITERAL), value_(value), negative_(negative) + { + } + + const util::StringView &Value() const + { + return value_; + } + + bool Negative() const + { + return negative_; + } - const util::StringView &Value() const; - bool Negative() const; void ToString(std::stringstream &ss) const override; void ToStringAsSrc(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; diff --git a/es2panda/typescript/types/bigintType.cpp b/es2panda/typescript/types/bigintType.cpp index 448448a5eee70ed7b371121c0e66fc90ec647213..15278ceae1539c7ad56c20e91957f285c3332139 100644 --- a/es2panda/typescript/types/bigintType.cpp +++ b/es2panda/typescript/types/bigintType.cpp @@ -17,21 +17,19 @@ namespace panda::es2panda::checker { -BigintType::BigintType() : Type(TypeFlag::BIGINT) {} - void BigintType::ToString(std::stringstream &ss) const { ss << "bigint"; } -void BigintType::Identical(TypeRelation *relation, const Type *other) const +void BigintType::Identical(TypeRelation *relation, Type *other) { if (other->IsBigintType()) { relation->Result(true); } } -void BigintType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void BigintType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsBigintLiteralType()) { relation->Result(true); diff --git a/es2panda/typescript/types/bigintType.h b/es2panda/typescript/types/bigintType.h index 948a73ee732dbddddf3550392b649c6e7adea63e..dc0df778945c318729776f52d9efd7bea99b1fd8 100644 --- a/es2panda/typescript/types/bigintType.h +++ b/es2panda/typescript/types/bigintType.h @@ -22,11 +22,11 @@ namespace panda::es2panda::checker { class BigintType : public Type { public: - BigintType(); + BigintType() : Type(TypeFlag::BIGINT) {} void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/booleanLiteralType.cpp b/es2panda/typescript/types/booleanLiteralType.cpp index 3c40713bc8c803b1b98d41d02f3a977b203f3b21..b8b0d4a87766e139667cb761bfcc7d8f3836b5db 100644 --- a/es2panda/typescript/types/booleanLiteralType.cpp +++ b/es2panda/typescript/types/booleanLiteralType.cpp @@ -17,13 +17,6 @@ namespace panda::es2panda::checker { -BooleanLiteralType::BooleanLiteralType(bool value) : Type(TypeFlag::BOOLEAN_LITERAL), value_(value) {} - -bool BooleanLiteralType::Value() const -{ - return value_; -} - void BooleanLiteralType::ToString(std::stringstream &ss) const { if (value_) { @@ -39,17 +32,14 @@ void BooleanLiteralType::ToStringAsSrc(std::stringstream &ss) const ss << "boolean"; } -void BooleanLiteralType::Identical(TypeRelation *relation, const Type *other) const +void BooleanLiteralType::Identical(TypeRelation *relation, Type *other) { if (other->IsBooleanLiteralType()) { relation->Result(other->AsBooleanLiteralType()->Value()); } } -void BooleanLiteralType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, - [[maybe_unused]] const Type *source) const -{ -} +void BooleanLiteralType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *source) {} TypeFacts BooleanLiteralType::GetTypeFacts() const { diff --git a/es2panda/typescript/types/booleanLiteralType.h b/es2panda/typescript/types/booleanLiteralType.h index 2a241c84bd1072b957e991a679f8a49dd844ef10..c2654d08523f6ddc0dd987bb669994a8855291b7 100644 --- a/es2panda/typescript/types/booleanLiteralType.h +++ b/es2panda/typescript/types/booleanLiteralType.h @@ -22,13 +22,17 @@ namespace panda::es2panda::checker { class BooleanLiteralType : public Type { public: - explicit BooleanLiteralType(bool value); + explicit BooleanLiteralType(bool value) : Type(TypeFlag::BOOLEAN_LITERAL), value_(value) {} + + bool Value() const + { + return value_; + } - bool Value() const; void ToString(std::stringstream &ss) const override; void ToStringAsSrc(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; diff --git a/es2panda/typescript/types/booleanType.cpp b/es2panda/typescript/types/booleanType.cpp index 9ad91f8285a22581c0a158bdae7330b7be4f476c..e6bc2b39ce2c10cbe7825a793de7bf6323558df9 100644 --- a/es2panda/typescript/types/booleanType.cpp +++ b/es2panda/typescript/types/booleanType.cpp @@ -17,21 +17,19 @@ namespace panda::es2panda::checker { -BooleanType::BooleanType() : Type(TypeFlag::BOOLEAN) {} - void BooleanType::ToString(std::stringstream &ss) const { ss << "boolean"; } -void BooleanType::Identical(TypeRelation *relation, const Type *other) const +void BooleanType::Identical(TypeRelation *relation, Type *other) { if (other->IsBooleanType()) { relation->Result(true); } } -void BooleanType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void BooleanType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsBooleanLiteralType()) { relation->Result(true); diff --git a/es2panda/typescript/types/booleanType.h b/es2panda/typescript/types/booleanType.h index ef29e426247d778bc7fcf746a9303d6cf625479c..2585fbaa4e12df6252a89d53bb573b0a47639d2f 100644 --- a/es2panda/typescript/types/booleanType.h +++ b/es2panda/typescript/types/booleanType.h @@ -22,11 +22,11 @@ namespace panda::es2panda::checker { class BooleanType : public Type { public: - BooleanType(); + BooleanType() : Type(TypeFlag::BOOLEAN) {} void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/constructorType.cpp b/es2panda/typescript/types/constructorType.cpp index a4e91da1d019472e239bcbd4000a936253d2174c..d8c1b8be73bf80feb5c9394c8ae255d8490e5cc8 100644 --- a/es2panda/typescript/types/constructorType.cpp +++ b/es2panda/typescript/types/constructorType.cpp @@ -19,8 +19,6 @@ namespace panda::es2panda::checker { -ConstructorType::ConstructorType(ObjectDescriptor *desc) : ObjectType(ObjectType::ObjectTypeKind::FUNCTION, desc) {} - void ConstructorType::ToString(std::stringstream &ss) const { if (desc_->constructSignatures.size() > 1) { @@ -46,7 +44,7 @@ TypeFacts ConstructorType::GetTypeFacts() const Type *ConstructorType::Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) { - ObjectDescriptor *copiedDesc = allocator->New(); + ObjectDescriptor *copiedDesc = allocator->New(allocator); desc_->Copy(allocator, copiedDesc, relation, globalTypes); return allocator->New(copiedDesc); } diff --git a/es2panda/typescript/types/constructorType.h b/es2panda/typescript/types/constructorType.h index f8f62a2e86a6440803d689960433d4dc00295a22..1fea2a209c5f22b841aeecc1c7d1c5bb8f1e4b7d 100644 --- a/es2panda/typescript/types/constructorType.h +++ b/es2panda/typescript/types/constructorType.h @@ -22,7 +22,7 @@ namespace panda::es2panda::checker { class ConstructorType : public ObjectType { public: - explicit ConstructorType(ObjectDescriptor *desc); + explicit ConstructorType(ObjectDescriptor *desc) : ObjectType(ObjectType::ObjectTypeKind::FUNCTION, desc) {} void ToString(std::stringstream &ss) const override; TypeFacts GetTypeFacts() const override; diff --git a/es2panda/typescript/types/enumLiteralType.cpp b/es2panda/typescript/types/enumLiteralType.cpp index 029e039970545c1653304869f31c6badec167c12..290e9997effb4cfdbec5de155faa0d41b377b217 100644 --- a/es2panda/typescript/types/enumLiteralType.cpp +++ b/es2panda/typescript/types/enumLiteralType.cpp @@ -20,21 +20,6 @@ namespace panda::es2panda::checker { -EnumLiteralType::EnumLiteralType(util::StringView name, binder::Scope *scope, EnumLiteralTypeKind kind) - : Type(TypeFlag::ENUM_LITERAL), name_(name), scope_(scope), kind_(kind) -{ -} - -binder::Scope *EnumLiteralType::Scope() -{ - return scope_; -} - -const binder::Scope *EnumLiteralType::Scope() const -{ - return scope_; -} - void EnumLiteralType::ToString(std::stringstream &ss) const { ss << name_; @@ -45,14 +30,9 @@ void EnumLiteralType::ToStringAsSrc(std::stringstream &ss) const ss << "typeof " << name_; } -EnumLiteralType::EnumLiteralTypeKind EnumLiteralType::Kind() const -{ - return kind_; -} - -void EnumLiteralType::Identical([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *other) const {} +void EnumLiteralType::Identical([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *other) {} -void EnumLiteralType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void EnumLiteralType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsEnumType()) { const EnumType *sourceEnumType = source->AsEnumType(); diff --git a/es2panda/typescript/types/enumLiteralType.h b/es2panda/typescript/types/enumLiteralType.h index 5af0ec4a4f4334233e41705ffd0ed7540e92586c..7a6de9ca3b89d102327d02d7694798892d54244a 100644 --- a/es2panda/typescript/types/enumLiteralType.h +++ b/es2panda/typescript/types/enumLiteralType.h @@ -27,16 +27,31 @@ namespace panda::es2panda::checker { class EnumLiteralType : public Type { public: enum class EnumLiteralTypeKind { NUMERIC, LITERAL }; - EnumLiteralType(util::StringView name, binder::Scope *scope, EnumLiteralTypeKind kind); - binder::Scope *Scope(); - const binder::Scope *Scope() const; - EnumLiteralTypeKind Kind() const; + EnumLiteralType(util::StringView name, binder::Scope *scope, EnumLiteralTypeKind kind) + : Type(TypeFlag::ENUM_LITERAL), name_(name), scope_(scope), kind_(kind) + { + } + + binder::Scope *Scope() + { + return scope_; + } + + const binder::Scope *Scope() const + { + return scope_; + } + + EnumLiteralTypeKind Kind() const + { + return kind_; + } void ToString(std::stringstream &ss) const override; void ToStringAsSrc(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; diff --git a/es2panda/typescript/types/enumType.cpp b/es2panda/typescript/types/enumType.cpp index 040b2b35c1c0ec6eccccdca9351c28c4b2daba70..34285b21fd1fa3f44f4639f986b599e8ed4a8631 100644 --- a/es2panda/typescript/types/enumType.cpp +++ b/es2panda/typescript/types/enumType.cpp @@ -19,32 +19,17 @@ namespace panda::es2panda::checker { -EnumType::EnumType(binder::Variable *enumLiteralVar, binder::EnumVariable *enumVar) - : Type(TypeFlag::ENUM), enumLiteralVar_(enumLiteralVar), enumVar_(enumVar) -{ -} - -const binder::Variable *EnumType::EnumLiteralVar() const -{ - return enumLiteralVar_; -} - -const binder::EnumVariable *EnumType::EnumVar() const -{ - return enumVar_; -} - void EnumType::ToString(std::stringstream &ss) const { ss << enumLiteralVar_->Name() << "." << enumVar_->Name(); } -void EnumType::Identical([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *other) const +void EnumType::Identical([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *other) { // TODO(aszilagyi) } -void EnumType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void EnumType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsNumberLiteralType()) { relation->Result(true); diff --git a/es2panda/typescript/types/enumType.h b/es2panda/typescript/types/enumType.h index 1038eba2a581ac8e5b9743f1b5913e1c847d7fb3..26efebc86d22038e7c8afe9a00ecf40e3f85f0da 100644 --- a/es2panda/typescript/types/enumType.h +++ b/es2panda/typescript/types/enumType.h @@ -26,14 +26,24 @@ namespace panda::es2panda::checker { class EnumType : public Type { public: - EnumType(binder::Variable *enumLiteralVar, binder::EnumVariable *enumVar); + EnumType(binder::Variable *enumLiteralVar, binder::EnumVariable *enumVar) + : Type(TypeFlag::ENUM), enumLiteralVar_(enumLiteralVar), enumVar_(enumVar) + { + } - const binder::Variable *EnumLiteralVar() const; - const binder::EnumVariable *EnumVar() const; + const binder::Variable *EnumLiteralVar() const + { + return enumLiteralVar_; + } + + const binder::EnumVariable *EnumVar() const + { + return enumVar_; + } void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; diff --git a/es2panda/typescript/types/functionType.cpp b/es2panda/typescript/types/functionType.cpp index bdad12e4db3ca7f6d5a2986003daa5befbb3672d..5e5afdd7a8f874db6466468872c7d2e9ea8cecdc 100644 --- a/es2panda/typescript/types/functionType.cpp +++ b/es2panda/typescript/types/functionType.cpp @@ -19,8 +19,6 @@ namespace panda::es2panda::checker { -FunctionType::FunctionType(ObjectDescriptor *desc) : ObjectType(ObjectType::ObjectTypeKind::FUNCTION, desc) {} - void FunctionType::ToString(std::stringstream &ss) const { static std::unordered_set stack; @@ -56,7 +54,7 @@ TypeFacts FunctionType::GetTypeFacts() const Type *FunctionType::Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) { - ObjectDescriptor *copiedDesc = allocator->New(); + ObjectDescriptor *copiedDesc = allocator->New(allocator); desc_->Copy(allocator, copiedDesc, relation, globalTypes); return allocator->New(copiedDesc); } diff --git a/es2panda/typescript/types/functionType.h b/es2panda/typescript/types/functionType.h index 751996d04129a07ac78a1db7204c219536c4500e..02b88c35c17ace0cc60cea9b3a8a87ccb7139087 100644 --- a/es2panda/typescript/types/functionType.h +++ b/es2panda/typescript/types/functionType.h @@ -23,7 +23,7 @@ namespace panda::es2panda::checker { class FunctionType : public ObjectType { public: - explicit FunctionType(ObjectDescriptor *desc); + explicit FunctionType(ObjectDescriptor *desc) : ObjectType(ObjectType::ObjectTypeKind::FUNCTION, desc) {} void ToString(std::stringstream &ss) const override; TypeFacts GetTypeFacts() const override; diff --git a/es2panda/typescript/types/globalTypesHolder.cpp b/es2panda/typescript/types/globalTypesHolder.cpp index c944b943cea04b9cb005b095daf3cb407d8def35..b3078e90bc9df86c3859e3964d926d9e4b3e42c5 100644 --- a/es2panda/typescript/types/globalTypesHolder.cpp +++ b/es2panda/typescript/types/globalTypesHolder.cpp @@ -52,17 +52,20 @@ GlobalTypesHolder::GlobalTypesHolder(ArenaAllocator *allocator) globalTypes_[static_cast(GlobalTypeId::FALSE_ID)] = allocator->New(false); globalTypes_[static_cast(GlobalTypeId::TRUE_ID)] = allocator->New(true); globalTypes_[static_cast(GlobalTypeId::NUMBER_OR_BIGINT)] = - allocator->New(std::initializer_list {GlobalNumberType(), GlobalBigintType()}); + allocator->New(allocator, std::initializer_list {GlobalNumberType(), GlobalBigintType()}); globalTypes_[static_cast(GlobalTypeId::STRING_OR_NUMBER)] = - allocator->New(std::initializer_list {GlobalStringType(), GlobalNumberType()}); + allocator->New(allocator, std::initializer_list {GlobalStringType(), GlobalNumberType()}); globalTypes_[static_cast(GlobalTypeId::ZERO)] = allocator->New(0); globalTypes_[static_cast(GlobalTypeId::EMPTY_STRING)] = allocator->New(""); globalTypes_[static_cast(GlobalTypeId::ZERO_BIGINT)] = allocator->New("0n", false); globalTypes_[static_cast(GlobalTypeId::PRIMITIVE)] = allocator->New( + allocator, std::initializer_list {GlobalNumberType(), GlobalStringType(), GlobalBigintType(), GlobalBooleanType(), GlobalVoidType(), GlobalUndefinedType(), GlobalNullType()}); - globalTypes_[static_cast(GlobalTypeId::EMPTY_TUPLE)] = allocator->New(); + globalTypes_[static_cast(GlobalTypeId::EMPTY_TUPLE)] = allocator->New(allocator); globalTypes_[static_cast(GlobalTypeId::EMPTY_OBJECT)] = allocator->New(); + globalTypes_[static_cast(GlobalTypeId::RESOLVING_RETURN_TYPE)] = allocator->New(); + globalTypes_[static_cast(GlobalTypeId::ERROR_TYPE)] = allocator->New(); } Type *GlobalTypesHolder::GlobalNumberType() @@ -170,4 +173,14 @@ Type *GlobalTypesHolder::GlobalEmptyObjectType() return globalTypes_.at(static_cast(GlobalTypeId::EMPTY_OBJECT)); } +Type *GlobalTypesHolder::GlobalResolvingReturnType() +{ + return globalTypes_.at(static_cast(GlobalTypeId::RESOLVING_RETURN_TYPE)); +} + +Type *GlobalTypesHolder::GlobalErrorType() +{ + return globalTypes_.at(static_cast(GlobalTypeId::ERROR_TYPE)); +} + } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/globalTypesHolder.h b/es2panda/typescript/types/globalTypesHolder.h index 83fb925fb4ae75e589326667e2ecc841b884b000..fefecfa2e571170cbbf8b1ca16278a4f4855cc5b 100644 --- a/es2panda/typescript/types/globalTypesHolder.h +++ b/es2panda/typescript/types/globalTypesHolder.h @@ -42,6 +42,8 @@ enum class GlobalTypeId { PRIMITIVE, EMPTY_TUPLE, EMPTY_OBJECT, + RESOLVING_RETURN_TYPE, + ERROR_TYPE, COUNT }; @@ -73,6 +75,8 @@ public: Type *GlobalPrimitiveType(); Type *GlobalEmptyTupleType(); Type *GlobalEmptyObjectType(); + Type *GlobalResolvingReturnType(); + Type *GlobalErrorType(); private: std::array(GlobalTypeId::COUNT)> globalTypes_ {}; diff --git a/es2panda/typescript/types/indexInfo.cpp b/es2panda/typescript/types/indexInfo.cpp index 5aad2d190144c3621506368749e444db5db2d0ff..180ce3629c0e67c0d87bc8424e04a402f041b2fa 100644 --- a/es2panda/typescript/types/indexInfo.cpp +++ b/es2panda/typescript/types/indexInfo.cpp @@ -19,31 +19,6 @@ namespace panda::es2panda::checker { -IndexInfo::IndexInfo(Type *type, util::StringView paramName, bool readonly) - : type_(type), paramName_(paramName), readonly_(readonly) -{ -} - -Type *IndexInfo::InfoType() -{ - return type_; -} - -const Type *IndexInfo::InfoType() const -{ - return type_; -} - -void IndexInfo::SetInfoType(class Type *type) -{ - type_ = type; -} - -const util::StringView &IndexInfo::ParamName() -{ - return paramName_; -} - IndexInfo *IndexInfo::Copy(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) { return allocator->New(type_->Instantiate(allocator, relation, globalTypes), paramName_, readonly_); @@ -66,19 +41,14 @@ void IndexInfo::ToString(std::stringstream &ss, bool numIndex) const type_->ToString(ss); } -void IndexInfo::Identical(TypeRelation *relation, const IndexInfo *other) const -{ - relation->IsIdenticalTo(type_, other->InfoType()); -} - -void IndexInfo::AssignmentTarget(TypeRelation *relation, const IndexInfo *source) const +void IndexInfo::Identical(TypeRelation *relation, IndexInfo *other) { - relation->IsAssignableTo(source->InfoType(), type_); + relation->IsIdenticalTo(type_, other->GetType()); } -bool IndexInfo::Readonly() const +void IndexInfo::AssignmentTarget(TypeRelation *relation, IndexInfo *source) { - return readonly_; + relation->IsAssignableTo(source->GetType(), type_); } } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/indexInfo.h b/es2panda/typescript/types/indexInfo.h index c20ee43ae4ca8caf045baa4a6033591109da69a2..8646d98d4c6f89156766cb62e34035bd241baba1 100644 --- a/es2panda/typescript/types/indexInfo.h +++ b/es2panda/typescript/types/indexInfo.h @@ -22,26 +22,60 @@ namespace panda::es2panda::checker { class IndexInfo { public: - IndexInfo(Type *type, util::StringView paramName, bool readonly = false); + IndexInfo(Type *type, util::StringView paramName, bool readonly) + : type_(type), paramName_(paramName), readonly_(readonly) + { + } + + IndexInfo(Type *type, util::StringView paramName, bool readonly, const lexer::SourcePosition &pos) + : type_(type), paramName_(paramName), readonly_(readonly), pos_(pos) + { + } + ~IndexInfo() = default; NO_COPY_SEMANTIC(IndexInfo); NO_MOVE_SEMANTIC(IndexInfo); - Type *InfoType(); - const Type *InfoType() const; - bool Readonly() const; - void SetInfoType(Type *type); - const util::StringView &ParamName(); + Type *GetType() + { + return type_; + } + + const Type *GetType() const + { + return type_; + } + + void SetType(Type *type) + { + type_ = type; + } + + const util::StringView &ParamName() + { + return paramName_; + } + + bool Readonly() const + { + return readonly_; + } + + const lexer::SourcePosition &Pos() + { + return pos_; + } void ToString(std::stringstream &ss, bool numIndex = true) const; - void Identical(TypeRelation *relation, const IndexInfo *other) const; - void AssignmentTarget(TypeRelation *relation, const IndexInfo *source) const; + void Identical(TypeRelation *relation, IndexInfo *other); + void AssignmentTarget(TypeRelation *relation, IndexInfo *source); IndexInfo *Copy(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes); private: Type *type_; util::StringView paramName_; bool readonly_; + const lexer::SourcePosition pos_ {}; }; } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/interfaceType.cpp b/es2panda/typescript/types/interfaceType.cpp index 8f1fbb3057210611ab50799cfeff6c179a7d1b02..67d6ddad93b10eacb8d787222d67a173b593a5b6 100644 --- a/es2panda/typescript/types/interfaceType.cpp +++ b/es2panda/typescript/types/interfaceType.cpp @@ -17,70 +17,13 @@ #include #include +#include #include #include namespace panda::es2panda::checker { -InterfaceType::InterfaceType(util::StringView name, ObjectDescriptor *desc) - : ObjectType(ObjectType::ObjectTypeKind::INTERFACE, desc), name_(name) -{ -} - -void InterfaceType::AddBase(ObjectType *base) -{ - bases_.push_back(base); -} - -const std::vector &InterfaceType::Bases() const -{ - return bases_; -} - -const util::StringView &InterfaceType::Name() const -{ - return name_; -} - -void InterfaceType::SetMergedTypeParams(std::pair, size_t> &&mergedTypeParams) -{ - mergedTypeParams_ = std::move(mergedTypeParams); -} - -const std::pair, size_t> &InterfaceType::GetMergedTypeParams() const -{ - return mergedTypeParams_; -} - -void InterfaceType::SetTypeParamTypes(std::vector &&typeParamTypes) -{ - typeParamTypes_ = std::move(typeParamTypes); -} - -const std::vector &InterfaceType::GetTypeParamTypes() const -{ - return typeParamTypes_; -} - -binder::LocalVariable *InterfaceType::GetProperty(const util::StringView &name) const -{ - binder::LocalVariable *resultProp = ObjectType::GetProperty(name); - - if (resultProp) { - return resultProp; - } - - for (auto *base : bases_) { - resultProp = base->GetProperty(name); - if (resultProp) { - return resultProp; - } - } - - return nullptr; -} - void InterfaceType::ToString(std::stringstream &ss) const { ss << name_; @@ -100,45 +43,43 @@ void InterfaceType::ToString(std::stringstream &ss) const } } -void InterfaceType::Identical(TypeRelation *relation, const Type *other) const +void InterfaceType::Identical(TypeRelation *relation, Type *other) { if (!other->IsObjectType() || !other->AsObjectType()->IsInterfaceType()) { return; } - const InterfaceType *otherInterface = other->AsObjectType()->AsInterfaceType(); + InterfaceType *otherInterface = other->AsObjectType()->AsInterfaceType(); - std::vector targetProperties; - CollectProperties(&targetProperties); - - std::vector sourceProperties; - otherInterface->CollectProperties(&sourceProperties); + const ArenaVector &targetProperties = Properties(); + const ArenaVector &sourceProperties = otherInterface->Properties(); if (targetProperties.size() != sourceProperties.size()) { relation->Result(false); return; } - for (const auto *targetProp : targetProperties) { - bool foundProp = std::any_of(sourceProperties.begin(), sourceProperties.end(), - [targetProp, relation](const binder::LocalVariable *sourceProp) { - if (targetProp->Name() == sourceProp->Name()) { - return relation->IsIdenticalTo(targetProp->TsType(), sourceProp->TsType()); - } + for (auto *targetProp : targetProperties) { + bool foundProp = + std::any_of(sourceProperties.begin(), sourceProperties.end(), + [targetProp, relation](binder::LocalVariable *sourceProp) { + if (targetProp->Name() == sourceProp->Name()) { + Type *targetType = relation->GetChecker()->GetTypeOfVariable(targetProp); + Type *sourceType = relation->GetChecker()->GetTypeOfVariable(sourceProp); + return relation->IsIdenticalTo(targetType, sourceType); + } + + return false; + }); - return false; - }); if (!foundProp) { relation->Result(false); return; } } - std::vector targetCallSignatures; - CollectSignatures(&targetCallSignatures, true); - - std::vector sourceCallSignatures; - otherInterface->CollectSignatures(&sourceCallSignatures, true); + const ArenaVector &targetCallSignatures = CallSignatures(); + const ArenaVector &sourceCallSignatures = otherInterface->CallSignatures(); if (targetCallSignatures.size() != sourceCallSignatures.size()) { relation->Result(false); @@ -150,11 +91,8 @@ void InterfaceType::Identical(TypeRelation *relation, const Type *other) const return; } - std::vector targetConstructSignatures; - CollectSignatures(&targetConstructSignatures, false); - - std::vector sourceConstructSignatures; - otherInterface->CollectSignatures(&sourceConstructSignatures, false); + const ArenaVector &targetConstructSignatures = ConstructSignatures(); + const ArenaVector &sourceConstructSignatures = otherInterface->ConstructSignatures(); if (targetConstructSignatures.size() != sourceConstructSignatures.size()) { relation->Result(false); @@ -166,8 +104,8 @@ void InterfaceType::Identical(TypeRelation *relation, const Type *other) const return; } - const IndexInfo *targetNumberInfo = FindIndexInfo(true); - const IndexInfo *sourceNumberInfo = otherInterface->FindIndexInfo(true); + IndexInfo *targetNumberInfo = NumberIndexInfo(); + IndexInfo *sourceNumberInfo = otherInterface->NumberIndexInfo(); if ((targetNumberInfo && !sourceNumberInfo) || (!targetNumberInfo && sourceNumberInfo)) { relation->Result(false); @@ -177,8 +115,8 @@ void InterfaceType::Identical(TypeRelation *relation, const Type *other) const relation->IsIdenticalTo(targetNumberInfo, sourceNumberInfo); if (relation->IsTrue()) { - const IndexInfo *targetStringInfo = FindIndexInfo(false); - const IndexInfo *sourceStringInfo = otherInterface->FindIndexInfo(false); + IndexInfo *targetStringInfo = StringIndexInfo(); + IndexInfo *sourceStringInfo = otherInterface->StringIndexInfo(); if ((targetStringInfo && !sourceStringInfo) || (!targetStringInfo && sourceStringInfo)) { relation->Result(false); @@ -191,11 +129,11 @@ void InterfaceType::Identical(TypeRelation *relation, const Type *other) const Type *InterfaceType::Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) { - ObjectDescriptor *copiedDesc = allocator->New(); + ObjectDescriptor *copiedDesc = allocator->New(allocator); desc_->Copy(allocator, copiedDesc, relation, globalTypes); - Type *newInterfaceType = allocator->New(name_, copiedDesc); + Type *newInterfaceType = allocator->New(allocator, name_, copiedDesc); for (auto *it : bases_) { newInterfaceType->AsObjectType()->AsInterfaceType()->AddBase( @@ -205,14 +143,14 @@ Type *InterfaceType::Instantiate(ArenaAllocator *allocator, TypeRelation *relati return newInterfaceType; } -void InterfaceType::CollectSignatures(std::vector *collectedSignatures, bool collectCallSignatures) const +void InterfaceType::CollectSignatures(ArenaVector *collectedSignatures, bool collectCallSignatures) const { if (collectCallSignatures) { - for (auto *it : CallSignatures()) { + for (auto *it : desc_->callSignatures) { collectedSignatures->push_back(it); } } else { - for (auto *it : ConstructSignatures()) { + for (auto *it : desc_->constructSignatures) { collectedSignatures->push_back(it); } } @@ -222,9 +160,9 @@ void InterfaceType::CollectSignatures(std::vector *collectedSignatu } } -void InterfaceType::CollectProperties(std::vector *collectedPropeties) const +void InterfaceType::CollectProperties(ArenaVector *collectedPropeties) const { - for (auto *currentProp : Properties()) { + for (auto *currentProp : desc_->properties) { bool propAlreadyCollected = false; for (auto *collectedProp : *collectedPropeties) { if (currentProp->Name() == collectedProp->Name()) { @@ -249,10 +187,10 @@ const IndexInfo *InterfaceType::FindIndexInfo(bool findNumberInfo) const { const IndexInfo *foundInfo = nullptr; - if (findNumberInfo && NumberIndexInfo()) { - foundInfo = NumberIndexInfo(); - } else if (!findNumberInfo && StringIndexInfo()) { - foundInfo = StringIndexInfo(); + if (findNumberInfo && desc_->numberIndexInfo) { + foundInfo = desc_->numberIndexInfo; + } else if (!findNumberInfo && desc_->stringIndexInfo) { + foundInfo = desc_->stringIndexInfo; } for (auto it = bases_.begin(); it != bases_.end() && !foundInfo; it++) { @@ -266,10 +204,10 @@ IndexInfo *InterfaceType::FindIndexInfo(bool findNumberInfo) { IndexInfo *foundInfo = nullptr; - if (findNumberInfo && NumberIndexInfo()) { - foundInfo = NumberIndexInfo(); - } else if (!findNumberInfo && StringIndexInfo()) { - foundInfo = StringIndexInfo(); + if (findNumberInfo && desc_->numberIndexInfo) { + foundInfo = desc_->numberIndexInfo; + } else if (!findNumberInfo && desc_->stringIndexInfo) { + foundInfo = desc_->stringIndexInfo; } for (auto it = bases_.begin(); it != bases_.end() && !foundInfo; it++) { diff --git a/es2panda/typescript/types/interfaceType.h b/es2panda/typescript/types/interfaceType.h index f46f3952405ef402abaf4bb424cbb2a922220421..6f1f6ce632998a49f254d4b471842b940f7eddc2 100644 --- a/es2panda/typescript/types/interfaceType.h +++ b/es2panda/typescript/types/interfaceType.h @@ -22,30 +22,127 @@ namespace panda::es2panda::checker { class InterfaceType : public ObjectType { public: - InterfaceType(util::StringView name, ObjectDescriptor *desc); + InterfaceType(ArenaAllocator *allocator, util::StringView name, ObjectDescriptor *desc) + : ObjectType(ObjectType::ObjectTypeKind::INTERFACE, desc), + name_(name), + bases_(allocator->Adapter()), + allocator_(allocator) + { + } - void AddBase(ObjectType *base); - const std::vector &Bases() const; - const util::StringView &Name() const; + void AddBase(ObjectType *base) + { + bases_.push_back(base); + } + + ArenaVector &Bases() + { + return bases_; + } + + const util::StringView &Name() const + { + return name_; + } + + void SetMergedTypeParams(std::pair, size_t> &&mergedTypeParams) + { + mergedTypeParams_ = std::move(mergedTypeParams); + } + + const std::pair, size_t> &GetMergedTypeParams() const + { + return mergedTypeParams_; + } + + void SetTypeParamTypes(std::vector &&typeParamTypes) + { + typeParamTypes_ = std::move(typeParamTypes); + } + + const std::vector &GetTypeParamTypes() const + { + return typeParamTypes_; + } + + binder::LocalVariable *GetProperty(const util::StringView &name, [[maybe_unused]] bool searchInBase) const override + { + binder::LocalVariable *resultProp = ObjectType::GetProperty(name, false); + + if (resultProp) { + return resultProp; + } + + if (!searchInBase) { + return nullptr; + } + + for (auto *base : bases_) { + resultProp = base->GetProperty(name, true); + + if (resultProp) { + return resultProp; + } + } + + return nullptr; + } + + ArenaVector CallSignatures() override + { + ArenaVector signatures(allocator_->Adapter()); + CollectSignatures(&signatures, true); + return signatures; + } + + ArenaVector ConstructSignatures() override + { + ArenaVector signatures(allocator_->Adapter()); + CollectSignatures(&signatures, false); + return signatures; + } + + const IndexInfo *StringIndexInfo() const override + { + return FindIndexInfo(false); + } + + const IndexInfo *NumberIndexInfo() const override + { + return FindIndexInfo(true); + } + + IndexInfo *StringIndexInfo() override + { + return FindIndexInfo(false); + } + + IndexInfo *NumberIndexInfo() override + { + return FindIndexInfo(true); + } + + ArenaVector Properties() override + { + ArenaVector properties(allocator_->Adapter()); + CollectProperties(&properties); + return properties; + } void ToString(std::stringstream &ss) const override; TypeFacts GetTypeFacts() const override; - void Identical(TypeRelation *relation, const Type *other) const override; + void Identical(TypeRelation *relation, Type *other) override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; - binder::LocalVariable *GetProperty(const util::StringView &name) const override; - void SetMergedTypeParams(std::pair, size_t> &&mergedTypeParams); - const std::pair, size_t> &GetMergedTypeParams() const; - void SetTypeParamTypes(std::vector &&typeParamTypes); - const std::vector &GetTypeParamTypes() const; - - void CollectSignatures(std::vector *collectedSignatures, bool collectCallSignatures) const; - void CollectProperties(std::vector *collectedPropeties) const; + + void CollectSignatures(ArenaVector *collectedSignatures, bool collectCallSignatures) const; + void CollectProperties(ArenaVector *collectedPropeties) const; const IndexInfo *FindIndexInfo(bool findNumberInfo) const; IndexInfo *FindIndexInfo(bool findNumberInfo); private: util::StringView name_; - std::vector bases_; + ArenaVector bases_; + ArenaAllocator *allocator_; std::pair, size_t> mergedTypeParams_ {}; std::vector typeParamTypes_ {}; }; diff --git a/es2panda/typescript/types/neverType.cpp b/es2panda/typescript/types/neverType.cpp index b956612204be518d15962da7d9d30537ccb82a94..f67e8404c1af26521741d0e6c5cb04c72c80b8c3 100644 --- a/es2panda/typescript/types/neverType.cpp +++ b/es2panda/typescript/types/neverType.cpp @@ -17,8 +17,6 @@ namespace panda::es2panda::checker { -NeverType::NeverType() : Type(TypeFlag::NEVER) {} - void NeverType::ToString(std::stringstream &ss) const { ss << "never"; @@ -29,19 +27,19 @@ TypeFacts NeverType::GetTypeFacts() const return TypeFacts::NONE; } -void NeverType::Identical(TypeRelation *relation, const Type *other) const +void NeverType::Identical(TypeRelation *relation, Type *other) { if (other->IsNeverType()) { relation->Result(true); } } -void NeverType::AssignmentTarget(TypeRelation *relation, [[maybe_unused]] const Type *source) const +void NeverType::AssignmentTarget(TypeRelation *relation, [[maybe_unused]] Type *source) { relation->Result(false); } -bool NeverType::AssignmentSource(TypeRelation *relation, [[maybe_unused]] const Type *target) const +bool NeverType::AssignmentSource(TypeRelation *relation, [[maybe_unused]] Type *target) { relation->Result(true); return true; diff --git a/es2panda/typescript/types/neverType.h b/es2panda/typescript/types/neverType.h index 36d7370948b282c6b6003523310ae57753114cbd..457e27f1df48616f9eeedddd5ecb1144a32af804 100644 --- a/es2panda/typescript/types/neverType.h +++ b/es2panda/typescript/types/neverType.h @@ -22,13 +22,13 @@ namespace panda::es2panda::checker { class NeverType : public Type { public: - NeverType(); + NeverType() : Type(TypeFlag::NEVER) {} void ToString(std::stringstream &ss) const override; TypeFacts GetTypeFacts() const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; - bool AssignmentSource(TypeRelation *relation, const Type *target) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; + bool AssignmentSource(TypeRelation *relation, Type *target) override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/nonPrimitiveType.cpp b/es2panda/typescript/types/nonPrimitiveType.cpp index ebf523c5e7c68c6151fe993e0c5ceeca98ff6bae..521a1b25b8ef0d366d67b6e1a0b3cda997d1f14b 100644 --- a/es2panda/typescript/types/nonPrimitiveType.cpp +++ b/es2panda/typescript/types/nonPrimitiveType.cpp @@ -17,21 +17,19 @@ namespace panda::es2panda::checker { -NonPrimitiveType::NonPrimitiveType() : Type(TypeFlag::NON_PRIMITIVE) {} - void NonPrimitiveType::ToString(std::stringstream &ss) const { ss << "object"; } -void NonPrimitiveType::Identical(TypeRelation *relation, const Type *other) const +void NonPrimitiveType::Identical(TypeRelation *relation, Type *other) { if (other->IsNonPrimitiveType()) { relation->Result(true); } } -void NonPrimitiveType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void NonPrimitiveType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsObjectType()) { relation->Result(true); diff --git a/es2panda/typescript/types/nonPrimitiveType.h b/es2panda/typescript/types/nonPrimitiveType.h index 2573b895a4a6bd0af7b3743683f4150af3751161..d006456c976e33c7691e10cd553eb0e823f63962 100644 --- a/es2panda/typescript/types/nonPrimitiveType.h +++ b/es2panda/typescript/types/nonPrimitiveType.h @@ -22,12 +22,12 @@ namespace panda::es2panda::checker { class NonPrimitiveType : public Type { public: - NonPrimitiveType(); + NonPrimitiveType() : Type(TypeFlag::NON_PRIMITIVE) {} void ToString(std::stringstream &ss) const override; TypeFacts GetTypeFacts() const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/nullType.cpp b/es2panda/typescript/types/nullType.cpp index 00b4b2c2b6adb1f8c84719b64bcdce2966c5623d..8c53978ed0d064fc6ad132fe52a672f2ae3afbcf 100644 --- a/es2panda/typescript/types/nullType.cpp +++ b/es2panda/typescript/types/nullType.cpp @@ -17,27 +17,25 @@ namespace panda::es2panda::checker { -NullType::NullType() : Type(TypeFlag::NULL_TYPE) {} - void NullType::ToString(std::stringstream &ss) const { ss << "null"; } -void NullType::Identical(TypeRelation *relation, const Type *other) const +void NullType::Identical(TypeRelation *relation, Type *other) { if (other->IsNullType()) { relation->Result(true); } } -bool NullType::AssignmentSource(TypeRelation *relation, [[maybe_unused]] const Type *target) const +bool NullType::AssignmentSource(TypeRelation *relation, [[maybe_unused]] Type *target) { relation->Result(!target->IsNeverType()); return relation->IsTrue(); } -void NullType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *source) const {} +void NullType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *source) {} TypeFacts NullType::GetTypeFacts() const { diff --git a/es2panda/typescript/types/nullType.h b/es2panda/typescript/types/nullType.h index 8d42ec2010cb06ad995169cbd8194e73f9799a73..a0dd6413a03c52b10b8580023b32df69f450c69c 100644 --- a/es2panda/typescript/types/nullType.h +++ b/es2panda/typescript/types/nullType.h @@ -22,12 +22,12 @@ namespace panda::es2panda::checker { class NullType : public Type { public: - NullType(); + NullType() : Type(TypeFlag::NULL_TYPE) {} void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - bool AssignmentSource(TypeRelation *relation, const Type *target) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + bool AssignmentSource(TypeRelation *relation, Type *target) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/numberLiteralType.cpp b/es2panda/typescript/types/numberLiteralType.cpp index 30317a26bb5e4e42f7b95731fcfd825310721f40..f7ef9c1893eb0898dc837d555e7b110adb50887a 100644 --- a/es2panda/typescript/types/numberLiteralType.cpp +++ b/es2panda/typescript/types/numberLiteralType.cpp @@ -21,13 +21,6 @@ namespace panda::es2panda::checker { -NumberLiteralType::NumberLiteralType(double value) : Type(TypeFlag::NUMBER_LITERAL), value_(value) {} - -double NumberLiteralType::Value() const -{ - return value_; -} - void NumberLiteralType::ToString(std::stringstream &ss) const { ss << util::Helpers::ToString(value_); @@ -38,14 +31,14 @@ void NumberLiteralType::ToStringAsSrc(std::stringstream &ss) const ss << "number"; } -void NumberLiteralType::Identical(TypeRelation *relation, const Type *other) const +void NumberLiteralType::Identical(TypeRelation *relation, Type *other) { if (other->IsNumberLiteralType()) { relation->Result(value_ == other->AsNumberLiteralType()->Value()); } } -void NumberLiteralType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void NumberLiteralType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsEnumType()) { const EnumType *sourceEnumType = source->AsEnumType(); diff --git a/es2panda/typescript/types/numberLiteralType.h b/es2panda/typescript/types/numberLiteralType.h index 1b472e6f614493f2e1f5ea93b4c28b2fa48bb71b..19506c25f152aac7fe22e22a409b2f15c009ab72 100644 --- a/es2panda/typescript/types/numberLiteralType.h +++ b/es2panda/typescript/types/numberLiteralType.h @@ -22,13 +22,17 @@ namespace panda::es2panda::checker { class NumberLiteralType : public Type { public: - explicit NumberLiteralType(double value); + explicit NumberLiteralType(double value) : Type(TypeFlag::NUMBER_LITERAL), value_(value) {} + + double Value() const + { + return value_; + } - double Value() const; void ToString(std::stringstream &ss) const override; void ToStringAsSrc(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; diff --git a/es2panda/typescript/types/numberType.cpp b/es2panda/typescript/types/numberType.cpp index 90e0757c6c0689fb4149531278818db9de80dedf..c233336dcb2af4bb19b0cead5d37c8f2b805e3b9 100644 --- a/es2panda/typescript/types/numberType.cpp +++ b/es2panda/typescript/types/numberType.cpp @@ -20,21 +20,19 @@ namespace panda::es2panda::checker { -NumberType::NumberType() : Type(TypeFlag::NUMBER) {} - void NumberType::ToString(std::stringstream &ss) const { ss << "number"; } -void NumberType::Identical(TypeRelation *relation, const Type *other) const +void NumberType::Identical(TypeRelation *relation, Type *other) { if (other->IsNumberType()) { relation->Result(true); } } -void NumberType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void NumberType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsNumberLiteralType()) { relation->Result(true); diff --git a/es2panda/typescript/types/numberType.h b/es2panda/typescript/types/numberType.h index 7c9d58cad4521738fe5da7969ef3a41a7a2be53f..ac181b9fb4026c713ee0f2b12ba45edef8f7672a 100644 --- a/es2panda/typescript/types/numberType.h +++ b/es2panda/typescript/types/numberType.h @@ -22,11 +22,11 @@ namespace panda::es2panda::checker { class NumberType : public Type { public: - NumberType(); + NumberType() : Type(TypeFlag::NUMBER) {} void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/objectDescriptor.cpp b/es2panda/typescript/types/objectDescriptor.cpp index 6c1d6004295578c1b7beb323a6dbbbd6c13ab985..25b67733fd2761c13b0f8f7cf19a967400930c23 100644 --- a/es2panda/typescript/types/objectDescriptor.cpp +++ b/es2panda/typescript/types/objectDescriptor.cpp @@ -32,24 +32,6 @@ binder::LocalVariable *ObjectDescriptor::FindProperty(const util::StringView &na return nullptr; } -ObjectDescriptor::~ObjectDescriptor() -{ - for (auto *it : properties) { - delete it; - } - - for (auto *it : callSignatures) { - delete it; - } - - for (auto *it : constructSignatures) { - delete it; - } - - delete stringIndexInfo; - delete numberIndexInfo; -} - void ObjectDescriptor::Copy(ArenaAllocator *allocator, ObjectDescriptor *copiedDesc, TypeRelation *relation, GlobalTypesHolder *globalTypes) { diff --git a/es2panda/typescript/types/objectDescriptor.h b/es2panda/typescript/types/objectDescriptor.h index 0ac489f8c703b994b68d17f9a20c1c8aa0c2e9ca..8a793b4cc6b2346d4dfd06bc64016c430db134fd 100644 --- a/es2panda/typescript/types/objectDescriptor.h +++ b/es2panda/typescript/types/objectDescriptor.h @@ -34,8 +34,14 @@ class GlobalTypesHolder; class ObjectDescriptor { public: - ObjectDescriptor() = default; - ~ObjectDescriptor(); + explicit ObjectDescriptor(ArenaAllocator *allocator) + : properties(allocator->Adapter()), + callSignatures(allocator->Adapter()), + constructSignatures(allocator->Adapter()) + { + } + + ~ObjectDescriptor() = default; NO_COPY_SEMANTIC(ObjectDescriptor); NO_MOVE_SEMANTIC(ObjectDescriptor); @@ -43,11 +49,11 @@ public: void Copy(ArenaAllocator *allocator, ObjectDescriptor *copiedDesc, TypeRelation *relation, GlobalTypesHolder *globalTypes); - std::vector properties {}; - std::vector callSignatures {}; - std::vector constructSignatures {}; - IndexInfo *stringIndexInfo {nullptr}; - IndexInfo *numberIndexInfo {nullptr}; + ArenaVector properties; + ArenaVector callSignatures; + ArenaVector constructSignatures; + IndexInfo *stringIndexInfo {}; + IndexInfo *numberIndexInfo {}; }; } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/objectLiteralType.cpp b/es2panda/typescript/types/objectLiteralType.cpp index ccdd18d6f757ceb68d439d67b286c1f46752363d..6fb8e442ca3a634d8d0bc8232d86ccee9ca8338f 100644 --- a/es2panda/typescript/types/objectLiteralType.cpp +++ b/es2panda/typescript/types/objectLiteralType.cpp @@ -23,9 +23,6 @@ namespace panda::es2panda::checker { class Checker; -ObjectLiteralType::ObjectLiteralType(ObjectDescriptor *desc) : ObjectType(ObjectType::ObjectTypeKind::LITERAL, desc) {} -ObjectLiteralType::ObjectLiteralType() : ObjectType(ObjectType::ObjectTypeKind::LITERAL) {} - void ObjectLiteralType::ToString(std::stringstream &ss) const { ss << "{ "; @@ -63,7 +60,13 @@ void ObjectLiteralType::ToString(std::stringstream &ss) const if (it->HasFlag(binder::VariableFlags::PROPERTY)) { ss << ": "; } - it->TsType()->ToString(ss); + + if (it->TsType()) { + it->TsType()->ToString(ss); + } else { + ss << "any"; + } + ss << "; "; } @@ -82,7 +85,7 @@ TypeFacts ObjectLiteralType::GetTypeFacts() const Type *ObjectLiteralType::Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) { - ObjectDescriptor *copiedDesc = allocator->New(); + ObjectDescriptor *copiedDesc = allocator->New(allocator); desc_->Copy(allocator, copiedDesc, relation, globalTypes); return allocator->New(copiedDesc); } diff --git a/es2panda/typescript/types/objectLiteralType.h b/es2panda/typescript/types/objectLiteralType.h index 640aacaf7c008effc9024a5d29a30617c5ce5ef9..8ad20d836193405be89f11c6f848fbe7b4ce776c 100644 --- a/es2panda/typescript/types/objectLiteralType.h +++ b/es2panda/typescript/types/objectLiteralType.h @@ -22,8 +22,8 @@ namespace panda::es2panda::checker { class ObjectLiteralType : public ObjectType { public: - explicit ObjectLiteralType(ObjectDescriptor *desc); - ObjectLiteralType(); + explicit ObjectLiteralType(ObjectDescriptor *desc) : ObjectType(ObjectType::ObjectTypeKind::LITERAL, desc) {} + ObjectLiteralType() : ObjectType(ObjectType::ObjectTypeKind::LITERAL) {} void ToString(std::stringstream &ss) const override; TypeFacts GetTypeFacts() const override; diff --git a/es2panda/typescript/types/objectType.cpp b/es2panda/typescript/types/objectType.cpp index f70167b2342b622e8f7ae266daaa184ca61c894d..7eb4d6d43f840bb110769a51b3dbbb6b5b8d91f2 100644 --- a/es2panda/typescript/types/objectType.cpp +++ b/es2panda/typescript/types/objectType.cpp @@ -15,133 +15,26 @@ #include "objectType.h" -#include -#include #include #include #include +#include namespace panda::es2panda::checker { -ObjectType::ObjectType(ObjectTypeKind kind) - : Type(TypeFlag::OBJECT), kind_(kind), desc_(nullptr), objFlag_(ObjectFlags::CHECK_EXCESS_PROPS) -{ -} - -ObjectType::ObjectType(ObjectTypeKind kind, ObjectDescriptor *desc) - : Type(TypeFlag::OBJECT), kind_(kind), desc_(desc), objFlag_(ObjectFlags::CHECK_EXCESS_PROPS) -{ -} - -ObjectType::ObjectTypeKind ObjectType::Kind() const -{ - return kind_; -} - -std::vector &ObjectType::CallSignatures() -{ - return desc_->callSignatures; -} - -const std::vector &ObjectType::CallSignatures() const -{ - return desc_->callSignatures; -} - -const std::vector &ObjectType::ConstructSignatures() const -{ - return desc_->constructSignatures; -} - -const IndexInfo *ObjectType::StringIndexInfo() const -{ - return desc_->stringIndexInfo; -} - -const IndexInfo *ObjectType::NumberIndexInfo() const -{ - return desc_->numberIndexInfo; -} - -IndexInfo *ObjectType::StringIndexInfo() -{ - return desc_->stringIndexInfo; -} - -IndexInfo *ObjectType::NumberIndexInfo() -{ - return desc_->numberIndexInfo; -} - -const std::vector &ObjectType::Properties() const -{ - return desc_->properties; -} - -ObjectDescriptor *ObjectType::Desc() -{ - return desc_; -} - -const ObjectDescriptor *ObjectType::Desc() const -{ - return desc_; -} - -void ObjectType::AddProperty(binder::LocalVariable *prop) -{ - desc_->properties.push_back(prop); -} - -binder::LocalVariable *ObjectType::GetProperty(const util::StringView &name) const -{ - for (auto *it : desc_->properties) { - if (name == it->Name()) { - return it; - } - } - - return nullptr; -} - -void ObjectType::AddSignature(Signature *signature, bool isCall) -{ - if (isCall) { - desc_->callSignatures.push_back(signature); - } else { - desc_->constructSignatures.push_back(signature); - } -} - -void ObjectType::AddObjectFlag(ObjectFlags flag) -{ - objFlag_ |= flag; -} - -void ObjectType::RemoveObjectFlag(ObjectFlags flag) -{ - objFlag_ &= ~flag; -} - -bool ObjectType::HasObjectFlag(ObjectFlags flag) const -{ - return (objFlag_ & flag) != 0; -} - bool ObjectType::EachSignatureRelatedToSomeSignature(TypeRelation *relation, - const std::vector &sourceSignatures, - const std::vector &targetSignatures) + const ArenaVector &sourceSignatures, + const ArenaVector &targetSignatures) { - std::vector targetCopy = targetSignatures; + ArenaVector targetCopy = targetSignatures; - return std::all_of(sourceSignatures.begin(), sourceSignatures.end(), - [relation, &targetCopy](const Signature *source) { - return SignatureRelatedToSomeSignature(relation, source, &targetCopy); - }); + return std::all_of(sourceSignatures.begin(), sourceSignatures.end(), [relation, &targetCopy](Signature *source) { + return SignatureRelatedToSomeSignature(relation, source, &targetCopy); + }); } -bool ObjectType::SignatureRelatedToSomeSignature(TypeRelation *relation, const Signature *sourceSignature, - std::vector *targetSignatures) +bool ObjectType::SignatureRelatedToSomeSignature(TypeRelation *relation, Signature *sourceSignature, + ArenaVector *targetSignatures) { for (auto it = targetSignatures->begin(); it != targetSignatures->end();) { if (relation->IsIdenticalTo(sourceSignature, *it)) { @@ -155,13 +48,13 @@ bool ObjectType::SignatureRelatedToSomeSignature(TypeRelation *relation, const S return false; } -void ObjectType::Identical(TypeRelation *relation, const Type *other) const +void ObjectType::Identical(TypeRelation *relation, Type *other) { if (!other->IsObjectType() || kind_ != other->AsObjectType()->Kind()) { return; } - const ObjectType *otherObj = other->AsObjectType(); + ObjectType *otherObj = other->AsObjectType(); if (desc_->properties.size() != otherObj->Properties().size() || CallSignatures().size() != otherObj->CallSignatures().size() || @@ -218,38 +111,24 @@ void ObjectType::Identical(TypeRelation *relation, const Type *other) const } } -void ObjectType::AssignProperties(TypeRelation *relation, const ObjectType *source, - bool performExcessPropertyCheck) const +void ObjectType::AssignProperties(TypeRelation *relation, ObjectType *source) { - std::vector targetProperties; - const IndexInfo *numberInfo = nullptr; - const IndexInfo *stringInfo = nullptr; - - if (this->IsInterfaceType()) { - this->AsInterfaceType()->CollectProperties(&targetProperties); - numberInfo = this->AsInterfaceType()->FindIndexInfo(true); - stringInfo = this->AsInterfaceType()->FindIndexInfo(false); - } else { - targetProperties = desc_->properties; - numberInfo = desc_->numberIndexInfo; - stringInfo = desc_->stringIndexInfo; - } + const ArenaVector &targetProperties = Properties(); + IndexInfo *numberInfo = NumberIndexInfo(); + IndexInfo *stringInfo = StringIndexInfo(); for (auto *it : targetProperties) { - binder::LocalVariable *found = source->GetProperty(it->Name()); + binder::LocalVariable *found = source->GetProperty(it->Name(), true); + Type *targetType = relation->GetChecker()->GetTypeOfVariable(it); if (found) { - if (found->TsType()->HasTypeFlag(TypeFlag::RELATION_CHECKED)) { - found->TsType()->RemoveTypeFlag(TypeFlag::RELATION_CHECKED); - continue; - } + Type *sourceType = relation->GetChecker()->GetTypeOfVariable(found); - if (!relation->IsAssignableTo(found->TsType(), it->TsType())) { + if (!relation->IsAssignableTo(sourceType, targetType)) { return; } - if (performExcessPropertyCheck && found->HasFlag(binder::VariableFlags::OPTIONAL) && - !it->HasFlag(binder::VariableFlags::OPTIONAL)) { + if (found->HasFlag(binder::VariableFlags::OPTIONAL) && !it->HasFlag(binder::VariableFlags::OPTIONAL)) { relation->Result(false); return; } @@ -257,19 +136,15 @@ void ObjectType::AssignProperties(TypeRelation *relation, const ObjectType *sour continue; } - if (numberInfo && it->HasFlag(binder::VariableFlags::COMPUTED_INDEX) && - !relation->IsAssignableTo(numberInfo->InfoType(), it->TsType())) { + if (numberInfo && it->HasFlag(binder::VariableFlags::NUMERIC_NAME) && + !relation->IsAssignableTo(numberInfo->GetType(), targetType)) { return; } - if (stringInfo && !relation->IsAssignableTo(stringInfo->InfoType(), it->TsType())) { + if (stringInfo && !relation->IsAssignableTo(stringInfo->GetType(), targetType)) { return; } - if (!performExcessPropertyCheck) { - continue; - } - if (!it->HasFlag(binder::VariableFlags::OPTIONAL)) { relation->Result(false); return; @@ -277,22 +152,11 @@ void ObjectType::AssignProperties(TypeRelation *relation, const ObjectType *sour } } -void ObjectType::AssignSignatures(TypeRelation *relation, const ObjectType *source, bool assignCallSignatures) const +void ObjectType::AssignSignatures(TypeRelation *relation, ObjectType *source, bool assignCallSignatures) { - std::vector targetSignatures; - std::vector sourceSignatures; - - if (this->IsInterfaceType()) { - this->AsInterfaceType()->CollectSignatures(&targetSignatures, assignCallSignatures); - } else { - targetSignatures = assignCallSignatures ? CallSignatures() : ConstructSignatures(); - } - - if (source->IsInterfaceType()) { - source->AsInterfaceType()->CollectSignatures(&sourceSignatures, assignCallSignatures); - } else { - sourceSignatures = assignCallSignatures ? source->CallSignatures() : source->ConstructSignatures(); - } + ArenaVector targetSignatures = assignCallSignatures ? CallSignatures() : ConstructSignatures(); + ArenaVector sourceSignatures = + assignCallSignatures ? source->CallSignatures() : source->ConstructSignatures(); for (auto *targetSignature : targetSignatures) { bool foundCompatible = false; @@ -312,30 +176,44 @@ void ObjectType::AssignSignatures(TypeRelation *relation, const ObjectType *sour } } -void ObjectType::AssignIndexInfo([[maybe_unused]] TypeRelation *relation, const ObjectType *source, - bool assignNumberInfo) const +void ObjectType::AssignIndexInfo([[maybe_unused]] TypeRelation *relation, ObjectType *source, bool assignNumberInfo) { - const IndexInfo *targetInfo = nullptr; - const IndexInfo *sourceInfo = nullptr; + IndexInfo *targetInfo = assignNumberInfo ? NumberIndexInfo() : StringIndexInfo(); + IndexInfo *sourceInfo = assignNumberInfo ? source->NumberIndexInfo() : source->StringIndexInfo(); - if (this->IsInterfaceType()) { - targetInfo = this->AsInterfaceType()->FindIndexInfo(assignNumberInfo); - } else { - targetInfo = assignNumberInfo ? NumberIndexInfo() : StringIndexInfo(); - } + if (targetInfo) { + if (sourceInfo) { + targetInfo->AssignmentTarget(relation, sourceInfo); + return; + } - if (source->IsInterfaceType()) { - sourceInfo = source->AsInterfaceType()->FindIndexInfo(assignNumberInfo); - } else { - sourceInfo = assignNumberInfo ? source->NumberIndexInfo() : source->StringIndexInfo(); + for (auto *it : source->Properties()) { + if (assignNumberInfo && !it->HasFlag(binder::VariableFlags::NUMERIC_NAME)) { + continue; + } + + if (!relation->IsAssignableTo(relation->GetChecker()->GetTypeOfVariable(it), targetInfo->GetType())) { + return; + } + } } +} + +void ObjectType::checkExcessProperties(TypeRelation *relation, ObjectType *source) +{ + for (auto *it : source->Properties()) { + auto *found = GetProperty(it->Name(), true); - if (targetInfo && sourceInfo) { - targetInfo->AssignmentTarget(relation, sourceInfo); + if (found || (it->HasFlag(binder::VariableFlags::NUMERIC_NAME) && NumberIndexInfo()) || StringIndexInfo()) { + continue; + } + + relation->Result(false); + return; } } -void ObjectType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void ObjectType::AssignmentTarget(TypeRelation *relation, Type *source) { if (!source->IsObjectType()) { relation->Result(false); @@ -344,21 +222,27 @@ void ObjectType::AssignmentTarget(TypeRelation *relation, const Type *source) co relation->Result(true); - const ObjectType *sourceObj = source->AsObjectType(); + ObjectType *sourceObj = source->AsObjectType(); - AssignProperties(relation, sourceObj, HasObjectFlag(ObjectFlags::CHECK_EXCESS_PROPS)); + if (sourceObj->HasObjectFlag(ObjectFlags::CHECK_EXCESS_PROPS)) { + checkExcessProperties(relation, sourceObj); + } if (relation->IsTrue()) { - AssignSignatures(relation, sourceObj); + AssignProperties(relation, sourceObj); if (relation->IsTrue()) { - AssignSignatures(relation, sourceObj, false); + AssignSignatures(relation, sourceObj); if (relation->IsTrue()) { - AssignIndexInfo(relation, sourceObj); + AssignSignatures(relation, sourceObj, false); if (relation->IsTrue()) { - AssignIndexInfo(relation, sourceObj, false); + AssignIndexInfo(relation, sourceObj); + + if (relation->IsTrue()) { + AssignIndexInfo(relation, sourceObj, false); + } } } } diff --git a/es2panda/typescript/types/objectType.h b/es2panda/typescript/types/objectType.h index f8ab9c9aa75964f0bdc0741454a1f19c36240309..e28454270005cc81bc9dc886db67743631985fc6 100644 --- a/es2panda/typescript/types/objectType.h +++ b/es2panda/typescript/types/objectType.h @@ -19,6 +19,7 @@ #include "type.h" #include +#include #include #include @@ -36,6 +37,16 @@ class IndexInfo; OBJECT_TYPE_MAPPING(DECLARE_OBJECT_TYPENAMES) #undef DECLARE_OBJECT_TYPENAMES +enum class ObjectFlags { + NO_OPTS = 0, + CHECK_EXCESS_PROPS = 1 << 0, + RESOLVED_MEMBERS = 1 << 1, + RESOLVED_BASE_TYPES = 1 << 2, + RESOLVED_DECLARED_MEMBERS = 1 << 3, +}; + +DEFINE_BITOPS(ObjectFlags) + class ObjectType : public Type { public: enum class ObjectTypeKind { @@ -46,16 +57,10 @@ public: FUNCTION, }; - enum class ObjectFlags { - NO_OPTS = 0, - CHECK_EXCESS_PROPS = 1 << 0, - HAVE_REST = 1 << 1, - }; - -#define OBJECT_TYPE_IS_CHECKS(objectKind, typeName) \ - bool Is##typeName() const \ - { \ - return kind_ == objectKind; \ +#define OBJECT_TYPE_IS_CHECKS(objectKind, typeName) \ + bool Is##typeName() const \ + { \ + return kind_ == objectKind; \ } OBJECT_TYPE_MAPPING(OBJECT_TYPE_IS_CHECKS) #undef OBJECT_TYPE_IS_CHECKS @@ -74,41 +79,121 @@ public: OBJECT_TYPE_MAPPING(OBJECT_TYPE_AS_CASTS) #undef OBJECT_TYPE_AS_CASTS - explicit ObjectType(ObjectTypeKind kind); - ObjectType(ObjectTypeKind kind, ObjectDescriptor *desc); - - ObjectTypeKind Kind() const; - std::vector &CallSignatures(); - const std::vector &CallSignatures() const; - const std::vector &ConstructSignatures() const; - const IndexInfo *StringIndexInfo() const; - const IndexInfo *NumberIndexInfo() const; - IndexInfo *StringIndexInfo(); - IndexInfo *NumberIndexInfo(); - const std::vector &Properties() const; - ObjectDescriptor *Desc(); - const ObjectDescriptor *Desc() const; - - void AddProperty(binder::LocalVariable *prop); - void AddSignature(Signature *signature, bool isCall = true); - void AddObjectFlag(ObjectFlags flag); - void RemoveObjectFlag(ObjectFlags flag); - bool HasObjectFlag(ObjectFlags flag) const; - - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; - virtual binder::LocalVariable *GetProperty(const util::StringView &name) const; - - static bool SignatureRelatedToSomeSignature(TypeRelation *relation, const Signature *sourceSignature, - std::vector *targetSignatures); + explicit ObjectType(ObjectType::ObjectTypeKind kind) + : Type(TypeFlag::OBJECT), kind_(kind), desc_(nullptr), objFlag_(ObjectFlags::NO_OPTS) + { + } + + ObjectType(ObjectType::ObjectTypeKind kind, ObjectDescriptor *desc) + : Type(TypeFlag::OBJECT), kind_(kind), desc_(desc), objFlag_(ObjectFlags::NO_OPTS) + { + } + + ObjectType::ObjectTypeKind Kind() const + { + return kind_; + } + + virtual ArenaVector CallSignatures() + { + return desc_->callSignatures; + } + + virtual ArenaVector ConstructSignatures() + { + return desc_->constructSignatures; + } + + virtual const IndexInfo *StringIndexInfo() const + { + return desc_->stringIndexInfo; + } + + virtual const IndexInfo *NumberIndexInfo() const + { + return desc_->numberIndexInfo; + } + + virtual IndexInfo *StringIndexInfo() + { + return desc_->stringIndexInfo; + } + + virtual IndexInfo *NumberIndexInfo() + { + return desc_->numberIndexInfo; + } + + virtual ArenaVector Properties() + { + return desc_->properties; + } + + ObjectDescriptor *Desc() + { + return desc_; + } + + const ObjectDescriptor *Desc() const + { + return desc_; + } + + void AddProperty(binder::LocalVariable *prop) + { + desc_->properties.push_back(prop); + } + + virtual binder::LocalVariable *GetProperty(const util::StringView &name, [[maybe_unused]] bool searchInBase) const + { + for (auto *it : desc_->properties) { + if (name == it->Name()) { + return it; + } + } + + return nullptr; + } + + void AddCallSignature(Signature *signature) + { + desc_->callSignatures.push_back(signature); + } + + void AddConstructSignature(Signature *signature) + { + desc_->constructSignatures.push_back(signature); + } + + void AddObjectFlag(ObjectFlags flag) + { + objFlag_ |= flag; + } + + void RemoveObjectFlag(ObjectFlags flag) + { + flag &= ~flag; + } + + bool HasObjectFlag(ObjectFlags flag) const + { + return (objFlag_ & flag) != 0; + } + + static bool SignatureRelatedToSomeSignature(TypeRelation *relation, Signature *sourceSignature, + ArenaVector *targetSignatures); + static bool EachSignatureRelatedToSomeSignature(TypeRelation *relation, - const std::vector &sourceSignatures, - const std::vector &targetSignatures); + const ArenaVector &sourceSignatures, + const ArenaVector &targetSignatures); - void AssignProperties(TypeRelation *relation, const ObjectType *source, - bool performExcessPropertyCheck = false) const; - void AssignSignatures(TypeRelation *relation, const ObjectType *source, bool assignCallSignatures = true) const; - void AssignIndexInfo(TypeRelation *relation, const ObjectType *source, bool assignNumberInfo = true) const; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; + + void checkExcessProperties(TypeRelation *relation, ObjectType *source); + void AssignProperties(TypeRelation *relation, ObjectType *source); + void AssignSignatures(TypeRelation *relation, ObjectType *source, bool assignCallSignatures = true); + void AssignIndexInfo(TypeRelation *relation, ObjectType *source, bool assignNumberInfo = true); protected: ObjectTypeKind kind_; @@ -116,8 +201,6 @@ protected: ObjectFlags objFlag_; }; -DEFINE_BITOPS(ObjectType::ObjectFlags) - } // namespace panda::es2panda::checker #endif /* TYPESCRIPT_TYPES_OBJECT_TYPE_H */ diff --git a/es2panda/typescript/types/signature.cpp b/es2panda/typescript/types/signature.cpp index 2d0568c9bbcdcb21f16b0c5da5956c157527a46d..062cd0c5ff95e4f6b5a19724228f1969a4f5e1e1 100644 --- a/es2panda/typescript/types/signature.cpp +++ b/es2panda/typescript/types/signature.cpp @@ -15,73 +15,13 @@ #include "signature.h" -#include - namespace panda::es2panda::checker { -SignatureInfo::SignatureInfo(const SignatureInfo *other, ArenaAllocator *allocator) -{ - for (auto *it : other->funcParams) { - funcParams.push_back(it->Copy(allocator, it->Declaration())); - } - - minArgCount = other->minArgCount; - - if (other->restVar) { - restVar = other->restVar->Copy(allocator, other->restVar->Declaration()); - } -} - -Signature::Signature(SignatureInfo *signatureInfo, Type *returnType) - : signatureInfo_(signatureInfo), returnType_(returnType) -{ -} - -const SignatureInfo *Signature::Info() const -{ - return signatureInfo_; -} - -const std::vector &Signature::Params() const -{ - return signatureInfo_->funcParams; -} - -const Type *Signature::ReturnType() const -{ - return returnType_; -} - -Type *Signature::ReturnType() -{ - return returnType_; -} - -uint32_t Signature::MinArgCount() const -{ - return signatureInfo_->minArgCount; -} - -uint32_t Signature::OptionalArgCount() const -{ - return signatureInfo_->funcParams.size() - signatureInfo_->minArgCount; -} - -void Signature::SetReturnType(Type *type) -{ - returnType_ = type; -} - -const binder::LocalVariable *Signature::RestVar() const -{ - return signatureInfo_->restVar; -} - Signature *Signature::Copy(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) { - SignatureInfo *copiedInfo = allocator->New(signatureInfo_, allocator); + checker::SignatureInfo *copiedInfo = allocator->New(signatureInfo_, allocator); - for (auto *it : copiedInfo->funcParams) { + for (auto *it : copiedInfo->params) { it->SetTsType(it->TsType()->Instantiate(allocator, relation, globalTypes)); } @@ -94,7 +34,7 @@ void Signature::ToString(std::stringstream &ss, const binder::Variable *variable { ss << "("; - for (auto it = signatureInfo_->funcParams.begin(); it != signatureInfo_->funcParams.end(); it++) { + for (auto it = signatureInfo_->params.begin(); it != signatureInfo_->params.end(); it++) { ss << (*it)->Name(); if ((*it)->HasFlag(binder::VariableFlags::OPTIONAL)) { @@ -105,13 +45,13 @@ void Signature::ToString(std::stringstream &ss, const binder::Variable *variable (*it)->TsType()->ToString(ss); - if (std::next(it) != signatureInfo_->funcParams.end()) { + if (std::next(it) != signatureInfo_->params.end()) { ss << ", "; } } if (signatureInfo_->restVar) { - if (!signatureInfo_->funcParams.empty()) { + if (!signatureInfo_->params.empty()) { ss << ", "; } @@ -133,10 +73,10 @@ void Signature::ToString(std::stringstream &ss, const binder::Variable *variable returnType_->ToString(ss); } -void Signature::Identical(TypeRelation *relation, const Signature *other) const +void Signature::Identical(TypeRelation *relation, Signature *other) { if (signatureInfo_->minArgCount != other->MinArgCount() || - signatureInfo_->funcParams.size() != other->Params().size()) { + signatureInfo_->params.size() != other->Params().size()) { relation->Result(false); return; } @@ -144,8 +84,8 @@ void Signature::Identical(TypeRelation *relation, const Signature *other) const relation->IsIdenticalTo(returnType_, other->ReturnType()); if (relation->IsTrue()) { - for (uint64_t i = 0; i < signatureInfo_->funcParams.size(); i++) { - relation->IsIdenticalTo(signatureInfo_->funcParams[i]->TsType(), other->Params()[i]->TsType()); + for (uint64_t i = 0; i < signatureInfo_->params.size(); i++) { + relation->IsIdenticalTo(signatureInfo_->params[i]->TsType(), other->Params()[i]->TsType()); if (!relation->IsTrue()) { return; } @@ -159,10 +99,10 @@ void Signature::Identical(TypeRelation *relation, const Signature *other) const } } -void Signature::AssignmentTarget(TypeRelation *relation, const Signature *source) const +void Signature::AssignmentTarget(TypeRelation *relation, Signature *source) { if (!signatureInfo_->restVar && - (source->Params().size() - source->OptionalArgCount()) > signatureInfo_->funcParams.size()) { + (source->Params().size() - source->OptionalArgCount()) > signatureInfo_->params.size()) { relation->Result(false); return; } @@ -189,7 +129,7 @@ void Signature::AssignmentTarget(TypeRelation *relation, const Signature *source } } - relation->IsAssignableTo(source->ReturnType(), ReturnType()); + relation->IsAssignableTo(source->ReturnType(), returnType_); if (relation->IsTrue() && signatureInfo_->restVar && source->RestVar()) { relation->IsAssignableTo(source->RestVar()->TsType(), signatureInfo_->restVar->TsType()); diff --git a/es2panda/typescript/types/signature.h b/es2panda/typescript/types/signature.h index 5943e59311880519ff2dedc57c9e2a525c0d4429..f96adf3e143735d6415acf6943b6d1368d859ba9 100644 --- a/es2panda/typescript/types/signature.h +++ b/es2panda/typescript/types/signature.h @@ -18,6 +18,8 @@ #include "type.h" +#include + namespace panda::es2panda::binder { class LocalVariable; } // namespace panda::es2panda::binder @@ -26,41 +28,100 @@ namespace panda::es2panda::checker { class SignatureInfo { public: - SignatureInfo() = default; - explicit SignatureInfo(const SignatureInfo *other, ArenaAllocator *allocator); + explicit SignatureInfo(ArenaAllocator *allocator) : params(allocator->Adapter()) {} + + SignatureInfo(const SignatureInfo *other, ArenaAllocator *allocator) : params(allocator->Adapter()) + { + for (auto *it : other->params) { + params.push_back(it->Copy(allocator, it->Declaration())); + } + + minArgCount = other->minArgCount; + + if (other->restVar) { + restVar = other->restVar->Copy(allocator, other->restVar->Declaration()); + } + } + + ~SignatureInfo() = default; NO_COPY_SEMANTIC(SignatureInfo); NO_MOVE_SEMANTIC(SignatureInfo); - ~SignatureInfo() = default; uint32_t minArgCount {}; binder::LocalVariable *restVar {}; - std::vector funcParams {}; + ArenaVector params; }; class Signature { public: - Signature(SignatureInfo *signatureInfo, Type *returnType); + Signature(SignatureInfo *signatureInfo, Type *returnType) : signatureInfo_(signatureInfo), returnType_(returnType) + { + } + ~Signature() = default; NO_COPY_SEMANTIC(Signature); NO_MOVE_SEMANTIC(Signature); - const SignatureInfo *Info() const; - const std::vector &Params() const; - const Type *ReturnType() const; - Type *ReturnType(); - uint32_t MinArgCount() const; - uint32_t OptionalArgCount() const; - void SetReturnType(Type *type); - const binder::LocalVariable *RestVar() const; + const SignatureInfo *GetSignatureInfo() const + { + return signatureInfo_; + } + + const ArenaVector &Params() const + { + return signatureInfo_->params; + } + + const Type *ReturnType() const + { + return returnType_; + } + + Type *ReturnType() + { + return returnType_; + } + + uint32_t MinArgCount() const + { + return signatureInfo_->minArgCount; + } + + uint32_t OptionalArgCount() const + { + return signatureInfo_->params.size() - signatureInfo_->minArgCount; + } + + void SetReturnType(Type *type) + { + returnType_ = type; + } + + void SetNode(const ir::AstNode *node) + { + node_ = node; + } + + const ir::AstNode *Node() const + { + return node_; + } + + const binder::LocalVariable *RestVar() const + { + return signatureInfo_->restVar; + } + Signature *Copy(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes); void ToString(std::stringstream &ss, const binder::Variable *variable, bool printAsMethod = false) const; - void Identical(TypeRelation *relation, const Signature *other) const; - void AssignmentTarget(TypeRelation *relation, const Signature *source) const; + void Identical(TypeRelation *relation, Signature *other); + void AssignmentTarget(TypeRelation *relation, Signature *source); private: - SignatureInfo *signatureInfo_; + checker::SignatureInfo *signatureInfo_; Type *returnType_; + const ir::AstNode *node_ {nullptr}; }; } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/stringLiteralType.cpp b/es2panda/typescript/types/stringLiteralType.cpp index 084f00749f26623eac7db504a8751ec18089d809..a115e093371e74184f2d2b0e75d7a398f8f58d59 100644 --- a/es2panda/typescript/types/stringLiteralType.cpp +++ b/es2panda/typescript/types/stringLiteralType.cpp @@ -17,13 +17,6 @@ namespace panda::es2panda::checker { -StringLiteralType::StringLiteralType(util::StringView value) : Type(TypeFlag::STRING_LITERAL), value_(value) {} - -const util::StringView &StringLiteralType::Value() const -{ - return value_; -} - void StringLiteralType::ToString(std::stringstream &ss) const { ss << "\"" << value_ << "\""; @@ -34,17 +27,14 @@ void StringLiteralType::ToStringAsSrc(std::stringstream &ss) const ss << "string"; } -void StringLiteralType::Identical(TypeRelation *relation, const Type *other) const +void StringLiteralType::Identical(TypeRelation *relation, Type *other) { if (other->IsStringLiteralType()) { relation->Result(value_ == other->AsStringLiteralType()->Value()); } } -void StringLiteralType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, - [[maybe_unused]] const Type *source) const -{ -} +void StringLiteralType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *source) {} TypeFacts StringLiteralType::GetTypeFacts() const { diff --git a/es2panda/typescript/types/stringLiteralType.h b/es2panda/typescript/types/stringLiteralType.h index f289cc68fde2136bab58ae44d2a802f0918a5aa2..4e79c1892901fa7b23f51a5255962afa5ae61016 100644 --- a/es2panda/typescript/types/stringLiteralType.h +++ b/es2panda/typescript/types/stringLiteralType.h @@ -22,13 +22,17 @@ namespace panda::es2panda::checker { class StringLiteralType : public Type { public: - explicit StringLiteralType(util::StringView value); + explicit StringLiteralType(util::StringView value) : Type(TypeFlag::STRING_LITERAL), value_(value) {} + + const util::StringView &Value() const + { + return value_; + } - const util::StringView &Value() const; void ToString(std::stringstream &ss) const override; void ToStringAsSrc(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; diff --git a/es2panda/typescript/types/stringType.cpp b/es2panda/typescript/types/stringType.cpp index 0da06419224e848f90cd65985d41e6662a5a99a3..6310fb793a7d3795c9a487a097d653a3e7dae711 100644 --- a/es2panda/typescript/types/stringType.cpp +++ b/es2panda/typescript/types/stringType.cpp @@ -17,21 +17,19 @@ namespace panda::es2panda::checker { -StringType::StringType() : Type(TypeFlag::STRING) {} - void StringType::ToString(std::stringstream &ss) const { ss << "string"; } -void StringType::Identical(TypeRelation *relation, const Type *other) const +void StringType::Identical(TypeRelation *relation, Type *other) { if (other->IsStringType()) { relation->Result(true); } } -void StringType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void StringType::AssignmentTarget(TypeRelation *relation, Type *source) { if (source->IsStringLiteralType()) { relation->Result(true); diff --git a/es2panda/typescript/types/stringType.h b/es2panda/typescript/types/stringType.h index e8e995a95acbf0e8edac70b198709d78102ea7f7..55a50c6b966404b52fb19ae54d94026e9b4b57bb 100644 --- a/es2panda/typescript/types/stringType.h +++ b/es2panda/typescript/types/stringType.h @@ -22,11 +22,11 @@ namespace panda::es2panda::checker { class StringType : public Type { public: - StringType(); + StringType() : Type(TypeFlag::STRING) {} void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/tupleType.cpp b/es2panda/typescript/types/tupleType.cpp index 58b4acc91f0d964ed04c7bd478121063b5acd5b2..87be8523c834964a5a2a4d8cd4ebe6f1793aa0e6 100644 --- a/es2panda/typescript/types/tupleType.cpp +++ b/es2panda/typescript/types/tupleType.cpp @@ -15,136 +15,20 @@ #include "tupleType.h" -#include +#include namespace panda::es2panda::checker { -TupleTypeIterator::TupleTypeIterator(TupleType *tuple) : tupleType_(tuple), iter_(0) {} - -Type *TupleTypeIterator::Next() +Type *TupleType::ConvertToArrayType(Checker *checker) { - if (iter_ >= tupleType_->Properties().size()) { - return nullptr; - } - - Type *returnType = tupleType_->Properties()[iter_]->TsType(); - - iter_++; + ArenaVector unionTypes(checker->Allocator()->Adapter()); - return returnType; -} - -Type *TupleTypeIterator::Current() -{ - if (iter_ >= tupleType_->Properties().size()) { - return nullptr; + for (const auto *it : desc_->properties) { + unionTypes.push_back(it->TsType()); } - return tupleType_->Properties()[iter_]->TsType(); -} - -uint32_t TupleTypeIterator::Iter() const -{ - return iter_; -} - -TupleType::TupleType(ObjectDescriptor *desc, TupleElementFlagPool &&elementFlags, ElementFlags combinedFlags, - uint32_t minLength, uint32_t fixedLength, bool readonly) - : ObjectType(ObjectType::ObjectTypeKind::TUPLE, desc), - elementFlags_(std::move(elementFlags)), - combinedFlags_(combinedFlags), - minLength_(minLength), - fixedLength_(fixedLength), - readonly_(readonly) -{ - if (readonly_) { - for (auto *it : Properties()) { - it->AddFlag(binder::VariableFlags::READONLY); - } - } - - iterator_ = new TupleTypeIterator(this); -} - -TupleType::TupleType(ObjectDescriptor *desc, TupleElementFlagPool &&elementFlags, ElementFlags combinedFlags, - uint32_t minLength, uint32_t fixedLength, bool readonly, NamedTupleMemberPool &&namedMembers) - : ObjectType(ObjectType::ObjectTypeKind::TUPLE, desc), - elementFlags_(std::move(elementFlags)), - combinedFlags_(combinedFlags), - minLength_(minLength), - fixedLength_(fixedLength), - namedMembers_(std::move(namedMembers)), - readonly_(readonly) -{ - if (readonly_) { - for (auto *it : Properties()) { - it->AddFlag(binder::VariableFlags::READONLY); - } - } - - iterator_ = new TupleTypeIterator(this); -} - -TupleType::TupleType() : ObjectType(ObjectType::ObjectTypeKind::TUPLE) {} - -TupleType::~TupleType() -{ - delete iterator_; -} - -ElementFlags TupleType::CombinedFlags() const -{ - return combinedFlags_; -} - -uint32_t TupleType::MinLength() const -{ - return minLength_; -} - -uint32_t TupleType::FixedLength() const -{ - return fixedLength_; -} - -ElementFlags TupleType::GetElementFlag(const util::StringView &index) const -{ - auto res = elementFlags_.find(index); - if (res != elementFlags_.end()) { - return res->second; - } - return ElementFlags::NO_OPTS; -} - -bool TupleType::HasCombinedFlag(ElementFlags combinedFlag) const -{ - return (combinedFlags_ & combinedFlag) != 0; -} - -bool TupleType::IsReadOnly() const -{ - return readonly_; -} - -TupleTypeIterator *TupleType::Iterator() -{ - return iterator_; -} - -const TupleTypeIterator *TupleType::Iterator() const -{ - return iterator_; -} - -const NamedTupleMemberPool &TupleType::NamedMembers() const -{ - return namedMembers_; -} - -const util::StringView &TupleType::FindNamedMemberName(binder::LocalVariable *member) const -{ - auto res = namedMembers_.find(member); - return res->second; + Type *arrayType = checker->CreateUnionType(std::move(unionTypes)); + return checker->Allocator()->New(arrayType); } void TupleType::ToString(std::stringstream &ss) const @@ -185,15 +69,14 @@ void TupleType::ToString(std::stringstream &ss) const ss << "]"; } -void TupleType::Identical(TypeRelation *relation, const Type *other) const +void TupleType::Identical(TypeRelation *relation, Type *other) { if (other->IsObjectType() && other->AsObjectType()->IsTupleType()) { - const TupleType *otherTuple = other->AsObjectType()->AsTupleType(); + TupleType *otherTuple = other->AsObjectType()->AsTupleType(); if (kind_ == otherTuple->Kind() && desc_->properties.size() == otherTuple->Properties().size()) { - const auto &otherProperties = otherTuple->Properties(); for (size_t i = 0; i < desc_->properties.size(); i++) { binder::LocalVariable *targetProp = desc_->properties[i]; - binder::LocalVariable *sourceProp = otherProperties[i]; + binder::LocalVariable *sourceProp = otherTuple->Properties()[i]; if (targetProp->Flags() != sourceProp->Flags()) { relation->Result(false); @@ -211,14 +94,14 @@ void TupleType::Identical(TypeRelation *relation, const Type *other) const } } -void TupleType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void TupleType::AssignmentTarget(TypeRelation *relation, Type *source) { if (!source->IsObjectType() || !source->AsObjectType()->IsTupleType()) { relation->Result(false); return; } - const TupleType *sourceTuple = source->AsObjectType()->AsTupleType(); + TupleType *sourceTuple = source->AsObjectType()->AsTupleType(); if (FixedLength() < sourceTuple->MinLength()) { relation->Result(false); return; @@ -268,14 +151,18 @@ TypeFacts TupleType::GetTypeFacts() const Type *TupleType::Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) { - ObjectDescriptor *copiedDesc = allocator->New(); + ObjectDescriptor *copiedDesc = allocator->New(allocator); desc_->Copy(allocator, copiedDesc, relation, globalTypes); NamedTupleMemberPool copiedNamedMemberPool = namedMembers_; - TupleElementFlagPool copiedElementFlagPool = elementFlags_; + ArenaVector copiedElementFlags(allocator->Adapter()); + + for (auto it : elementFlags_) { + copiedElementFlags.push_back(it); + } - return allocator->New(copiedDesc, std::move(copiedElementFlagPool), combinedFlags_, minLength_, + return allocator->New(copiedDesc, std::move(copiedElementFlags), combinedFlags_, minLength_, fixedLength_, readonly_, std::move(copiedNamedMemberPool)); } diff --git a/es2panda/typescript/types/tupleType.h b/es2panda/typescript/types/tupleType.h index 241cf60ad5067240a0c5950a20c0ffd661a3278c..40e88f2c9c1e8b3049abca864caf464c4fe453b2 100644 --- a/es2panda/typescript/types/tupleType.h +++ b/es2panda/typescript/types/tupleType.h @@ -18,67 +18,105 @@ #include +#include #include #include namespace panda::es2panda::checker { -class TupleTypeIterator { +using NamedTupleMemberPool = std::unordered_map; + +class TupleType : public ObjectType { public: - explicit TupleTypeIterator(TupleType *tuple); - ~TupleTypeIterator() = default; - NO_COPY_SEMANTIC(TupleTypeIterator); - NO_MOVE_SEMANTIC(TupleTypeIterator); + explicit TupleType(ArenaAllocator *allocator) + : ObjectType(ObjectTypeKind::TUPLE), elementFlags_(allocator->Adapter()) + { + } - Type *Next(); - Type *Current(); - uint32_t Iter() const; + TupleType(ObjectDescriptor *desc, ArenaVector &&elementFlags, ElementFlags combinedFlags, + uint32_t minLength, uint32_t fixedLength, bool readonly) + : ObjectType(ObjectType::ObjectTypeKind::TUPLE, desc), + elementFlags_(std::move(elementFlags)), + combinedFlags_(combinedFlags), + minLength_(minLength), + fixedLength_(fixedLength), + readonly_(readonly) + { + if (readonly_) { + for (auto *it : Properties()) { + it->AddFlag(binder::VariableFlags::READONLY); + } + } + } -private: - TupleType *tupleType_; - uint32_t iter_; -}; + TupleType(ObjectDescriptor *desc, ArenaVector &&elementFlags, ElementFlags combinedFlags, + uint32_t minLength, uint32_t fixedLength, bool readonly, NamedTupleMemberPool &&namedMembers) + : ObjectType(ObjectType::ObjectTypeKind::TUPLE, desc), + elementFlags_(std::move(elementFlags)), + combinedFlags_(combinedFlags), + minLength_(minLength), + fixedLength_(fixedLength), + namedMembers_(std::move(namedMembers)), + readonly_(readonly) + { + if (readonly_) { + for (auto *it : Properties()) { + it->AddFlag(binder::VariableFlags::READONLY); + } + } + } -using NamedTupleMemberPool = std::unordered_map; -using TupleElementFlagPool = std::unordered_map; + ElementFlags CombinedFlags() const + { + return combinedFlags_; + } -class TupleType : public ObjectType { -public: - TupleType(ObjectDescriptor *desc, TupleElementFlagPool &&elementFlags, ElementFlags combinedFlags, - uint32_t minLength, uint32_t fixedLength, bool readonly); - TupleType(ObjectDescriptor *desc, TupleElementFlagPool &&elementFlags, ElementFlags combinedFlags, - uint32_t minLength, uint32_t fixedLength, bool readonly, NamedTupleMemberPool &&namedMembers); - TupleType(); - ~TupleType() override; - NO_COPY_SEMANTIC(TupleType); - NO_MOVE_SEMANTIC(TupleType); - - ElementFlags GetElementFlag(const util::StringView &index) const; - ElementFlags CombinedFlags() const; - uint32_t MinLength() const; - uint32_t FixedLength() const; - bool HasElementFlag(ElementFlags elementFlag) const; - bool HasCombinedFlag(ElementFlags combinedFlag) const; - bool IsReadOnly() const; - TupleTypeIterator *Iterator(); - const TupleTypeIterator *Iterator() const; - const NamedTupleMemberPool &NamedMembers() const; - const util::StringView &FindNamedMemberName(binder::LocalVariable *member) const; + uint32_t MinLength() const + { + return minLength_; + } + + uint32_t FixedLength() const + { + return fixedLength_; + } + + bool HasCombinedFlag(ElementFlags combinedFlag) const + { + return (combinedFlags_ & combinedFlag) != 0; + } + + bool IsReadOnly() const + { + return readonly_; + } + + const NamedTupleMemberPool &NamedMembers() const + { + return namedMembers_; + } + + const util::StringView &FindNamedMemberName(binder::LocalVariable *member) const + { + auto res = namedMembers_.find(member); + return res->second; + } + + Type *ConvertToArrayType(Checker *checker); void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; private: - TupleElementFlagPool elementFlags_ {}; + ArenaVector elementFlags_; ElementFlags combinedFlags_ {}; uint32_t minLength_ {}; uint32_t fixedLength_ {}; NamedTupleMemberPool namedMembers_ {}; bool readonly_ {}; - TupleTypeIterator *iterator_ {nullptr}; }; } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/type.cpp b/es2panda/typescript/types/type.cpp index 2b1d8a3647922f326e245f0b4b2967d8124c22a9..b7c218b543d0f26c8a3f482539c4cf5c1dc8af8b 100644 --- a/es2panda/typescript/types/type.cpp +++ b/es2panda/typescript/types/type.cpp @@ -21,68 +21,22 @@ namespace panda::es2panda::checker { -Type::Type(TypeFlag flag) : typeFlags_(flag), variable_(nullptr) -{ - static uint64_t typeId = 0; - id_ = ++typeId; -} - -TypeFlag Type::TypeFlags() const -{ - return typeFlags_; -} - -bool Type::HasTypeFlag(TypeFlag typeFlag) const -{ - return (typeFlags_ & typeFlag) != 0; -} - -void Type::AddTypeFlag(TypeFlag typeFlag) -{ - typeFlags_ |= typeFlag; -} - -void Type::RemoveTypeFlag(TypeFlag typeFlag) -{ - typeFlags_ &= ~typeFlag; -} - -uint64_t Type::Id() const -{ - return id_; -} - void Type::ToStringAsSrc(std::stringstream &ss) const { ToString(ss); } -void Type::SetVariable(binder::Variable *variable) -{ - variable_ = variable; -} - -binder::Variable *Type::Variable() -{ - return variable_; -} - -const binder::Variable *Type::Variable() const -{ - return variable_; -} - -void Type::Identical(TypeRelation *relation, const Type *other) const +void Type::Identical(TypeRelation *relation, Type *other) { relation->Result(typeFlags_ == other->TypeFlags()); } -bool Type::AssignmentSource([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *target) const +bool Type::AssignmentSource([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *target) { return false; } -void Type::Compare([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *other) const {} +void Type::Compare([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *other) {} Type *Type::Instantiate([[maybe_unused]] ArenaAllocator *allocator, [[maybe_unused]] TypeRelation *relation, [[maybe_unused]] GlobalTypesHolder *globalTypes) diff --git a/es2panda/typescript/types/type.h b/es2panda/typescript/types/type.h index dc9863ffe15f7efa6348c2843eed4a12943ffd6c..4dbb34f5e1e7d5c239ebb5c5210dd918b180fedb 100644 --- a/es2panda/typescript/types/type.h +++ b/es2panda/typescript/types/type.h @@ -39,51 +39,87 @@ TYPE_MAPPING(DECLARE_TYPENAMES) class Type { public: - explicit Type(TypeFlag flag); + explicit Type(TypeFlag flag) : typeFlags_(flag), variable_(nullptr) + { + static uint64_t typeId_ = 0; + id_ = ++typeId_; + } + NO_COPY_SEMANTIC(Type); NO_MOVE_SEMANTIC(Type); virtual ~Type() = default; #define TYPE_IS_CHECKS(typeFlag, typeName) \ - bool Is##typeName() const \ - { \ - return HasTypeFlag(typeFlag); \ + bool Is##typeName() const \ + { \ + return HasTypeFlag(typeFlag); \ } TYPE_MAPPING(TYPE_IS_CHECKS) #undef DECLARE_IS_CHECKS -#define TYPE_AS_CASTS(typeFlag, typeName) \ - typeName *As##typeName() \ - { \ +#define TYPE_AS_CASTS(typeFlag, typeName) \ + typeName *As##typeName() \ + { \ ASSERT(Is##typeName()); \ return reinterpret_cast(this); \ - } \ - const typeName *As##typeName() const \ - { \ + } \ + const typeName *As##typeName() const \ + { \ ASSERT(Is##typeName()); \ return reinterpret_cast(this); \ } TYPE_MAPPING(TYPE_AS_CASTS) #undef TYPE_AS_CASTS - TypeFlag TypeFlags() const; - bool HasTypeFlag(TypeFlag typeFlag) const; - void AddTypeFlag(TypeFlag typeFlag); - void RemoveTypeFlag(TypeFlag typeFlag); - uint64_t Id() const; - void SetVariable(binder::Variable *variable); - binder::Variable *Variable(); - const binder::Variable *Variable() const; + TypeFlag TypeFlags() const + { + return typeFlags_; + } + + bool HasTypeFlag(TypeFlag typeFlag) const + { + return (typeFlags_ & typeFlag) != 0; + } + + void AddTypeFlag(TypeFlag typeFlag) + { + typeFlags_ |= typeFlag; + } + + void RemoveTypeFlag(TypeFlag typeFlag) + { + typeFlags_ &= ~typeFlag; + } + + uint64_t Id() const + { + return id_; + } + + void SetVariable(binder::Variable *variable) + { + variable_ = variable; + } + + binder::Variable *Variable() + { + return variable_; + } + + const binder::Variable *Variable() const + { + return variable_; + } virtual void ToString(std::stringstream &ss) const = 0; virtual void ToStringAsSrc(std::stringstream &ss) const; virtual TypeFacts GetTypeFacts() const = 0; - virtual void Identical(TypeRelation *relation, const Type *other) const; - virtual void AssignmentTarget(TypeRelation *relation, const Type *source) const = 0; - virtual bool AssignmentSource(TypeRelation *relation, const Type *target) const; - virtual void Compare(TypeRelation *relation, const Type *other) const; + virtual void Identical(TypeRelation *relation, Type *other); + virtual void AssignmentTarget(TypeRelation *relation, Type *source) = 0; + virtual bool AssignmentSource(TypeRelation *relation, Type *target); + virtual void Compare(TypeRelation *relation, Type *other); virtual Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) = 0; diff --git a/es2panda/typescript/types/typeFlag.h b/es2panda/typescript/types/typeFlag.h index b041bb9180477f8b7bf1269fc170613b13dde39d..5ac2c5f57334c8df52b76a54230ccf7933438edc 100644 --- a/es2panda/typescript/types/typeFlag.h +++ b/es2panda/typescript/types/typeFlag.h @@ -55,8 +55,8 @@ enum class TypeFlag : uint64_t { ARRAY = 1ULL << 29, // x: number[] FUNCTION = 1ULL << 30, // x: (a) => b NON_PRIMITIVE = 1ULL << 31, // x: object - RELATION_CHECKED = 1ULL << 32, - TYPE_REFERENCE = 1ULL << 33, + TYPE_REFERENCE = 1ULL << 32, + READONLY = 1ULL << 33, COMPUTED_TYPE_LITERAL_NAME = STRING_LITERAL | NUMBER_LITERAL | ENUM, COMPUTED_NAME = COMPUTED_TYPE_LITERAL_NAME | STRING | NUMBER | ANY | SYMBOL, ANY_OR_UNKNOWN = ANY | UNKNOWN, diff --git a/es2panda/typescript/types/typeParameter.cpp b/es2panda/typescript/types/typeParameter.cpp index de308178c6211cc3369d2fa2a1ef826c643219a5..e28f38cbb03a442222d756b5deeceb22d78db1d3 100644 --- a/es2panda/typescript/types/typeParameter.cpp +++ b/es2panda/typescript/types/typeParameter.cpp @@ -17,42 +17,17 @@ namespace panda::es2panda::checker { -TypeParameter::TypeParameter(Type *constraint, Type *defaultType) - : Type(TypeFlag::TYPE_PARAMETER), constraint_(constraint), default_(defaultType) -{ -} - -const Type *TypeParameter::ConstraintType() const -{ - return constraint_; -} - -Type *TypeParameter::DefaultType() -{ - return default_; -} - -Type **TypeParameter::DefaultTypeRef() -{ - return &default_; -} - -void TypeParameter::SetDefaultType(Type *type) -{ - default_ = type; -} - void TypeParameter::ToString([[maybe_unused]] std::stringstream &ss) const { UNREACHABLE(); } -void TypeParameter::Identical([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *other) const +void TypeParameter::Identical([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *other) { UNREACHABLE(); } -void TypeParameter::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *source) const +void TypeParameter::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *source) { UNREACHABLE(); } diff --git a/es2panda/typescript/types/typeParameter.h b/es2panda/typescript/types/typeParameter.h index 7462e2508cbc26c505f51b5987b636020cc53d3a..e30ad0475ffddda4a7b02ee431696121f563ae9d 100644 --- a/es2panda/typescript/types/typeParameter.h +++ b/es2panda/typescript/types/typeParameter.h @@ -22,19 +22,37 @@ namespace panda::es2panda::checker { class TypeParameter : public Type { public: - TypeParameter(Type *constraint, Type *defaultType); + TypeParameter(Type *constraint, Type *defaultType) + : Type(TypeFlag::TYPE_PARAMETER), constraint_(constraint), default_(defaultType) + { + } + + const Type *ConstraintType() const + { + return constraint_; + } + + Type *DefaultType() + { + return default_; + } + + Type **DefaultTypeRef() + { + return &default_; + } + + void SetDefaultType(Type *type) + { + default_ = type; + } void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; - const Type *ConstraintType() const; - Type *DefaultType(); - Type **DefaultTypeRef(); - void SetDefaultType(Type *type); - private: Type *constraint_; Type *default_; diff --git a/es2panda/typescript/types/typeReference.cpp b/es2panda/typescript/types/typeReference.cpp index dc693438a2881d52f331414d69a9d151a1dce19b..fd5daa7c116eb6e0d3b6c8c6e2b774717d7245a5 100644 --- a/es2panda/typescript/types/typeReference.cpp +++ b/es2panda/typescript/types/typeReference.cpp @@ -17,18 +17,6 @@ namespace panda::es2panda::checker { -TypeReference::TypeReference(Type **ref) : Type(TypeFlag::TYPE_REFERENCE), ref_(ref) {} - -Type *TypeReference::Ref() -{ - return (*ref_); -} - -const Type *TypeReference::Ref() const -{ - return (*ref_); -} - void TypeReference::ToString(std::stringstream &ss) const { if (*ref_) { @@ -36,14 +24,14 @@ void TypeReference::ToString(std::stringstream &ss) const } } -void TypeReference::Identical(TypeRelation *relation, const Type *other) const +void TypeReference::Identical(TypeRelation *relation, Type *other) { if (*ref_) { (*ref_)->Identical(relation, other); } } -void TypeReference::AssignmentTarget(TypeRelation *relation, const Type *source) const +void TypeReference::AssignmentTarget(TypeRelation *relation, Type *source) { if (*ref_) { (*ref_)->AssignmentTarget(relation, source->IsTypeReference() ? source->AsTypeReference()->Ref() : source); diff --git a/es2panda/typescript/types/typeReference.h b/es2panda/typescript/types/typeReference.h index 3f2876203114cdca88cefa11cd429923069864a4..9891f824e4b5eea741eff94871a66a5d49f2b8ab 100644 --- a/es2panda/typescript/types/typeReference.h +++ b/es2panda/typescript/types/typeReference.h @@ -22,17 +22,24 @@ namespace panda::es2panda::checker { class TypeReference : public Type { public: - explicit TypeReference(Type **ref); + explicit TypeReference(Type **ref) : Type(TypeFlag::TYPE_REFERENCE), ref_(ref) {} + + Type *Ref() + { + return *ref_; + } + + const Type *Ref() const + { + return *ref_; + } void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; - Type *Ref(); - const Type *Ref() const; - private: Type **ref_; }; diff --git a/es2panda/typescript/types/typeRelation.cpp b/es2panda/typescript/types/typeRelation.cpp index 6f9d638e7152cbe61fe8b6d6b9f69b26b9523f1a..e0a0279e52c74e666e7e111556cd075499038e01 100644 --- a/es2panda/typescript/types/typeRelation.cpp +++ b/es2panda/typescript/types/typeRelation.cpp @@ -38,6 +38,16 @@ const Checker *TypeRelation::GetChecker() const return checker_; } +Checker *TypeRelation::GetChecker() +{ + return checker_; +} + +ArenaAllocator *TypeRelation::Allocator() +{ + return checker_->Allocator(); +} + RelationResult TypeRelation::CacheLookup(const Type *source, const Type *target, const RelationHolder &holder, RelationType type) const { @@ -62,7 +72,7 @@ RelationResult TypeRelation::CacheLookup(const Type *source, const Type *target, return RelationResult::CACHE_MISS; } -bool TypeRelation::IsIdenticalTo(const Type *source, const Type *target) +bool TypeRelation::IsIdenticalTo(Type *source, Type *target) { if (source == target) { Result(true); @@ -71,6 +81,8 @@ bool TypeRelation::IsIdenticalTo(const Type *source, const Type *target) result_ = CacheLookup(source, target, checker_->IdenticalResults(), RelationType::IDENTICAL); if (result_ == RelationResult::CACHE_MISS) { + checker_->ResolveStructuredTypeMembers(source); + checker_->ResolveStructuredTypeMembers(target); result_ = RelationResult::FALSE; target->Identical(this, source); checker_->IdenticalResults().cached.insert({{source->Id(), target->Id()}, {result_, RelationType::IDENTICAL}}); @@ -79,7 +91,7 @@ bool TypeRelation::IsIdenticalTo(const Type *source, const Type *target) return result_ == RelationResult::TRUE; } -bool TypeRelation::IsIdenticalTo(const Signature *source, const Signature *target) +bool TypeRelation::IsIdenticalTo(Signature *source, Signature *target) { if (source == target) { Result(true); @@ -92,7 +104,7 @@ bool TypeRelation::IsIdenticalTo(const Signature *source, const Signature *targe return result_ == RelationResult::TRUE; } -bool TypeRelation::IsIdenticalTo(const IndexInfo *source, const IndexInfo *target) +bool TypeRelation::IsIdenticalTo(IndexInfo *source, IndexInfo *target) { if (source == target) { Result(true); @@ -105,7 +117,7 @@ bool TypeRelation::IsIdenticalTo(const IndexInfo *source, const IndexInfo *targe return result_ == RelationResult::TRUE; } -bool TypeRelation::IsAssignableTo(const Type *source, const Type *target) +bool TypeRelation::IsAssignableTo(Type *source, Type *target) { result_ = CacheLookup(source, target, checker_->AssignableResults(), RelationType::ASSIGNABLE); if (result_ == RelationResult::CACHE_MISS) { @@ -126,7 +138,7 @@ bool TypeRelation::IsAssignableTo(const Type *source, const Type *target) return result_ == RelationResult::TRUE; } -bool TypeRelation::IsComparableTo(const Type *source, const Type *target) +bool TypeRelation::IsComparableTo(Type *source, Type *target) { result_ = CacheLookup(source, target, checker_->ComparableResults(), RelationType::COMPARABLE); diff --git a/es2panda/typescript/types/typeRelation.h b/es2panda/typescript/types/typeRelation.h index 27bc93180bd8746f0dffe02d55cd6633ec1775ce..255a9ee038ab8797e61201fe84909b1aca6000c5 100644 --- a/es2panda/typescript/types/typeRelation.h +++ b/es2panda/typescript/types/typeRelation.h @@ -87,16 +87,18 @@ class TypeRelation { public: explicit TypeRelation(Checker *checker); - bool IsIdenticalTo(const Type *source, const Type *target); - bool IsIdenticalTo(const Signature *source, const Signature *target); - bool IsIdenticalTo(const IndexInfo *source, const IndexInfo *target); - bool IsAssignableTo(const Type *source, const Type *target); - bool IsComparableTo(const Type *source, const Type *target); + bool IsIdenticalTo(Type *source, Type *target); + bool IsIdenticalTo(Signature *source, Signature *target); + bool IsIdenticalTo(IndexInfo *source, IndexInfo *target); + bool IsAssignableTo(Type *source, Type *target); + bool IsComparableTo(Type *source, Type *target); void RaiseError(const std::string &errMsg, const lexer::SourcePosition &loc) const; void RaiseError(std::initializer_list list, const lexer::SourcePosition &loc) const; void Result(bool res); const Checker *GetChecker() const; + Checker *GetChecker(); + ArenaAllocator *Allocator(); bool IsTrue() const; private: @@ -105,7 +107,7 @@ private: Checker *checker_; RelationResult result_; -}; +}; // namespace panda::es2panda::checker } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/undefinedType.cpp b/es2panda/typescript/types/undefinedType.cpp index bb34e2f1541d635c4aea72f91eec145598bd64ac..ad21584f2d88a3f110440c239a8387f9189386cd 100644 --- a/es2panda/typescript/types/undefinedType.cpp +++ b/es2panda/typescript/types/undefinedType.cpp @@ -17,29 +17,25 @@ namespace panda::es2panda::checker { -UndefinedType::UndefinedType() : Type(TypeFlag::UNDEFINED) {} - void UndefinedType::ToString(std::stringstream &ss) const { ss << "undefined"; } -void UndefinedType::Identical(TypeRelation *relation, const Type *other) const +void UndefinedType::Identical(TypeRelation *relation, Type *other) { if (other->IsUndefinedType()) { relation->Result(true); } } -bool UndefinedType::AssignmentSource(TypeRelation *relation, [[maybe_unused]] const Type *target) const +bool UndefinedType::AssignmentSource(TypeRelation *relation, [[maybe_unused]] Type *target) { relation->Result(!target->IsNeverType()); return relation->IsTrue(); } -void UndefinedType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *source) const -{ -} +void UndefinedType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *source) {} TypeFacts UndefinedType::GetTypeFacts() const { diff --git a/es2panda/typescript/types/undefinedType.h b/es2panda/typescript/types/undefinedType.h index 449bbf3cf3effce39d37dbab668e836bf8a2ecdf..22bfc9d044a31cd5b86163593c568bc1c9d9722e 100644 --- a/es2panda/typescript/types/undefinedType.h +++ b/es2panda/typescript/types/undefinedType.h @@ -22,12 +22,12 @@ namespace panda::es2panda::checker { class UndefinedType : public Type { public: - UndefinedType(); + UndefinedType() : Type(TypeFlag::UNDEFINED) {} void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - bool AssignmentSource(TypeRelation *relation, const Type *target) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + bool AssignmentSource(TypeRelation *relation, Type *target) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/unionType.cpp b/es2panda/typescript/types/unionType.cpp index 54211b592e8b72c5426af90bb21e1a6c981dd30f..49985697de1bb32af3df7e89f0e8a6f1c1cbe9f9 100644 --- a/es2panda/typescript/types/unionType.cpp +++ b/es2panda/typescript/types/unionType.cpp @@ -20,66 +20,6 @@ namespace panda::es2panda::checker { -UnionType::UnionType(std::vector &&constituentTypes) - : Type(TypeFlag::UNION), constituentTypes_(std::move(constituentTypes)) -{ - for (auto *it : constituentTypes_) { - AddConstituentFlag(it->TypeFlags()); - } -} - -UnionType::UnionType(std::initializer_list types) : Type(TypeFlag::UNION) -{ - for (auto *it : types) { - constituentTypes_.push_back(it); - AddConstituentFlag(it->TypeFlags()); - } -} - -const std::vector &UnionType::ConstituentTypes() const -{ - return constituentTypes_; -} - -std::vector &UnionType::ConstituentTypes() -{ - return constituentTypes_; -} - -void UnionType::AddConstituentType(Type *type, TypeRelation *relation) -{ - if ((HasConstituentFlag(TypeFlag::NUMBER) && type->IsNumberLiteralType()) || - (HasConstituentFlag(TypeFlag::STRING) && type->IsStringLiteralType()) || - (HasConstituentFlag(TypeFlag::BIGINT) && type->IsBigintLiteralType()) || - (HasConstituentFlag(TypeFlag::BOOLEAN) && type->IsBooleanLiteralType())) { - return; - } - - for (auto *it : constituentTypes_) { - if (relation->IsIdenticalTo(it, type)) { - return; - } - } - - AddConstituentFlag(type->TypeFlags()); - constituentTypes_.push_back(type); -} - -void UnionType::AddConstituentFlag(TypeFlag flag) -{ - constituentFlags_ |= flag; -} - -void UnionType::RemoveConstituentFlag(TypeFlag flag) -{ - constituentFlags_ &= ~flag; -} - -bool UnionType::HasConstituentFlag(TypeFlag flag) const -{ - return (constituentFlags_ & flag) != 0; -} - void UnionType::ToString(std::stringstream &ss) const { for (auto it = constituentTypes_.begin(); it != constituentTypes_.end(); it++) { @@ -90,19 +30,19 @@ void UnionType::ToString(std::stringstream &ss) const } } -bool UnionType::EachTypeRelatedToSomeType(TypeRelation *relation, const UnionType *source, const UnionType *target) +bool UnionType::EachTypeRelatedToSomeType(TypeRelation *relation, UnionType *source, UnionType *target) { return std::all_of(source->constituentTypes_.begin(), source->constituentTypes_.end(), - [relation, target](const auto *s) { return TypeRelatedToSomeType(relation, s, target); }); + [relation, target](auto *s) { return TypeRelatedToSomeType(relation, s, target); }); } -bool UnionType::TypeRelatedToSomeType(TypeRelation *relation, const Type *source, const UnionType *target) +bool UnionType::TypeRelatedToSomeType(TypeRelation *relation, Type *source, UnionType *target) { return std::any_of(target->constituentTypes_.begin(), target->constituentTypes_.end(), - [relation, source](const auto *t) { return relation->IsIdenticalTo(source, t); }); + [relation, source](auto *t) { return relation->IsIdenticalTo(source, t); }); } -void UnionType::Identical(TypeRelation *relation, const Type *other) const +void UnionType::Identical(TypeRelation *relation, Type *other) { if (other->IsUnionType()) { if (EachTypeRelatedToSomeType(relation, this, other->AsUnionType()) && @@ -115,7 +55,7 @@ void UnionType::Identical(TypeRelation *relation, const Type *other) const relation->Result(false); } -bool UnionType::AssignmentSource(TypeRelation *relation, const Type *target) const +bool UnionType::AssignmentSource(TypeRelation *relation, Type *target) { for (auto *it : constituentTypes_) { if (!relation->IsAssignableTo(it, target)) { @@ -127,7 +67,7 @@ bool UnionType::AssignmentSource(TypeRelation *relation, const Type *target) con return true; } -void UnionType::AssignmentTarget(TypeRelation *relation, const Type *source) const +void UnionType::AssignmentTarget(TypeRelation *relation, Type *source) { for (auto *it : constituentTypes_) { if (relation->IsAssignableTo(source, it)) { @@ -147,7 +87,7 @@ TypeFacts UnionType::GetTypeFacts() const return facts; } -void UnionType::RemoveDuplicatedTypes(TypeRelation *relation, std::vector &constituentTypes) +void UnionType::RemoveDuplicatedTypes(TypeRelation *relation, ArenaVector &constituentTypes) { auto compare = constituentTypes.begin(); @@ -166,7 +106,7 @@ void UnionType::RemoveDuplicatedTypes(TypeRelation *relation, std::vector &constituentTypes = type->ConstituentTypes(); + auto &constituentTypes = type->ConstituentTypes(); /* TODO(dbatyai): use std::erase_if */ auto it = constituentTypes.begin(); while (it != constituentTypes.end()) { @@ -231,7 +171,7 @@ void UnionType::RemoveRedundantLiteralTypesFromUnion(UnionType *type) Type *UnionType::Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) { - std::vector copiedConstituents(constituentTypes_.size()); + ArenaVector copiedConstituents(constituentTypes_.size(), allocator->Adapter()); for (auto *it : constituentTypes_) { copiedConstituents.push_back(it->Instantiate(allocator, relation, globalTypes)); diff --git a/es2panda/typescript/types/unionType.h b/es2panda/typescript/types/unionType.h index 64aa72674bcd49e1d422626a6fb82450a0eb9b47..eff03b223acc71af43a60cff3c7056ee9cb40522 100644 --- a/es2panda/typescript/types/unionType.h +++ b/es2panda/typescript/types/unionType.h @@ -24,33 +24,112 @@ class GlobalTypesHolder; class UnionType : public Type { public: - explicit UnionType(std::vector &&constituentTypes); - UnionType(std::initializer_list types); + UnionType(ArenaAllocator *allocator, std::initializer_list types) + : Type(TypeFlag::UNION), constituentTypes_(allocator->Adapter()) + { + for (auto *it : types) { + constituentTypes_.push_back(it); + } - const std::vector &ConstituentTypes() const; - std::vector &ConstituentTypes(); - void AddConstituentType(Type *type, TypeRelation *relation); - void AddConstituentFlag(TypeFlag flag); - void RemoveConstituentFlag(TypeFlag flag); - bool HasConstituentFlag(TypeFlag flag) const; + for (auto *it : constituentTypes_) { + AddConstituentFlag(it->TypeFlags()); + } + } + + explicit UnionType(ArenaVector &&constituentTypes) + : Type(TypeFlag::UNION), constituentTypes_(std::move(constituentTypes)) + { + for (auto *it : constituentTypes_) { + AddConstituentFlag(it->TypeFlags()); + } + } + + explicit UnionType(ArenaVector &constituentTypes) + : Type(TypeFlag::UNION), constituentTypes_(constituentTypes) + { + for (auto *it : constituentTypes_) { + AddConstituentFlag(it->TypeFlags()); + } + } + + const ArenaVector &ConstituentTypes() const + { + return constituentTypes_; + } + + ArenaVector &ConstituentTypes() + { + return constituentTypes_; + } + + void AddConstituentType(Type *type, TypeRelation *relation) + { + if ((HasConstituentFlag(TypeFlag::NUMBER) && type->IsNumberLiteralType()) || + (HasConstituentFlag(TypeFlag::STRING) && type->IsStringLiteralType()) || + (HasConstituentFlag(TypeFlag::BIGINT) && type->IsBigintLiteralType()) || + (HasConstituentFlag(TypeFlag::BOOLEAN) && type->IsBooleanLiteralType())) { + return; + } + + for (auto *it : constituentTypes_) { + if (relation->IsIdenticalTo(it, type)) { + return; + } + } + + AddConstituentFlag(type->TypeFlags()); + constituentTypes_.push_back(type); + } + + void AddConstituentFlag(TypeFlag flag) + { + constituentFlags_ |= flag; + } + + void RemoveConstituentFlag(TypeFlag flag) + { + constituentFlags_ &= ~flag; + } + + bool HasConstituentFlag(TypeFlag flag) const + { + return (constituentFlags_ & flag) != 0; + } + + std::unordered_map &CachedSyntheticPropertis() + { + return cachedSynthecticProperties_; + } + + ObjectType *MergedObjectType() + { + return mergedObjectType_; + } + + void SetMergedObjectType(ObjectType *type) + { + mergedObjectType_ = type; + } void ToString(std::stringstream &ss) const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; - bool AssignmentSource(TypeRelation *relation, const Type *target) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; + bool AssignmentSource(TypeRelation *relation, Type *target) override; TypeFacts GetTypeFacts() const override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; - static void RemoveDuplicatedTypes(TypeRelation *relation, std::vector &constituentTypes); + static void RemoveDuplicatedTypes(TypeRelation *relation, ArenaVector &constituentTypes); static Type *HandleUnionType(UnionType *unionType, GlobalTypesHolder *globalTypesHolder); static void RemoveRedundantLiteralTypesFromUnion(UnionType *type); private: - static bool EachTypeRelatedToSomeType(TypeRelation *relation, const UnionType *source, const UnionType *target); - static bool TypeRelatedToSomeType(TypeRelation *relation, const Type *source, const UnionType *target); + static bool EachTypeRelatedToSomeType(TypeRelation *relation, UnionType *source, UnionType *target); + static bool TypeRelatedToSomeType(TypeRelation *relation, Type *source, UnionType *target); - std::vector constituentTypes_; + ArenaVector constituentTypes_; TypeFlag constituentFlags_ {TypeFlag::NONE}; + std::unordered_map cachedSynthecticProperties_ {}; + ObjectType *mergedObjectType_ {nullptr}; }; } // namespace panda::es2panda::checker diff --git a/es2panda/typescript/types/unknownType.cpp b/es2panda/typescript/types/unknownType.cpp index 43c3414626f3d0e184105015b66b0b11fa272972..5115e51cb1a327aeac160c0100572af1b7d64620 100644 --- a/es2panda/typescript/types/unknownType.cpp +++ b/es2panda/typescript/types/unknownType.cpp @@ -17,9 +17,6 @@ namespace panda::es2panda::checker { -// Unknown Type -UnknownType::UnknownType() : Type(TypeFlag::UNKNOWN) {} - void UnknownType::ToString(std::stringstream &ss) const { ss << "unknown"; @@ -30,14 +27,14 @@ TypeFacts UnknownType::GetTypeFacts() const return TypeFacts::ALL; } -void UnknownType::Identical(TypeRelation *relation, const Type *other) const +void UnknownType::Identical(TypeRelation *relation, Type *other) { if (other->IsUnknownType()) { relation->Result(true); } } -void UnknownType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *source) const +void UnknownType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *source) { relation->Result(true); } diff --git a/es2panda/typescript/types/unknownType.h b/es2panda/typescript/types/unknownType.h index 813fa963eeeae95772dd062bb75f3e784c9ba778..cdbb2758d08111f5e6e9dd738a4c95d0d8af7efa 100644 --- a/es2panda/typescript/types/unknownType.h +++ b/es2panda/typescript/types/unknownType.h @@ -22,12 +22,12 @@ namespace panda::es2panda::checker { class UnknownType : public Type { public: - UnknownType(); + UnknownType() : Type(TypeFlag::UNKNOWN) {} void ToString(std::stringstream &ss) const override; TypeFacts GetTypeFacts() const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/typescript/types/voidType.cpp b/es2panda/typescript/types/voidType.cpp index 19aaf43f81f6b4f8cecff6502fb9a3c83e3df94d..9b3895deec8c65a661c8da817cedf0ac9e85bf00 100644 --- a/es2panda/typescript/types/voidType.cpp +++ b/es2panda/typescript/types/voidType.cpp @@ -17,8 +17,6 @@ namespace panda::es2panda::checker { -VoidType::VoidType() : Type(TypeFlag::VOID) {} - void VoidType::ToString(std::stringstream &ss) const { ss << "void"; @@ -29,14 +27,14 @@ TypeFacts VoidType::GetTypeFacts() const return TypeFacts::UNDEFINED_FACTS; } -void VoidType::Identical(TypeRelation *relation, const Type *other) const +void VoidType::Identical(TypeRelation *relation, Type *other) { if (other->IsVoidType()) { relation->Result(true); } } -void VoidType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] const Type *source) const {} +void VoidType::AssignmentTarget([[maybe_unused]] TypeRelation *relation, [[maybe_unused]] Type *source) {} Type *VoidType::Instantiate([[maybe_unused]] ArenaAllocator *allocator, [[maybe_unused]] TypeRelation *relation, [[maybe_unused]] GlobalTypesHolder *globalTypes) diff --git a/es2panda/typescript/types/voidType.h b/es2panda/typescript/types/voidType.h index cf0a5201330f827a7369c626d3a235f531fd90eb..77cb0082cb023815d1c4e428a739d79fa8f2af39 100644 --- a/es2panda/typescript/types/voidType.h +++ b/es2panda/typescript/types/voidType.h @@ -22,12 +22,12 @@ namespace panda::es2panda::checker { class VoidType : public Type { public: - VoidType(); + VoidType() : Type(TypeFlag::VOID) {} void ToString(std::stringstream &ss) const override; TypeFacts GetTypeFacts() const override; - void Identical(TypeRelation *relation, const Type *other) const override; - void AssignmentTarget(TypeRelation *relation, const Type *source) const override; + void Identical(TypeRelation *relation, Type *other) override; + void AssignmentTarget(TypeRelation *relation, Type *source) override; Type *Instantiate(ArenaAllocator *allocator, TypeRelation *relation, GlobalTypesHolder *globalTypes) override; }; diff --git a/es2panda/util/helpers.cpp b/es2panda/util/helpers.cpp index d1e0477f13d4791daffa6789c6bbe2a14d0557f9..f04ee77ddda398431b61fd56e05df28b8e485a84 100644 --- a/es2panda/util/helpers.cpp +++ b/es2panda/util/helpers.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include namespace panda::es2panda::util { @@ -392,6 +393,9 @@ std::tuple Helpers::ParamName(ArenaAllocator *allocator, } break; } + case ir::AstNodeType::TS_PARAMETER_PROPERTY: { + return ParamName(allocator, param->AsTSParameterProperty()->Parameter(), index); + } default: break; }