From 6bd760c4ae9b562f6ff8aeb1b97656230dd3f775 Mon Sep 17 00:00:00 2001 From: Robin Sommer Date: Wed, 27 Mar 2024 11:27:05 +0100 Subject: [PATCH] Support/fix public type aliases to units. An alias like `public type Unit1 = Unit2` used to lead to C++-side compiler errors, which this fixes. We also fully support this now by making both `Unit1` and `Unit2` available for parsing to host applications. Internally, the `Unit1` parser is just a small facade pointing to the parsing functions for `Unit2`. Closes #1493. --- hilti/toolchain/include/ast/type.h | 3 + hilti/toolchain/src/ast/ast-context.cc | 10 +- hilti/toolchain/src/ast/type.cc | 2 + hilti/toolchain/src/compiler/resolver.cc | 2 +- .../include/compiler/detail/codegen/codegen.h | 4 + .../toolchain/src/compiler/codegen/codegen.cc | 15 +- .../src/compiler/codegen/unit-builder.cc | 189 ++++++------ spicy/toolchain/src/compiler/resolver.cc | 2 +- spicy/toolchain/src/compiler/validator.cc | 7 + tests/Baseline/hilti.ast.imported-id/output | 282 +++++++++--------- .../spicy.types.unit.alias-fail/output | 3 + tests/Baseline/spicy.types.unit.alias/output | 12 + tests/spicy/types/unit/alias-fail.spicy | 15 + tests/spicy/types/unit/alias.spicy | 23 ++ 14 files changed, 333 insertions(+), 236 deletions(-) create mode 100644 tests/Baseline/spicy.types.unit.alias-fail/output create mode 100644 tests/Baseline/spicy.types.unit.alias/output create mode 100644 tests/spicy/types/unit/alias-fail.spicy create mode 100644 tests/spicy/types/unit/alias.spicy diff --git a/hilti/toolchain/include/ast/type.h b/hilti/toolchain/include/ast/type.h index 2a60ebd11b..c5e05b939c 100644 --- a/hilti/toolchain/include/ast/type.h +++ b/hilti/toolchain/include/ast/type.h @@ -378,6 +378,9 @@ class QualifiedType : public Node { /** Returns the type's "sideness". */ auto side() const { return _side; } + /** Shortcut to try-cast to `type::Name`. */ + type::Name* alias() const; + /** * Sets the constness of the type. * diff --git a/hilti/toolchain/src/ast/ast-context.cc b/hilti/toolchain/src/ast/ast-context.cc index c27e80362c..cd622ac908 100644 --- a/hilti/toolchain/src/ast/ast-context.cc +++ b/hilti/toolchain/src/ast/ast-context.cc @@ -387,10 +387,12 @@ struct VisitorCheckIDs : hilti::visitor::PreOrder { logger().internalError(util::fmt("declaration without canonical ID found: %s", n->id())); } - if ( ! n->fullyQualifiedID() ) { - hilti::detail::ast_dumper::dump(std::cerr, n->parent()->as()); - logger().internalError(util::fmt("declaration without fully qualified ID found: %s", n->id())); - } + /* + * if ( ! n->fullyQualifiedID() ) { + * hilti::detail::ast_dumper::dump(std::cerr, n->parent()->as()); + * logger().internalError(util::fmt("declaration without fully qualified ID found: %s", n->id())); + * } + */ } }; diff --git a/hilti/toolchain/src/ast/type.cc b/hilti/toolchain/src/ast/type.cc index 916535265c..37713d3c78 100644 --- a/hilti/toolchain/src/ast/type.cc +++ b/hilti/toolchain/src/ast/type.cc @@ -86,6 +86,8 @@ bool QualifiedType::isResolved(node::CycleDetector* cd) const { bool QualifiedType::isAuto() const { return type()->isA(); } +type::Name* QualifiedType::alias() const { return _type()->tryAs(); } + hilti::node::Properties QualifiedType::properties() const { auto side = (_side == Side::LHS ? "lhs" : "rhs"); auto constness = (_constness == Constness::Const ? "true" : "false"); diff --git a/hilti/toolchain/src/compiler/resolver.cc b/hilti/toolchain/src/compiler/resolver.cc index 4240df7819..6bc29860a7 100644 --- a/hilti/toolchain/src/compiler/resolver.cc +++ b/hilti/toolchain/src/compiler/resolver.cc @@ -1067,7 +1067,7 @@ struct VisitorPass2 : visitor::MutatingPostOrder { setFqID(n, m->scopeID() + n->id()); // global scope } - if ( ! n->declarationIndex() ) { + if ( ! n->declarationIndex() && ! n->type()->alias() ) { auto index = context()->register_(n); recordChange(n->type()->type(), util::fmt("set type's declaration to %s", index)); } diff --git a/spicy/toolchain/include/compiler/detail/codegen/codegen.h b/spicy/toolchain/include/compiler/detail/codegen/codegen.h index 44a244830d..9904c89bd3 100644 --- a/spicy/toolchain/include/compiler/detail/codegen/codegen.h +++ b/spicy/toolchain/include/compiler/detail/codegen/codegen.h @@ -52,6 +52,9 @@ class CodeGen { type::Unit* unit, bool declare_only = true); // Compiles a Unit type into its HILTI struct representation. + /** For a public unit type alias, creates the runtime code to register the parser under the alias name. */ + void compilePublicUnitAlias(hilti::declaration::Module* module, const ID& alias_id, type::Unit* unit); + hilti::declaration::Function* compileHook(const type::Unit& unit, const ID& id, type::unit::item::Field* field, bool foreach, bool debug, hilti::type::function::Parameters params, hilti::Statement* body, Expression* priority, const hilti::Meta& meta); @@ -93,6 +96,7 @@ class CodeGen { private: bool _compileModule(hilti::declaration::Module* module, int pass); void _updateDeclarations(visitor::MutatingPostOrder* v, hilti::declaration::Module* module); + void _compileParserRegistration(const ID& public_id, const ID& struct_id, type::Unit* unit); Builder* _builder; codegen::GrammarBuilder _gb; diff --git a/spicy/toolchain/src/compiler/codegen/codegen.cc b/spicy/toolchain/src/compiler/codegen/codegen.cc index 6b45553fb8..fea02a0f98 100644 --- a/spicy/toolchain/src/compiler/codegen/codegen.cc +++ b/spicy/toolchain/src/compiler/codegen/codegen.cc @@ -48,14 +48,24 @@ struct VisitorPass1 : public visitor::MutatingPostOrder { CodeGen* cg; hilti::declaration::Module* module = nullptr; - ID module_id = ID(""); void operator()(hilti::declaration::Type* n) final { - // Replace unit type with compiled struct type. auto u = n->type()->type()->tryAs(); if ( ! u ) return; + if ( n->type()->alias() ) { + // Special case: For an alias, if it's public, we just need to + // register the unit under the alias name as well. + if ( n->linkage() == hilti::declaration::Linkage::Public ) + cg->compilePublicUnitAlias(module, n->fullyQualifiedID(), u); + + n->type()->type(false)->as()->clearResolvedTypeIndex(); // will rebind to new struct + return; + } + + // Replace unit type with compiled struct type. + if ( auto r = cg->grammarBuilder()->run(u); ! r ) { hilti::logger().error(r.error().description(), n->location()); return; @@ -92,7 +102,6 @@ struct VisitorPass2 : public visitor::MutatingPostOrder { CodeGen* cg; hilti::declaration::Module* module = nullptr; - ID module_id = ID(""); Expression* argument(Expression* args, unsigned int i, std::optional def = {}) { auto ctor = args->as()->ctor(); diff --git a/spicy/toolchain/src/compiler/codegen/unit-builder.cc b/spicy/toolchain/src/compiler/codegen/unit-builder.cc index 440fed81e8..27931c6932 100644 --- a/spicy/toolchain/src/compiler/codegen/unit-builder.cc +++ b/spicy/toolchain/src/compiler/codegen/unit-builder.cc @@ -336,96 +336,119 @@ UnqualifiedType* CodeGen::compileUnit(type::Unit* unit, bool declare_only) { auto s = builder()->typeStruct(unit->parameters(), std::move(v.fields)); _pb.addParserMethods(s, unit, declare_only); - if ( ! declare_only ) { - auto description = unit->propertyItem("%description"); - auto mime_types = - hilti::node::transform(unit->propertyItems("%mime-type"), [](const auto& p) { return p->expression(); }); - auto ports = hilti::node::transform(unit->propertyItems("%port"), [this](auto p) -> Expression* { - auto dir = ID("spicy_rt::Direction::Both"); - - if ( const auto& attrs = p->attributes() ) { - auto orig = attrs->find("&originator"); - auto resp = attrs->find("&responder"); - - if ( orig && ! resp ) - dir = ID("spicy_rt::Direction::Originator"); - - else if ( resp && ! orig ) - dir = ID("spicy_rt::Direction::Responder"); - } + if ( ! declare_only ) + _compileParserRegistration(unit->typeID(), unit->typeID(), unit); - return builder()->tuple({p->expression(), builder()->expressionName(dir)}); - }); + return s; +} - Expression* parse1 = builder()->null(); - Expression* parse3 = builder()->null(); +void CodeGen::compilePublicUnitAlias(hilti::declaration::Module* module, const ID& alias_id, type::Unit* unit) { + // We create a mini parser struct here that just contains the `__parser` field for runtime registration. + auto attrs = builder()->attributeSet( + {builder()->attribute("&static"), builder()->attribute("&internal"), + builder()->attribute("&needed-by-feature", builder()->stringLiteral("supports_filters"))}); + + auto parser_field = builder()->declarationField(ID("__parser"), + builder()->qualifiedType(builder()->typeName("spicy_rt::Parser"), + hilti::Constness::Mutable), + attrs); + + auto struct_id = ID(alias_id.namespace_(), "__parser_" + alias_id.local().str()); + auto struct_decl = builder()->declarationType(struct_id.local(), + builder()->qualifiedType(builder()->typeStruct({parser_field}), + hilti::Constness::Mutable), + hilti::declaration::Linkage::Public, unit->meta()); + module->add(context(), struct_decl); + + _compileParserRegistration(alias_id, struct_id, unit); +} - // Only create `parse1` and `parse3` if the unit can be default constructed. - const auto& parameters = unit->parameters(); - if ( std::all_of(parameters.begin(), parameters.end(), [](const auto& p) { return p->default_(); }) ) { - parse1 = _pb.parseMethodExternalOverload1(*unit); - parse3 = _pb.parseMethodExternalOverload3(*unit); - } +void CodeGen::_compileParserRegistration(const ID& public_id, const ID& struct_id, type::Unit* unit) { + auto description = unit->propertyItem("%description"); + auto mime_types = + hilti::node::transform(unit->propertyItems("%mime-type"), [](const auto& p) { return p->expression(); }); + auto ports = hilti::node::transform(unit->propertyItems("%port"), [this](auto p) -> Expression* { + auto dir = ID("spicy_rt::Direction::Both"); - Expression* context_new = builder()->null(); + if ( const auto& attrs = p->attributes() ) { + auto orig = attrs->find("&originator"); + auto resp = attrs->find("&responder"); - if ( unit->contextType() ) - context_new = _pb.contextNewFunction(*unit); + if ( orig && ! resp ) + dir = ID("spicy_rt::Direction::Originator"); - _pb.pushBuilder(); + else if ( resp && ! orig ) + dir = ID("spicy_rt::Direction::Responder"); + } + + return builder()->tuple({p->expression(), builder()->expressionName(dir)}); + }); - // Register the parser if the `is_filter` or `supports_sinks` features are - // active; `public` units we always register (by passing an empty list of - // features to the feature guard). - const auto dependentFeatureFlags = unit->isPublic() ? - std::vector{} : - std::vector({"is_filter", "supports_sinks"}); - - _pb.guardFeatureCode(unit, dependentFeatureFlags, [&]() { - auto ty_mime_types = builder()->typeVector( - builder()->qualifiedType(builder()->typeName("spicy_rt::MIMEType"), hilti::Constness::Const)); - auto ty_ports = builder()->typeVector( - builder()->qualifiedType(builder()->typeName("spicy_rt::ParserPort"), hilti::Constness::Const)); - - auto parser = builder()->struct_( - {builder()->ctorStructField(ID("name"), builder()->stringLiteral(unit->typeID().str())), - builder()->ctorStructField(ID("is_public"), builder()->bool_(unit->isPublic())), - builder()->ctorStructField(ID("parse1"), parse1), - builder()->ctorStructField(ID("parse2"), _pb.parseMethodExternalOverload2(*unit)), - builder()->ctorStructField(ID("parse3"), parse3), - builder()->ctorStructField(ID("context_new"), context_new), - builder()->ctorStructField(ID("type_info"), builder()->typeinfo(builder()->id(unit->typeID()))), - // We emit different string types for generated and user-provided strings. The distinction - // is whether they have a location, so set a dummy location so both branches behave - // identically. - builder()->ctorStructField(ID("description"), - (description ? description->expression() : builder()->stringMutable(""))), - builder()->ctorStructField(ID("mime_types"), - builder()->vector(builder()->qualifiedType(ty_mime_types, - hilti::Constness::Const), - std::move(mime_types))), - builder()->ctorStructField(ID("ports"), - builder()->vector(builder()->qualifiedType(ty_ports, - hilti::Constness::Const), - std::move(ports)))}, - unit->meta()); - - _pb.builder()->addAssign(builder()->id(ID(unit->typeID(), "__parser")), parser); - - _pb.builder()->addExpression( - builder()->call("spicy_rt::registerParser", - {builder()->id(ID(unit->typeID(), "__parser")), builder()->scope(), - builder()->strongReference(builder()->qualifiedType(unit, hilti::Constness::Const))})); - }); - - auto block = _pb.popBuilder()->block(); - - auto register_unit = - builder()->function(ID(fmt("__register_%s_%s", hiltiModule()->uid(), unit->typeID().local())), - builder()->qualifiedType(builder()->typeVoid(), hilti::Constness::Const), {}, block, - hilti::type::function::Flavor::Standard, hilti::declaration::Linkage::Init); - addDeclaration(register_unit); + Expression* parse1 = builder()->null(); + Expression* parse3 = builder()->null(); + + // Only create `parse1` and `parse3` if the unit can be default constructed. + const auto& parameters = unit->parameters(); + if ( std::all_of(parameters.begin(), parameters.end(), [](const auto& p) { return p->default_(); }) ) { + parse1 = _pb.parseMethodExternalOverload1(*unit); + parse3 = _pb.parseMethodExternalOverload3(*unit); } - return s; + Expression* context_new = builder()->null(); + + if ( unit->contextType() ) + context_new = _pb.contextNewFunction(*unit); + + _pb.pushBuilder(); + + // Register the parser if the `is_filter` or `supports_sinks` features are + // active; `public` units we always register (by passing an empty list of + // features to the feature guard). + const auto dependentFeatureFlags = unit->isPublic() ? + std::vector{} : + std::vector({"is_filter", "supports_sinks"}); + + _pb.guardFeatureCode(unit, dependentFeatureFlags, [&]() { + auto ty_mime_types = builder()->typeVector( + builder()->qualifiedType(builder()->typeName("spicy_rt::MIMEType"), hilti::Constness::Const)); + auto ty_ports = builder()->typeVector( + builder()->qualifiedType(builder()->typeName("spicy_rt::ParserPort"), hilti::Constness::Const)); + + auto parser = builder()->struct_( + {builder()->ctorStructField(ID("name"), builder()->stringLiteral(public_id.str())), + builder()->ctorStructField(ID("is_public"), builder()->bool_(unit->isPublic())), + builder()->ctorStructField(ID("parse1"), parse1), + builder()->ctorStructField(ID("parse2"), _pb.parseMethodExternalOverload2(*unit)), + builder()->ctorStructField(ID("parse3"), parse3), + builder()->ctorStructField(ID("context_new"), context_new), + builder()->ctorStructField(ID("type_info"), builder()->typeinfo(builder()->id(unit->typeID()))), + // We emit different string types for generated and user-provided strings. The distinction + // is whether they have a location, so set a dummy location so both branches behave + // identically. + builder()->ctorStructField(ID("description"), + (description ? description->expression() : builder()->stringMutable(""))), + builder()->ctorStructField(ID("mime_types"), + builder()->vector(builder()->qualifiedType(ty_mime_types, + hilti::Constness::Const), + std::move(mime_types))), + builder()->ctorStructField(ID("ports"), + builder()->vector(builder()->qualifiedType(ty_ports, hilti::Constness::Const), + std::move(ports)))}, + unit->meta()); + + _pb.builder()->addAssign(builder()->id(ID(struct_id, "__parser")), parser); + + _pb.builder()->addExpression( + builder()->call("spicy_rt::registerParser", + {builder()->id(ID(struct_id, "__parser")), builder()->scope(), + builder()->strongReference(builder()->qualifiedType(unit, hilti::Constness::Const))})); + }); + + auto block = _pb.popBuilder()->block(); + + auto register_unit = + builder()->function(ID(fmt("__register_%s_%s", hiltiModule()->uid(), public_id.local())), + builder()->qualifiedType(builder()->typeVoid(), hilti::Constness::Const), {}, block, + hilti::type::function::Flavor::Standard, hilti::declaration::Linkage::Init); + addDeclaration(register_unit); } diff --git a/spicy/toolchain/src/compiler/resolver.cc b/spicy/toolchain/src/compiler/resolver.cc index 7e3367f77e..ad18f90864 100644 --- a/spicy/toolchain/src/compiler/resolver.cc +++ b/spicy/toolchain/src/compiler/resolver.cc @@ -295,7 +295,7 @@ struct VisitorPass2 : visitor::MutatingPostOrder { } void operator()(hilti::declaration::Type* n) final { - if ( auto u = n->type()->type()->tryAs() ) { + if ( auto u = n->type()->type()->tryAs(); u && ! n->type()->alias() ) { if ( n->linkage() == hilti::declaration::Linkage::Public && ! u->isPublic() ) { recordChange(n, "set public"); u->setPublic(true); diff --git a/spicy/toolchain/src/compiler/validator.cc b/spicy/toolchain/src/compiler/validator.cc index ee010c4550..754d069659 100644 --- a/spicy/toolchain/src/compiler/validator.cc +++ b/spicy/toolchain/src/compiler/validator.cc @@ -330,6 +330,13 @@ struct VisitorPost : visitor::PreOrder, hilti::validator::VisitorMixIn { error(fmt("unknown property '%s'", n->id().str()), n); } + void operator()(hilti::declaration::Type* n) final { + if ( n->linkage() == hilti::declaration::Linkage::Public && n->type()->alias() ) { + if ( n->type()->alias()->resolvedDeclaration()->linkage() != hilti::declaration::Linkage::Public ) + error("public unit alias cannot refer to a non-public type", n); + } + } + void operator()(spicy::type::unit::item::Property* n) final { if ( n->id().str() == "%random-access" ) { if ( n->expression() ) diff --git a/tests/Baseline/hilti.ast.imported-id/output b/tests/Baseline/hilti.ast.imported-id/output index ced9aede79..c5d3718e12 100644 --- a/tests/Baseline/hilti.ast.imported-id/output +++ b/tests/Baseline/hilti.ast.imported-id/output @@ -46,8 +46,6 @@ [debug/resolver] [foo.hlt:6:20-6:23] type::Bool "bool" -> set type's declaration to D1 [debug/resolver] [foo.hlt:7:1-7:29] declaration::Type "public type Foo2 = Bar::Bar1;" -> set declaration's canonical ID to Foo::Foo2 [debug/resolver] [foo.hlt:7:1-7:29] declaration::Type "public type Foo2 = Bar::Bar1;" -> set declaration's fully qualified ID to Foo::Foo2 -[debug/resolver] -> [D2] declaration::Type Foo::Foo2 | public type Foo2 = Bar::Bar1; (foo.hlt:7:1-7:29) -[debug/resolver] [foo.hlt:7:20-7:28] type::Name "Bar::Bar1" -> set type's declaration to D2 [debug/resolver] [foo.hlt:9:20-9:27] declaration::Parameter "bool foo" -> set declaration's canonical ID to Foo::foo [debug/resolver] [foo.hlt:9:20-9:27] declaration::Parameter "bool foo" -> set declaration's fully qualified ID to foo [debug/resolver] [foo.hlt:9:30-9:42] declaration::Parameter "Bar::Bar1 bar" -> set declaration's canonical ID to Foo::bar @@ -56,8 +54,8 @@ [debug/resolver] [foo.hlt:9:1-9:44] declaration::Function "declare function string foo(bool foo, Bar::Bar1 bar);" -> set declaration's fully qualified ID to Foo::foo [debug/resolver] [foo.hlt:2:1-11:1] declaration::Module "module Foo { import Bar; public type Foo1 = bool; public type Foo2 = Bar::Bar1; declare function string foo(bool foo, Bar::Bar1 bar); }" -> set declaration's fully qualified ID to Foo [debug/resolver] [foo.hlt:2:1-11:1] declaration::Module "module Foo { import Bar; public type Foo1 = bool; public type Foo2 = Bar::Bar1; declare function string foo(bool foo, Bar::Bar1 bar); }" -> set module's canonical ID to Foo -[debug/resolver] -> [D3] declaration::Module Foo | module Foo { import Bar; public type Foo1 = bool; public type Foo2 = Bar::Bar1; declare function string foo(bool foo, Bar::Bar1 bar); } (foo.hlt:2:1-11:1) -[debug/resolver] [foo.hlt:2:1-11:1] declaration::Module "module Foo { import Bar; public type Foo1 = bool; public type Foo2 = Bar::Bar1; declare function string foo(bool foo, Bar::Bar1 bar); }" -> set module's declaration index to D3 +[debug/resolver] -> [D2] declaration::Module Foo | module Foo { import Bar; public type Foo1 = bool; public type Foo2 = Bar::Bar1; declare function string foo(bool foo, Bar::Bar1 bar); } (foo.hlt:2:1-11:1) +[debug/resolver] [foo.hlt:2:1-11:1] declaration::Module "module Foo { import Bar; public type Foo1 = bool; public type Foo2 = Bar::Bar1; declare function string foo(bool foo, Bar::Bar1 bar); }" -> set module's declaration index to D2 [debug/resolver] [hilti.hlt:6:1-6:21] declaration::Property "" -> set declaration's canonical ID to hilti::%skip-implementation [debug/resolver] [hilti.hlt:6:1-6:21] declaration::Property "" -> set declaration's fully qualified ID to hilti::%skip-implementation [debug/resolver] [hilti.hlt:8:24-8:42] declaration::Constant "const enum { LSB0 = 0, MSB0 = 1 } LSB0 = ::LSB0;" -> set declaration's canonical ID to hilti::LSB0 @@ -66,8 +64,8 @@ [debug/resolver] [hilti.hlt:8:44-8:82] Attribute "&cxxname="hilti::rt::integer::BitOrder"" -> Attribute "&cxxname="::hilti::rt::integer::BitOrder"" [debug/resolver] [hilti.hlt:8:1-8:83] declaration::Type "public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder";" -> set declaration's canonical ID to hilti::BitOrder [debug/resolver] [hilti.hlt:8:1-8:83] declaration::Type "public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder";" -> set declaration's fully qualified ID to hilti::BitOrder -[debug/resolver] -> [D4] declaration::Type hilti::BitOrder | public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder"; (hilti.hlt:8:1-8:83) -[debug/resolver] [hilti.hlt:8:24-8:42] type::Enum "hilti::BitOrder" -> set type's declaration to D4 +[debug/resolver] -> [D3] declaration::Type hilti::BitOrder | public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder"; (hilti.hlt:8:1-8:83) +[debug/resolver] [hilti.hlt:8:24-8:42] type::Enum "hilti::BitOrder" -> set type's declaration to D3 [debug/resolver] [hilti.hlt:9:25-9:59] declaration::Constant "const enum { Little = 0, Big = 1, Network = 2, Host = 3 } Little = ::Little;" -> set declaration's canonical ID to hilti::Little [debug/resolver] [hilti.hlt:9:25-9:59] declaration::Constant "const enum { Little = 0, Big = 1, Network = 2, Host = 3 } Big = ::Big;" -> set declaration's canonical ID to hilti::Big [debug/resolver] [hilti.hlt:9:25-9:59] declaration::Constant "const enum { Little = 0, Big = 1, Network = 2, Host = 3 } Network = ::Network;" -> set declaration's canonical ID to hilti::Network @@ -76,8 +74,8 @@ [debug/resolver] [hilti.hlt:9:61-9:91] Attribute "&cxxname="hilti::rt::ByteOrder"" -> Attribute "&cxxname="::hilti::rt::ByteOrder"" [debug/resolver] [hilti.hlt:9:1-9:92] declaration::Type "public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder";" -> set declaration's canonical ID to hilti::ByteOrder [debug/resolver] [hilti.hlt:9:1-9:92] declaration::Type "public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder";" -> set declaration's fully qualified ID to hilti::ByteOrder -[debug/resolver] -> [D5] declaration::Type hilti::ByteOrder | public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder"; (hilti.hlt:9:1-9:92) -[debug/resolver] [hilti.hlt:9:25-9:59] type::Enum "hilti::ByteOrder" -> set type's declaration to D5 +[debug/resolver] -> [D4] declaration::Type hilti::ByteOrder | public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder"; (hilti.hlt:9:1-9:92) +[debug/resolver] [hilti.hlt:9:25-9:59] type::Enum "hilti::ByteOrder" -> set type's declaration to D4 [debug/resolver] [hilti.hlt:10:20-10:45] declaration::Constant "const enum { Left = 0, Right = 1, Both = 2 } Left = ::Left;" -> set declaration's canonical ID to hilti::Left [debug/resolver] [hilti.hlt:10:20-10:45] declaration::Constant "const enum { Left = 0, Right = 1, Both = 2 } Right = ::Right;" -> set declaration's canonical ID to hilti::Right [debug/resolver] [hilti.hlt:10:20-10:45] declaration::Constant "const enum { Left = 0, Right = 1, Both = 2 } Both = ::Both;" -> set declaration's canonical ID to hilti::Both @@ -85,24 +83,24 @@ [debug/resolver] [hilti.hlt:10:47-10:79] Attribute "&cxxname="hilti::rt::bytes::Side"" -> Attribute "&cxxname="::hilti::rt::bytes::Side"" [debug/resolver] [hilti.hlt:10:1-10:80] declaration::Type "public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side";" -> set declaration's canonical ID to hilti::Side [debug/resolver] [hilti.hlt:10:1-10:80] declaration::Type "public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side";" -> set declaration's fully qualified ID to hilti::Side -[debug/resolver] -> [D6] declaration::Type hilti::Side | public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side"; (hilti.hlt:10:1-10:80) -[debug/resolver] [hilti.hlt:10:20-10:45] type::Enum "hilti::Side" -> set type's declaration to D6 +[debug/resolver] -> [D5] declaration::Type hilti::Side | public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side"; (hilti.hlt:10:1-10:80) +[debug/resolver] [hilti.hlt:10:20-10:45] type::Enum "hilti::Side" -> set type's declaration to D5 [debug/resolver] [hilti.hlt:11:29-11:47] declaration::Constant "const enum { IPv4 = 0, IPv6 = 1 } IPv4 = ::IPv4;" -> set declaration's canonical ID to hilti::IPv4 [debug/resolver] [hilti.hlt:11:29-11:47] declaration::Constant "const enum { IPv4 = 0, IPv6 = 1 } IPv6 = ::IPv6;" -> set declaration's canonical ID to hilti::IPv6 [debug/resolver] [hilti.hlt:11:29-11:47] declaration::Constant "const enum { IPv4 = 0, IPv6 = 1 } Undef = ::Undef;" -> set declaration's canonical ID to hilti::Undef_4 [debug/resolver] [hilti.hlt:11:49-11:83] Attribute "&cxxname="hilti::rt::AddressFamily"" -> Attribute "&cxxname="::hilti::rt::AddressFamily"" [debug/resolver] [hilti.hlt:11:1-11:84] declaration::Type "public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily";" -> set declaration's canonical ID to hilti::AddressFamily [debug/resolver] [hilti.hlt:11:1-11:84] declaration::Type "public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily";" -> set declaration's fully qualified ID to hilti::AddressFamily -[debug/resolver] -> [D7] declaration::Type hilti::AddressFamily | public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily"; (hilti.hlt:11:1-11:84) -[debug/resolver] [hilti.hlt:11:29-11:47] type::Enum "hilti::AddressFamily" -> set type's declaration to D7 +[debug/resolver] -> [D6] declaration::Type hilti::AddressFamily | public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily"; (hilti.hlt:11:1-11:84) +[debug/resolver] [hilti.hlt:11:29-11:47] type::Enum "hilti::AddressFamily" -> set type's declaration to D6 [debug/resolver] [hilti.hlt:12:24-12:62] declaration::Constant "const enum { IEEE754_Single = 0, IEEE754_Double = 1 } IEEE754_Single = ::IEEE754_Single;" -> set declaration's canonical ID to hilti::IEEE754_Single [debug/resolver] [hilti.hlt:12:24-12:62] declaration::Constant "const enum { IEEE754_Single = 0, IEEE754_Double = 1 } IEEE754_Double = ::IEEE754_Double;" -> set declaration's canonical ID to hilti::IEEE754_Double [debug/resolver] [hilti.hlt:12:24-12:62] declaration::Constant "const enum { IEEE754_Single = 0, IEEE754_Double = 1 } Undef = ::Undef;" -> set declaration's canonical ID to hilti::Undef_5 [debug/resolver] [hilti.hlt:12:64-12:95] Attribute "&cxxname="hilti::rt::real::Type"" -> Attribute "&cxxname="::hilti::rt::real::Type"" [debug/resolver] [hilti.hlt:12:1-12:96] declaration::Type "public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type";" -> set declaration's canonical ID to hilti::RealType [debug/resolver] [hilti.hlt:12:1-12:96] declaration::Type "public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type";" -> set declaration's fully qualified ID to hilti::RealType -[debug/resolver] -> [D8] declaration::Type hilti::RealType | public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type"; (hilti.hlt:12:1-12:96) -[debug/resolver] [hilti.hlt:12:24-12:62] type::Enum "hilti::RealType" -> set type's declaration to D8 +[debug/resolver] -> [D7] declaration::Type hilti::RealType | public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type"; (hilti.hlt:12:1-12:96) +[debug/resolver] [hilti.hlt:12:24-12:62] type::Enum "hilti::RealType" -> set type's declaration to D7 [debug/resolver] [hilti.hlt:13:24-13:46] declaration::Constant "const enum { TCP = 0, UDP = 1, ICMP = 2 } TCP = ::TCP;" -> set declaration's canonical ID to hilti::TCP [debug/resolver] [hilti.hlt:13:24-13:46] declaration::Constant "const enum { TCP = 0, UDP = 1, ICMP = 2 } UDP = ::UDP;" -> set declaration's canonical ID to hilti::UDP [debug/resolver] [hilti.hlt:13:24-13:46] declaration::Constant "const enum { TCP = 0, UDP = 1, ICMP = 2 } ICMP = ::ICMP;" -> set declaration's canonical ID to hilti::ICMP @@ -110,16 +108,16 @@ [debug/resolver] [hilti.hlt:13:48-13:77] Attribute "&cxxname="hilti::rt::Protocol"" -> Attribute "&cxxname="::hilti::rt::Protocol"" [debug/resolver] [hilti.hlt:13:1-13:78] declaration::Type "public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol";" -> set declaration's canonical ID to hilti::Protocol [debug/resolver] [hilti.hlt:13:1-13:78] declaration::Type "public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol";" -> set declaration's fully qualified ID to hilti::Protocol -[debug/resolver] -> [D9] declaration::Type hilti::Protocol | public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol"; (hilti.hlt:13:1-13:78) -[debug/resolver] [hilti.hlt:13:24-13:46] type::Enum "hilti::Protocol" -> set type's declaration to D9 +[debug/resolver] -> [D8] declaration::Type hilti::Protocol | public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol"; (hilti.hlt:13:1-13:78) +[debug/resolver] [hilti.hlt:13:24-13:46] type::Enum "hilti::Protocol" -> set type's declaration to D8 [debug/resolver] [hilti.hlt:14:23-14:42] declaration::Constant "const enum { ASCII = 0, UTF8 = 1 } ASCII = ::ASCII;" -> set declaration's canonical ID to hilti::ASCII [debug/resolver] [hilti.hlt:14:23-14:42] declaration::Constant "const enum { ASCII = 0, UTF8 = 1 } UTF8 = ::UTF8;" -> set declaration's canonical ID to hilti::UTF8 [debug/resolver] [hilti.hlt:14:23-14:42] declaration::Constant "const enum { ASCII = 0, UTF8 = 1 } Undef = ::Undef;" -> set declaration's canonical ID to hilti::Undef_7 [debug/resolver] [hilti.hlt:14:44-14:79] Attribute "&cxxname="hilti::rt::bytes::Charset"" -> Attribute "&cxxname="::hilti::rt::bytes::Charset"" [debug/resolver] [hilti.hlt:14:1-14:80] declaration::Type "public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset";" -> set declaration's canonical ID to hilti::Charset [debug/resolver] [hilti.hlt:14:1-14:80] declaration::Type "public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset";" -> set declaration's fully qualified ID to hilti::Charset -[debug/resolver] -> [D10] declaration::Type hilti::Charset | public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset"; (hilti.hlt:14:1-14:80) -[debug/resolver] [hilti.hlt:14:23-14:42] type::Enum "hilti::Charset" -> set type's declaration to D10 +[debug/resolver] -> [D9] declaration::Type hilti::Charset | public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset"; (hilti.hlt:14:1-14:80) +[debug/resolver] [hilti.hlt:14:23-14:42] type::Enum "hilti::Charset" -> set type's declaration to D9 [debug/resolver] [hilti.hlt:15:35-15:66] declaration::Constant "const enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } IGNORE = ::IGNORE;" -> set declaration's canonical ID to hilti::IGNORE [debug/resolver] [hilti.hlt:15:35-15:66] declaration::Constant "const enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } REPLACE = ::REPLACE;" -> set declaration's canonical ID to hilti::REPLACE [debug/resolver] [hilti.hlt:15:35-15:66] declaration::Constant "const enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } STRICT = ::STRICT;" -> set declaration's canonical ID to hilti::STRICT @@ -127,16 +125,16 @@ [debug/resolver] [hilti.hlt:15:68-15:115] Attribute "&cxxname="hilti::rt::bytes::DecodeErrorStrategy"" -> Attribute "&cxxname="::hilti::rt::bytes::DecodeErrorStrategy"" [debug/resolver] [hilti.hlt:15:1-15:116] declaration::Type "public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy";" -> set declaration's canonical ID to hilti::DecodeErrorStrategy [debug/resolver] [hilti.hlt:15:1-15:116] declaration::Type "public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy";" -> set declaration's fully qualified ID to hilti::DecodeErrorStrategy -[debug/resolver] -> [D11] declaration::Type hilti::DecodeErrorStrategy | public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy"; (hilti.hlt:15:1-15:116) -[debug/resolver] [hilti.hlt:15:35-15:66] type::Enum "hilti::DecodeErrorStrategy" -> set type's declaration to D11 +[debug/resolver] -> [D10] declaration::Type hilti::DecodeErrorStrategy | public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy"; (hilti.hlt:15:1-15:116) +[debug/resolver] [hilti.hlt:15:35-15:66] type::Enum "hilti::DecodeErrorStrategy" -> set type's declaration to D10 [debug/resolver] [hilti.hlt:16:1-16:37] declaration::Type "public type Captures = vector;" -> set declaration's canonical ID to hilti::Captures [debug/resolver] [hilti.hlt:16:1-16:37] declaration::Type "public type Captures = vector;" -> set declaration's fully qualified ID to hilti::Captures -[debug/resolver] -> [D12] declaration::Type hilti::Captures | public type Captures = vector; (hilti.hlt:16:1-16:37) -[debug/resolver] [hilti.hlt:16:24-16:36] type::Vector "vector" -> set type's declaration to D12 +[debug/resolver] -> [D11] declaration::Type hilti::Captures | public type Captures = vector; (hilti.hlt:16:1-16:37) +[debug/resolver] [hilti.hlt:16:24-16:36] type::Vector "vector" -> set type's declaration to D11 [debug/resolver] [hilti.hlt:17:1-17:61] declaration::Type "public type Profiler = __library_type("::hilti::rt::Profiler");" -> set declaration's canonical ID to hilti::Profiler [debug/resolver] [hilti.hlt:17:1-17:61] declaration::Type "public type Profiler = __library_type("::hilti::rt::Profiler");" -> set declaration's fully qualified ID to hilti::Profiler -[debug/resolver] -> [D13] declaration::Type hilti::Profiler | public type Profiler = hilti::Profiler; (hilti.hlt:17:1-17:61) -[debug/resolver] [hilti.hlt:17:24-17:60] type::Library "hilti::Profiler" -> set type's declaration to D13 +[debug/resolver] -> [D12] declaration::Type hilti::Profiler | public type Profiler = hilti::Profiler; (hilti.hlt:17:1-17:61) +[debug/resolver] [hilti.hlt:17:24-17:60] type::Library "hilti::Profiler" -> set type's declaration to D12 [debug/resolver] [hilti.hlt:19:26-21:1] declaration::Expression "self" -> set declaration's canonical ID to hilti::self [debug/resolver] [hilti.hlt:19:26-21:1] declaration::Expression "self" -> set declaration's fully qualified ID to self [debug/resolver] [hilti.hlt:20:30-20:40] declaration::Parameter "stream data" -> set declaration's canonical ID to hilti::data @@ -146,8 +144,8 @@ [debug/resolver] [hilti.hlt:21:3-21:42] Attribute "&cxxname="hilti::rt::regexp::MatchState"" -> Attribute "&cxxname="::hilti::rt::regexp::MatchState"" [debug/resolver] [hilti.hlt:19:1-21:43] declaration::Type "public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState";" -> set declaration's canonical ID to hilti::MatchState [debug/resolver] [hilti.hlt:19:1-21:43] declaration::Type "public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState";" -> set declaration's fully qualified ID to hilti::MatchState -[debug/resolver] -> [D14] declaration::Type hilti::MatchState | public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState"; (hilti.hlt:19:1-21:43) -[debug/resolver] [hilti.hlt:19:26-21:1] type::Struct "hilti::MatchState" -> set type's declaration to D14 +[debug/resolver] -> [D13] declaration::Type hilti::MatchState | public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState"; (hilti.hlt:19:1-21:43) +[debug/resolver] [hilti.hlt:19:26-21:1] type::Struct "hilti::MatchState" -> set type's declaration to D13 [debug/resolver] [hilti.hlt:23:27-23:33] declaration::Parameter "any obj" -> set declaration's canonical ID to hilti::obj [debug/resolver] [hilti.hlt:23:27-23:33] declaration::Parameter "any obj" -> set declaration's fully qualified ID to obj [debug/resolver] [hilti.hlt:23:36-23:54] declaration::Parameter "bool newline = True" -> set declaration's canonical ID to hilti::newline @@ -229,28 +227,28 @@ [debug/resolver] [hilti.hlt:39:35-39:65] Attribute "&cxxname="hilti::rt::Exception"" -> Attribute "&cxxname="::hilti::rt::Exception"" [debug/resolver] [hilti.hlt:39:1-39:66] declaration::Type "public type Exception = exception &cxxname="::hilti::rt::Exception";" -> set declaration's canonical ID to hilti::Exception [debug/resolver] [hilti.hlt:39:1-39:66] declaration::Type "public type Exception = exception &cxxname="::hilti::rt::Exception";" -> set declaration's fully qualified ID to hilti::Exception -[debug/resolver] -> [D15] declaration::Type hilti::Exception | public type Exception = exception &cxxname="::hilti::rt::Exception"; (hilti.hlt:39:1-39:66) -[debug/resolver] [hilti.hlt:39:25-39:33] type::Exception "hilti::Exception" -> set type's declaration to D15 +[debug/resolver] -> [D14] declaration::Type hilti::Exception | public type Exception = exception &cxxname="::hilti::rt::Exception"; (hilti.hlt:39:1-39:66) +[debug/resolver] [hilti.hlt:39:25-39:33] type::Exception "hilti::Exception" -> set type's declaration to D14 [debug/resolver] [hilti.hlt:42:55-42:79] Attribute "&cxxname="std::exception"" -> Attribute "&cxxname="::std::exception"" [debug/resolver] [hilti.hlt:42:1-42:80] declaration::Type "public type SystemException = [exception :Exception &cxxname="::std::exception";" -> set declaration's canonical ID to hilti::SystemException [debug/resolver] [hilti.hlt:42:1-42:80] declaration::Type "public type SystemException = [exception :Exception &cxxname="::std::exception";" -> set declaration's fully qualified ID to hilti::SystemException -[debug/resolver] -> [D16] declaration::Type hilti::SystemException | public type SystemException = [exception :Exception &cxxname="::std::exception"; (hilti.hlt:42:1-42:80) -[debug/resolver] [hilti.hlt:42:31-42:53] type::Exception "hilti::SystemException" -> set type's declaration to D16 +[debug/resolver] -> [D15] declaration::Type hilti::SystemException | public type SystemException = [exception :Exception &cxxname="::std::exception"; (hilti.hlt:42:1-42:80) +[debug/resolver] [hilti.hlt:42:31-42:53] type::Exception "hilti::SystemException" -> set type's declaration to D15 [debug/resolver] [hilti.hlt:46:52-46:85] Attribute "&cxxname="hilti::rt::RuntimeError"" -> Attribute "&cxxname="::hilti::rt::RuntimeError"" [debug/resolver] [hilti.hlt:46:1-46:86] declaration::Type "public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError";" -> set declaration's canonical ID to hilti::RuntimeError [debug/resolver] [hilti.hlt:46:1-46:86] declaration::Type "public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError";" -> set declaration's fully qualified ID to hilti::RuntimeError -[debug/resolver] -> [D17] declaration::Type hilti::RuntimeError | public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError"; (hilti.hlt:46:1-46:86) -[debug/resolver] [hilti.hlt:46:28-46:50] type::Exception "hilti::RuntimeError" -> set type's declaration to D17 +[debug/resolver] -> [D16] declaration::Type hilti::RuntimeError | public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError"; (hilti.hlt:46:1-46:86) +[debug/resolver] [hilti.hlt:46:28-46:50] type::Exception "hilti::RuntimeError" -> set type's declaration to D16 [debug/resolver] [hilti.hlt:49:58-49:97] Attribute "&cxxname="hilti::rt::RecoverableFailure"" -> Attribute "&cxxname="::hilti::rt::RecoverableFailure"" [debug/resolver] [hilti.hlt:49:1-49:98] declaration::Type "public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure";" -> set declaration's canonical ID to hilti::RecoverableFailure [debug/resolver] [hilti.hlt:49:1-49:98] declaration::Type "public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure";" -> set declaration's fully qualified ID to hilti::RecoverableFailure -[debug/resolver] -> [D18] declaration::Type hilti::RecoverableFailure | public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure"; (hilti.hlt:49:1-49:98) -[debug/resolver] [hilti.hlt:49:34-49:56] type::Exception "hilti::RecoverableFailure" -> set type's declaration to D18 +[debug/resolver] -> [D17] declaration::Type hilti::RecoverableFailure | public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure"; (hilti.hlt:49:1-49:98) +[debug/resolver] [hilti.hlt:49:34-49:56] type::Exception "hilti::RecoverableFailure" -> set type's declaration to D17 [debug/resolver] [hilti.hlt:52:51-52:83] Attribute "&cxxname="hilti::rt::MissingData"" -> Attribute "&cxxname="::hilti::rt::MissingData"" [debug/resolver] [hilti.hlt:52:1-52:84] declaration::Type "public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData";" -> set declaration's canonical ID to hilti::MissingData [debug/resolver] [hilti.hlt:52:1-52:84] declaration::Type "public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData";" -> set declaration's fully qualified ID to hilti::MissingData -[debug/resolver] -> [D19] declaration::Type hilti::MissingData | public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData"; (hilti.hlt:52:1-52:84) -[debug/resolver] [hilti.hlt:52:27-52:49] type::Exception "hilti::MissingData" -> set type's declaration to D19 +[debug/resolver] -> [D18] declaration::Type hilti::MissingData | public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData"; (hilti.hlt:52:1-52:84) +[debug/resolver] [hilti.hlt:52:27-52:49] type::Exception "hilti::MissingData" -> set type's declaration to D18 [debug/resolver] [hilti.hlt:55:38-55:58] declaration::Parameter "hilti::SystemException excpt" -> set declaration's canonical ID to hilti::excpt [debug/resolver] [hilti.hlt:55:38-55:58] declaration::Parameter "hilti::SystemException excpt" -> set declaration's fully qualified ID to excpt [debug/resolver] [hilti.hlt:55:61-55:97] Attribute "&cxxname="hilti::rt::exception::what"" -> Attribute "&cxxname="::hilti::rt::exception::what"" @@ -277,19 +275,17 @@ [debug/resolver] [hilti.hlt:60:1-60:119] declaration::Function "declare public function string exception_where(hilti::RecoverableFailure excpt) &cxxname="::hilti::rt::exception::where" &have_prototype;" -> creating function call operator [debug/resolver] [hilti.hlt:3:1-61:1] declaration::Module "module hilti { public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder"; public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder"; public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side"; public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily"; public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type"; public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol"; public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset"; public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy"; public type Captures = vector; public type Profiler = Profiler &cxxname="::hilti::rt::Profiler"; public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState"; public type Exception = exception &cxxname="::hilti::rt::Exception"; public type SystemException = [exception :Exception &cxxname="::std::exception"; public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError"; public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure"; public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData"; declare public function void print(any obj, bool newline = True) &cxxname="::hilti::rt::print" &have_prototype; declare public function void printValues(tuple<*> t, bool newline = True) &cxxname="::hilti::rt::printValues" &have_prototype; declare public function void debug(string dbg_stream, any obj) &cxxname="::hilti::rt::debug::print" &have_prototype; declare public function void debugIndent(string dbg_stream) &cxxname="::hilti::rt::debug::indent" &have_prototype; declare public function void debugDedent(string dbg_stream) &cxxname="::hilti::rt::debug::dedent" &have_prototype; declare public function time current_time() &cxxname="::hilti::rt::time::current_time" &have_prototype; declare public function time mktime(uint<64> y, uint<64> m, uint<64> d, uint<64> H, uint<64> M, uint<64> S) &cxxname="::hilti::rt::time::mktime" &have_prototype; declare public function void abort() &cxxname="::hilti::rt::abort_with_backtrace" &have_prototype; declare public function optional profiler_start(string name, optional> size = Null) &cxxname="::hilti::rt::profiler::start" &have_prototype; declare public function void profiler_stop(optional p, optional> size = Null) &cxxname="::hilti::rt::profiler::stop" &have_prototype; declare public function string exception_what(SystemException excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_what(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_where(SystemException excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; declare public function string exception_where(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; }" -> set declaration's fully qualified ID to hilti [debug/resolver] [hilti.hlt:3:1-61:1] declaration::Module "module hilti { public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder"; public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder"; public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side"; public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily"; public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type"; public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol"; public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset"; public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy"; public type Captures = vector; public type Profiler = Profiler &cxxname="::hilti::rt::Profiler"; public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState"; public type Exception = exception &cxxname="::hilti::rt::Exception"; public type SystemException = [exception :Exception &cxxname="::std::exception"; public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError"; public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure"; public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData"; declare public function void print(any obj, bool newline = True) &cxxname="::hilti::rt::print" &have_prototype; declare public function void printValues(tuple<*> t, bool newline = True) &cxxname="::hilti::rt::printValues" &have_prototype; declare public function void debug(string dbg_stream, any obj) &cxxname="::hilti::rt::debug::print" &have_prototype; declare public function void debugIndent(string dbg_stream) &cxxname="::hilti::rt::debug::indent" &have_prototype; declare public function void debugDedent(string dbg_stream) &cxxname="::hilti::rt::debug::dedent" &have_prototype; declare public function time current_time() &cxxname="::hilti::rt::time::current_time" &have_prototype; declare public function time mktime(uint<64> y, uint<64> m, uint<64> d, uint<64> H, uint<64> M, uint<64> S) &cxxname="::hilti::rt::time::mktime" &have_prototype; declare public function void abort() &cxxname="::hilti::rt::abort_with_backtrace" &have_prototype; declare public function optional profiler_start(string name, optional> size = Null) &cxxname="::hilti::rt::profiler::start" &have_prototype; declare public function void profiler_stop(optional p, optional> size = Null) &cxxname="::hilti::rt::profiler::stop" &have_prototype; declare public function string exception_what(SystemException excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_what(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_where(SystemException excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; declare public function string exception_where(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; }" -> set module's canonical ID to hilti -[debug/resolver] -> [D20] declaration::Module hilti | module hilti { public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder"; public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder"; public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side"; public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily"; public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type"; public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol"; public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset"; public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy"; public type Captures = vector; public type Profiler = Profiler &cxxname="::hilti::rt::Profiler"; public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState"; public type Exception = exception &cxxname="::hilti::rt::Exception"; public type SystemException = [exception :Exception &cxxname="::std::exception"; public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError"; public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure"; public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData"; declare public function void print(any obj, bool newline = True) &cxxname="::hilti::rt::print" &have_prototype; declare public function void printValues(tuple<*> t, bool newline = True) &cxxname="::hilti::rt::printValues" &have_prototype; declare public function void debug(string dbg_stream, any obj) &cxxname="::hilti::rt::debug::print" &have_prototype; declare public function void debugIndent(string dbg_stream) &cxxname="::hilti::rt::debug::indent" &have_prototype; declare public function void debugDedent(string dbg_stream) &cxxname="::hilti::rt::debug::dedent" &have_prototype; declare public function time current_time() &cxxname="::hilti::rt::time::current_time" &have_prototype; declare public function time mktime(uint<64> y, uint<64> m, uint<64> d, uint<64> H, uint<64> M, uint<64> S) &cxxname="::hilti::rt::time::mktime" &have_prototype; declare public function void abort() &cxxname="::hilti::rt::abort_with_backtrace" &have_prototype; declare public function optional profiler_start(string name, optional> size = Null) &cxxname="::hilti::rt::profiler::start" &have_prototype; declare public function void profiler_stop(optional p, optional> size = Null) &cxxname="::hilti::rt::profiler::stop" &have_prototype; declare public function string exception_what(SystemException excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_what(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_where(SystemException excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; declare public function string exception_where(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; } (hilti.hlt:3:1-61:1) -[debug/resolver] [hilti.hlt:3:1-61:1] declaration::Module "module hilti { public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder"; public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder"; public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side"; public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily"; public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type"; public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol"; public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset"; public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy"; public type Captures = vector; public type Profiler = Profiler &cxxname="::hilti::rt::Profiler"; public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState"; public type Exception = exception &cxxname="::hilti::rt::Exception"; public type SystemException = [exception :Exception &cxxname="::std::exception"; public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError"; public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure"; public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData"; declare public function void print(any obj, bool newline = True) &cxxname="::hilti::rt::print" &have_prototype; declare public function void printValues(tuple<*> t, bool newline = True) &cxxname="::hilti::rt::printValues" &have_prototype; declare public function void debug(string dbg_stream, any obj) &cxxname="::hilti::rt::debug::print" &have_prototype; declare public function void debugIndent(string dbg_stream) &cxxname="::hilti::rt::debug::indent" &have_prototype; declare public function void debugDedent(string dbg_stream) &cxxname="::hilti::rt::debug::dedent" &have_prototype; declare public function time current_time() &cxxname="::hilti::rt::time::current_time" &have_prototype; declare public function time mktime(uint<64> y, uint<64> m, uint<64> d, uint<64> H, uint<64> M, uint<64> S) &cxxname="::hilti::rt::time::mktime" &have_prototype; declare public function void abort() &cxxname="::hilti::rt::abort_with_backtrace" &have_prototype; declare public function optional profiler_start(string name, optional> size = Null) &cxxname="::hilti::rt::profiler::start" &have_prototype; declare public function void profiler_stop(optional p, optional> size = Null) &cxxname="::hilti::rt::profiler::stop" &have_prototype; declare public function string exception_what(SystemException excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_what(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_where(SystemException excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; declare public function string exception_where(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; }" -> set module's declaration index to D20 +[debug/resolver] -> [D19] declaration::Module hilti | module hilti { public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder"; public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder"; public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side"; public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily"; public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type"; public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol"; public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset"; public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy"; public type Captures = vector; public type Profiler = Profiler &cxxname="::hilti::rt::Profiler"; public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState"; public type Exception = exception &cxxname="::hilti::rt::Exception"; public type SystemException = [exception :Exception &cxxname="::std::exception"; public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError"; public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure"; public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData"; declare public function void print(any obj, bool newline = True) &cxxname="::hilti::rt::print" &have_prototype; declare public function void printValues(tuple<*> t, bool newline = True) &cxxname="::hilti::rt::printValues" &have_prototype; declare public function void debug(string dbg_stream, any obj) &cxxname="::hilti::rt::debug::print" &have_prototype; declare public function void debugIndent(string dbg_stream) &cxxname="::hilti::rt::debug::indent" &have_prototype; declare public function void debugDedent(string dbg_stream) &cxxname="::hilti::rt::debug::dedent" &have_prototype; declare public function time current_time() &cxxname="::hilti::rt::time::current_time" &have_prototype; declare public function time mktime(uint<64> y, uint<64> m, uint<64> d, uint<64> H, uint<64> M, uint<64> S) &cxxname="::hilti::rt::time::mktime" &have_prototype; declare public function void abort() &cxxname="::hilti::rt::abort_with_backtrace" &have_prototype; declare public function optional profiler_start(string name, optional> size = Null) &cxxname="::hilti::rt::profiler::start" &have_prototype; declare public function void profiler_stop(optional p, optional> size = Null) &cxxname="::hilti::rt::profiler::stop" &have_prototype; declare public function string exception_what(SystemException excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_what(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_where(SystemException excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; declare public function string exception_where(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; } (hilti.hlt:3:1-61:1) +[debug/resolver] [hilti.hlt:3:1-61:1] declaration::Module "module hilti { public type BitOrder = enum { LSB0 = 0, MSB0 = 1 } &cxxname="::hilti::rt::integer::BitOrder"; public type ByteOrder = enum { Little = 0, Big = 1, Network = 2, Host = 3 } &cxxname="::hilti::rt::ByteOrder"; public type Side = enum { Left = 0, Right = 1, Both = 2 } &cxxname="::hilti::rt::bytes::Side"; public type AddressFamily = enum { IPv4 = 0, IPv6 = 1 } &cxxname="::hilti::rt::AddressFamily"; public type RealType = enum { IEEE754_Single = 0, IEEE754_Double = 1 } &cxxname="::hilti::rt::real::Type"; public type Protocol = enum { TCP = 0, UDP = 1, ICMP = 2 } &cxxname="::hilti::rt::Protocol"; public type Charset = enum { ASCII = 0, UTF8 = 1 } &cxxname="::hilti::rt::bytes::Charset"; public type DecodeErrorStrategy = enum { IGNORE = 0, REPLACE = 1, STRICT = 2 } &cxxname="::hilti::rt::bytes::DecodeErrorStrategy"; public type Captures = vector; public type Profiler = Profiler &cxxname="::hilti::rt::Profiler"; public type MatchState = struct { method Captures captures(stream data); } &cxxname="::hilti::rt::regexp::MatchState"; public type Exception = exception &cxxname="::hilti::rt::Exception"; public type SystemException = [exception :Exception &cxxname="::std::exception"; public type RuntimeError = [exception :Exception &cxxname="::hilti::rt::RuntimeError"; public type RecoverableFailure = [exception :Exception &cxxname="::hilti::rt::RecoverableFailure"; public type MissingData = [exception :Exception &cxxname="::hilti::rt::MissingData"; declare public function void print(any obj, bool newline = True) &cxxname="::hilti::rt::print" &have_prototype; declare public function void printValues(tuple<*> t, bool newline = True) &cxxname="::hilti::rt::printValues" &have_prototype; declare public function void debug(string dbg_stream, any obj) &cxxname="::hilti::rt::debug::print" &have_prototype; declare public function void debugIndent(string dbg_stream) &cxxname="::hilti::rt::debug::indent" &have_prototype; declare public function void debugDedent(string dbg_stream) &cxxname="::hilti::rt::debug::dedent" &have_prototype; declare public function time current_time() &cxxname="::hilti::rt::time::current_time" &have_prototype; declare public function time mktime(uint<64> y, uint<64> m, uint<64> d, uint<64> H, uint<64> M, uint<64> S) &cxxname="::hilti::rt::time::mktime" &have_prototype; declare public function void abort() &cxxname="::hilti::rt::abort_with_backtrace" &have_prototype; declare public function optional profiler_start(string name, optional> size = Null) &cxxname="::hilti::rt::profiler::start" &have_prototype; declare public function void profiler_stop(optional p, optional> size = Null) &cxxname="::hilti::rt::profiler::stop" &have_prototype; declare public function string exception_what(SystemException excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_what(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::what" &have_prototype; declare public function string exception_where(SystemException excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; declare public function string exception_where(RecoverableFailure excpt) &cxxname="::hilti::rt::exception::where" &have_prototype; }" -> set module's declaration index to D19 [debug/resolver] [bar.hlt:4:1-4:11] declaration::ImportedModule "import Foo;" -> set declaration's canonical ID to Bar::Foo [debug/resolver] [bar.hlt:4:1-4:11] declaration::ImportedModule "import Foo;" -> set declaration's fully qualified ID to Bar::Foo [debug/resolver] [bar.hlt:4:1-4:11] declaration::ImportedModule "import Foo;" -> imported module Foo [debug/resolver] [bar.hlt:6:1-6:26] declaration::Type "public type Bar1 = string;" -> set declaration's canonical ID to Bar::Bar1 [debug/resolver] [bar.hlt:6:1-6:26] declaration::Type "public type Bar1 = string;" -> set declaration's fully qualified ID to Bar::Bar1 -[debug/resolver] -> [D21] declaration::Type Bar::Bar1 | public type Bar1 = string; (bar.hlt:6:1-6:26) -[debug/resolver] [bar.hlt:6:20-6:25] type::String "string" -> set type's declaration to D21 +[debug/resolver] -> [D20] declaration::Type Bar::Bar1 | public type Bar1 = string; (bar.hlt:6:1-6:26) +[debug/resolver] [bar.hlt:6:20-6:25] type::String "string" -> set type's declaration to D20 [debug/resolver] [bar.hlt:7:1-7:29] declaration::Type "public type Bar2 = Foo::Foo1;" -> set declaration's canonical ID to Bar::Bar2 [debug/resolver] [bar.hlt:7:1-7:29] declaration::Type "public type Bar2 = Foo::Foo1;" -> set declaration's fully qualified ID to Bar::Bar2 -[debug/resolver] -> [D22] declaration::Type Bar::Bar2 | public type Bar2 = Foo::Foo1; (bar.hlt:7:1-7:29) -[debug/resolver] [bar.hlt:7:20-7:28] type::Name "Foo::Foo1" -> set type's declaration to D22 [debug/resolver] [bar.hlt:9:20-9:27] declaration::Parameter "Bar1 bar" -> set declaration's canonical ID to Bar::bar [debug/resolver] [bar.hlt:9:20-9:27] declaration::Parameter "Bar1 bar" -> set declaration's fully qualified ID to bar [debug/resolver] [bar.hlt:9:30-9:42] declaration::Parameter "Foo::Foo1 foo" -> set declaration's canonical ID to Bar::foo @@ -298,13 +294,13 @@ [debug/resolver] [bar.hlt:9:1-9:44] declaration::Function "declare function string bar(Bar1 bar, Foo::Foo1 foo);" -> set declaration's fully qualified ID to Bar::bar [debug/resolver] [bar.hlt:2:1-11:1] declaration::Module "module Bar { import Foo; public type Bar1 = string; public type Bar2 = Foo::Foo1; declare function string bar(Bar1 bar, Foo::Foo1 foo); }" -> set declaration's fully qualified ID to Bar [debug/resolver] [bar.hlt:2:1-11:1] declaration::Module "module Bar { import Foo; public type Bar1 = string; public type Bar2 = Foo::Foo1; declare function string bar(Bar1 bar, Foo::Foo1 foo); }" -> set module's canonical ID to Bar -[debug/resolver] -> [D23] declaration::Module Bar | module Bar { import Foo; public type Bar1 = string; public type Bar2 = Foo::Foo1; declare function string bar(Bar1 bar, Foo::Foo1 foo); } (bar.hlt:2:1-11:1) -[debug/resolver] [bar.hlt:2:1-11:1] declaration::Module "module Bar { import Foo; public type Bar1 = string; public type Bar2 = Foo::Foo1; declare function string bar(Bar1 bar, Foo::Foo1 foo); }" -> set module's declaration index to D23 +[debug/resolver] -> [D21] declaration::Module Bar | module Bar { import Foo; public type Bar1 = string; public type Bar2 = Foo::Foo1; declare function string bar(Bar1 bar, Foo::Foo1 foo); } (bar.hlt:2:1-11:1) +[debug/resolver] [bar.hlt:2:1-11:1] declaration::Module "module Bar { import Foo; public type Bar1 = string; public type Bar2 = Foo::Foo1; declare function string bar(Bar1 bar, Foo::Foo1 foo); }" -> set module's declaration index to D21 [debug/compiler] -> modified [debug/compiler] processing ASTs, round 2 [debug/compiler] [HILTI] building scopes -[debug/resolver] -> [D24] declaration::Constant hilti::UTF8 | const hilti::Charset UTF8 = hilti::Charset::UTF8; (hilti.hlt:14:23-14:42) -[debug/resolver] -> [D25] declaration::Constant hilti::REPLACE | const hilti::DecodeErrorStrategy REPLACE = hilti::DecodeErrorStrategy::REPLACE; (hilti.hlt:15:35-15:66) +[debug/resolver] -> [D22] declaration::Constant hilti::UTF8 | const hilti::Charset UTF8 = hilti::Charset::UTF8; (hilti.hlt:14:23-14:42) +[debug/resolver] -> [D23] declaration::Constant hilti::REPLACE | const hilti::DecodeErrorStrategy REPLACE = hilti::DecodeErrorStrategy::REPLACE; (hilti.hlt:15:35-15:66) [debug/compiler] [HILTI] resolving AST [debug/resolver] -> [T16] type::String Bar::Bar1 | string (bar.hlt:6:20-6:25) [debug/resolver] [foo.hlt:7:20-7:28] type::Name "Bar::Bar1" -> set resolved type to T16 @@ -351,14 +347,14 @@ [debug/compiler] [HILTI] resolving AST [debug/ast-final] # [HILTI] Final AST (round 3) [debug/ast-final] - ASTRoot [no parent] () [@a:XXX] -[debug/ast-final] | Bar -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Foo -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | hilti -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] - declaration::Module [parent @a:XXX] (foo.hlt:2:1-11:1) [@d:XXX] -[debug/ast-final] | Bar -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Foo -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Bar -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Foo -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | hilti -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] - declaration::Module [parent @a:XXX] (foo.hlt:2:1-11:1) [@d:XXX] +[debug/ast-final] | Bar -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Foo -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Foo1 -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Foo2 -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Foo2 -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | foo -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - statement::Block [parent @d:XXX] (foo.hlt:2:1-11:1) [@s:XXX] [debug/ast-final] - declaration::ImportedModule [parent @d:XXX] (foo.hlt:4:1-4:11) [@d:XXX] @@ -366,9 +362,9 @@ [debug/ast-final] - QualifiedType [parent @d:XXX] (foo.hlt:6:20-6:23) [@q:XXX] [debug/ast-final] - type::Bool [parent @q:XXX] (foo.hlt:6:20-6:23) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (foo.hlt:6:24-6:23) [@a:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (foo.hlt:7:1-7:29) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (foo.hlt:7:1-7:29) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (foo.hlt:7:20-7:28) [@q:XXX] -[debug/ast-final] - type::Name [parent @q:XXX] (foo.hlt:7:20-7:28) (resolved) [@t:XXX] +[debug/ast-final] - type::Name [parent @q:XXX] (foo.hlt:7:20-7:28) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (foo.hlt:7:29-7:28) [@a:XXX] [debug/ast-final] - declaration::Function [parent @d:XXX] (foo.hlt:9:1-9:44) [@d:XXX] [debug/ast-final] | bar -> declaration::Parameter [parent @t:XXX] (resolved) [@d:XXX] ([@d:XXX]) @@ -390,23 +386,23 @@ [debug/ast-final] - AttributeSet [parent @d:XXX] (foo.hlt:9:43-9:42) [@a:XXX] [debug/ast-final] - [debug/ast-final] - AttributeSet [parent @f:XXX] (foo.hlt:9:44-9:43) [@a:XXX] -[debug/ast-final] - declaration::Module [parent @a:XXX] (hilti.hlt:3:1-61:1) [@d:XXX] -[debug/ast-final] | AddressFamily -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | BitOrder -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | ByteOrder -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Captures -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Charset -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | DecodeErrorStrategy -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Exception -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | MatchState -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | MissingData -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Profiler -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Protocol -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | RealType -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | RecoverableFailure -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | RuntimeError -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Side -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | SystemException -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] - declaration::Module [parent @a:XXX] (hilti.hlt:3:1-61:1) [@d:XXX] +[debug/ast-final] | AddressFamily -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | BitOrder -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | ByteOrder -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Captures -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Charset -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | DecodeErrorStrategy -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Exception -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | MatchState -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | MissingData -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Profiler -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Protocol -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | RealType -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | RecoverableFailure -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | RuntimeError -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Side -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | SystemException -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | abort -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | current_time -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | debug -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) @@ -416,7 +412,7 @@ [debug/ast-final] | exception_what -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | exception_where -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | exception_where -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | hilti -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | hilti -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | mktime -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | print -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | printValues -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) @@ -424,12 +420,12 @@ [debug/ast-final] | profiler_stop -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - statement::Block [parent @d:XXX] (hilti.hlt:3:1-61:1) [@s:XXX] [debug/ast-final] - declaration::Property [parent @d:XXX] (hilti.hlt:6:1-6:21) [@d:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:8:1-8:83) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:8:1-8:83) [@d:XXX] [debug/ast-final] | LSB0 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | MSB0 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:8:24-8:42) [@q:XXX] -[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:8:24-8:42) (resolved) [@t:XXX] +[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:8:24-8:42) (resolved) [@t:XXX] [debug/ast-final] | LSB0 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | MSB0 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) @@ -460,14 +456,14 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:9:1-9:92) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:9:1-9:92) [@d:XXX] [debug/ast-final] | Big -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Host -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Little -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Network -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:9:25-9:59) [@q:XXX] -[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:9:25-9:59) (resolved) [@t:XXX] +[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:9:25-9:59) (resolved) [@t:XXX] [debug/ast-final] | Big -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Host -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Little -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) @@ -514,13 +510,13 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:10:1-10:80) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:10:1-10:80) [@d:XXX] [debug/ast-final] | Both -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Left -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Right -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:10:20-10:45) [@q:XXX] -[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:10:20-10:45) (resolved) [@t:XXX] +[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:10:20-10:45) (resolved) [@t:XXX] [debug/ast-final] | Both -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Left -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Right -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) @@ -559,12 +555,12 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:11:1-11:84) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:11:1-11:84) [@d:XXX] [debug/ast-final] | IPv4 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | IPv6 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:11:29-11:47) [@q:XXX] -[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:11:29-11:47) (resolved) [@t:XXX] +[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:11:29-11:47) (resolved) [@t:XXX] [debug/ast-final] | IPv4 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | IPv6 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) @@ -595,12 +591,12 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:12:1-12:96) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:12:1-12:96) [@d:XXX] [debug/ast-final] | IEEE754_Double -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | IEEE754_Single -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:12:24-12:62) [@q:XXX] -[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:12:24-12:62) (resolved) [@t:XXX] +[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:12:24-12:62) (resolved) [@t:XXX] [debug/ast-final] | IEEE754_Double -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | IEEE754_Single -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) @@ -631,13 +627,13 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:13:1-13:78) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:13:1-13:78) [@d:XXX] [debug/ast-final] | ICMP -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | TCP -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | UDP -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:13:24-13:46) [@q:XXX] -[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:13:24-13:46) (resolved) [@t:XXX] +[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:13:24-13:46) (resolved) [@t:XXX] [debug/ast-final] | ICMP -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | TCP -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | UDP -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) @@ -676,14 +672,14 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:14:1-14:80) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:14:1-14:80) [@d:XXX] [debug/ast-final] | ASCII -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | UTF8 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | UTF8 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:14:23-14:42) [@q:XXX] -[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:14:23-14:42) (resolved) [@t:XXX] +[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:14:23-14:42) (resolved) [@t:XXX] [debug/ast-final] | ASCII -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | UTF8 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | UTF8 -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - declaration::Constant [parent @t:XXX] (hilti.hlt:14:23-14:42) [@d:XXX] [debug/ast-final] - @@ -692,7 +688,7 @@ [debug/ast-final] - type::enum_::Label [parent @c:XXX] (hilti.hlt:14:30-14:34) [@t:XXX] [debug/ast-final] - QualifiedType [parent @t:XXX] (hilti.hlt:14:30-14:34) [@q:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] -[debug/ast-final] - declaration::Constant [parent @t:XXX] (hilti.hlt:14:23-14:42) [@d:XXX] +[debug/ast-final] - declaration::Constant [parent @t:XXX] (hilti.hlt:14:23-14:42) [@d:XXX] [debug/ast-final] - [debug/ast-final] - expression::Ctor [parent @d:XXX] (const) (resolved) [@e:XXX] [debug/ast-final] - ctor::Enum [parent @e:XXX] [@c:XXX] @@ -712,15 +708,15 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:15:1-15:116) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:15:1-15:116) [@d:XXX] [debug/ast-final] | IGNORE -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | REPLACE -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | REPLACE -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | STRICT -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:15:35-15:66) [@q:XXX] -[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:15:35-15:66) (resolved) [@t:XXX] +[debug/ast-final] - type::Enum [parent @q:XXX] (hilti.hlt:15:35-15:66) (resolved) [@t:XXX] [debug/ast-final] | IGNORE -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | REPLACE -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | REPLACE -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | STRICT -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | Undef -> declaration::Constant [parent @t:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - declaration::Constant [parent @t:XXX] (hilti.hlt:15:35-15:66) [@d:XXX] @@ -730,7 +726,7 @@ [debug/ast-final] - type::enum_::Label [parent @c:XXX] (hilti.hlt:15:42-15:47) [@t:XXX] [debug/ast-final] - QualifiedType [parent @t:XXX] (hilti.hlt:15:42-15:47) [@q:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] -[debug/ast-final] - declaration::Constant [parent @t:XXX] (hilti.hlt:15:35-15:66) [@d:XXX] +[debug/ast-final] - declaration::Constant [parent @t:XXX] (hilti.hlt:15:35-15:66) [@d:XXX] [debug/ast-final] - [debug/ast-final] - expression::Ctor [parent @d:XXX] (const) (resolved) [@e:XXX] [debug/ast-final] - ctor::Enum [parent @e:XXX] [@c:XXX] @@ -757,9 +753,9 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:16:1-16:37) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:16:1-16:37) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:16:24-16:36) [@q:XXX] -[debug/ast-final] - type::Vector [parent @q:XXX] (hilti.hlt:16:24-16:36) (resolved) [@t:XXX] +[debug/ast-final] - type::Vector [parent @q:XXX] (hilti.hlt:16:24-16:36) (resolved) [@t:XXX] [debug/ast-final] - QualifiedType [parent @t:XXX] (hilti.hlt:16:24-16:36) [@q:XXX] [debug/ast-final] - type::vector::Iterator [parent @q:XXX] (hilti.hlt:16:24-16:36) (resolved) [@t:XXX] [debug/ast-final] - QualifiedType [parent @t:XXX] (hilti.hlt:16:31-16:35) [@q:XXX] @@ -769,18 +765,18 @@ [debug/ast-final] - QualifiedType [parent @t:XXX] (hilti.hlt:16:31-16:35) [@q:XXX] [debug/ast-final] - type::UnsignedInteger [parent @q:XXX] (hilti.hlt:16:31-16:35) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (hilti.hlt:16:37-16:36) [@a:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:17:1-17:61) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:17:1-17:61) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:17:24-17:60) [@q:XXX] -[debug/ast-final] - type::Library [parent @q:XXX] (hilti.hlt:17:24-17:60) (resolved) [@t:XXX] +[debug/ast-final] - type::Library [parent @q:XXX] (hilti.hlt:17:24-17:60) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (hilti.hlt:17:61-17:60) [@a:XXX] [debug/ast-final] - Attribute [parent @a:XXX] (hilti.hlt:17:61-17:60) [@a:XXX] [debug/ast-final] - expression::Ctor [parent @a:XXX] (const) (resolved) [@e:XXX] [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:19:1-21:43) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:19:1-21:43) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:19:26-21:1) [@q:XXX] -[debug/ast-final] - type::Struct [parent @q:XXX] (hilti.hlt:19:26-21:1) (resolved) [@t:XXX] +[debug/ast-final] - type::Struct [parent @q:XXX] (hilti.hlt:19:26-21:1) (resolved) [@t:XXX] [debug/ast-final] | self -> declaration::Expression [parent @t:XXX] [@d:XXX] (type: [@e:XXX] [@t:XXX]) [debug/ast-final] - declaration::Expression [parent @t:XXX] (hilti.hlt:19:26-21:1) [@d:XXX] [debug/ast-final] - expression::Keyword [parent @d:XXX] (non-const) (resolved) [@e:XXX] @@ -1104,9 +1100,9 @@ [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] [debug/ast-final] - Attribute [parent @a:XXX] (hilti.hlt:36:126-36:140) [@a:XXX] [debug/ast-final] - -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:39:1-39:66) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:39:1-39:66) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:39:25-39:33) [@q:XXX] -[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:39:25-39:33) (resolved) [@t:XXX] +[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:39:25-39:33) (resolved) [@t:XXX] [debug/ast-final] - [debug/ast-final] - AttributeSet [parent @d:XXX] (hilti.hlt:39:34-39:33) [@a:XXX] [debug/ast-final] - Attribute [parent @a:XXX] (hilti.hlt:39:34-39:33) [@a:XXX] @@ -1114,9 +1110,9 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:42:1-42:80) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:42:1-42:80) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:42:31-42:53) [@q:XXX] -[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:42:31-42:53) (resolved) [@t:XXX] +[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:42:31-42:53) (resolved) [@t:XXX] [debug/ast-final] - type::Name [parent @t:XXX] (hilti.hlt:42:44-42:52) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (hilti.hlt:42:54-42:53) [@a:XXX] [debug/ast-final] - Attribute [parent @a:XXX] (hilti.hlt:42:54-42:53) [@a:XXX] @@ -1124,9 +1120,9 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:46:1-46:86) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:46:1-46:86) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:46:28-46:50) [@q:XXX] -[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:46:28-46:50) (resolved) [@t:XXX] +[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:46:28-46:50) (resolved) [@t:XXX] [debug/ast-final] - type::Name [parent @t:XXX] (hilti.hlt:46:41-46:49) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (hilti.hlt:46:51-46:50) [@a:XXX] [debug/ast-final] - Attribute [parent @a:XXX] (hilti.hlt:46:51-46:50) [@a:XXX] @@ -1134,9 +1130,9 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:49:1-49:98) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:49:1-49:98) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:49:34-49:56) [@q:XXX] -[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:49:34-49:56) (resolved) [@t:XXX] +[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:49:34-49:56) (resolved) [@t:XXX] [debug/ast-final] - type::Name [parent @t:XXX] (hilti.hlt:49:47-49:55) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (hilti.hlt:49:57-49:56) [@a:XXX] [debug/ast-final] - Attribute [parent @a:XXX] (hilti.hlt:49:57-49:56) [@a:XXX] @@ -1144,9 +1140,9 @@ [debug/ast-final] - ctor::String [parent @e:XXX] [@c:XXX] [debug/ast-final] - QualifiedType [parent @c:XXX] [@q:XXX] [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:52:1-52:84) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (hilti.hlt:52:1-52:84) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (hilti.hlt:52:27-52:49) [@q:XXX] -[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:52:27-52:49) (resolved) [@t:XXX] +[debug/ast-final] - type::Exception [parent @q:XXX] (hilti.hlt:52:27-52:49) (resolved) [@t:XXX] [debug/ast-final] - type::Name [parent @t:XXX] (hilti.hlt:52:40-52:48) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (hilti.hlt:52:50-52:49) [@a:XXX] [debug/ast-final] - Attribute [parent @a:XXX] (hilti.hlt:52:50-52:49) [@a:XXX] @@ -1238,21 +1234,21 @@ [debug/ast-final] - type::String [parent @q:XXX] (resolved) [@t:XXX] [debug/ast-final] - Attribute [parent @a:XXX] (hilti.hlt:60:104-60:118) [@a:XXX] [debug/ast-final] - -[debug/ast-final] - declaration::Module [parent @a:XXX] (bar.hlt:2:1-11:1) [@d:XXX] -[debug/ast-final] | Bar -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Bar1 -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Bar2 -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) -[debug/ast-final] | Foo -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] - declaration::Module [parent @a:XXX] (bar.hlt:2:1-11:1) [@d:XXX] +[debug/ast-final] | Bar -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Bar1 -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Bar2 -> declaration::Type [parent @d:XXX] [@d:XXX] ([@d:XXX]) +[debug/ast-final] | Foo -> declaration::Module [parent @a:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] | bar -> declaration::Function [parent @d:XXX] [@d:XXX] ([@d:XXX]) [debug/ast-final] - statement::Block [parent @d:XXX] (bar.hlt:2:1-11:1) [@s:XXX] [debug/ast-final] - declaration::ImportedModule [parent @d:XXX] (bar.hlt:4:1-4:11) [@d:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (bar.hlt:6:1-6:26) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (bar.hlt:6:1-6:26) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (bar.hlt:6:20-6:25) [@q:XXX] -[debug/ast-final] - type::String [parent @q:XXX] (bar.hlt:6:20-6:25) (resolved) [@t:XXX] +[debug/ast-final] - type::String [parent @q:XXX] (bar.hlt:6:20-6:25) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (bar.hlt:6:26-6:25) [@a:XXX] -[debug/ast-final] - declaration::Type [parent @d:XXX] (bar.hlt:7:1-7:29) [@d:XXX] +[debug/ast-final] - declaration::Type [parent @d:XXX] (bar.hlt:7:1-7:29) [@d:XXX] [debug/ast-final] - QualifiedType [parent @d:XXX] (bar.hlt:7:20-7:28) [@q:XXX] -[debug/ast-final] - type::Name [parent @q:XXX] (bar.hlt:7:20-7:28) (resolved) [@t:XXX] +[debug/ast-final] - type::Name [parent @q:XXX] (bar.hlt:7:20-7:28) (resolved) [@t:XXX] [debug/ast-final] - AttributeSet [parent @d:XXX] (bar.hlt:7:29-7:28) [@a:XXX] [debug/ast-final] - declaration::Function [parent @d:XXX] (bar.hlt:9:1-9:44) [@d:XXX] [debug/ast-final] | bar -> declaration::Parameter [parent @t:XXX] (resolved) [@d:XXX] ([@d:XXX]) @@ -1276,30 +1272,28 @@ [debug/ast-final] - AttributeSet [parent @f:XXX] (bar.hlt:9:44-9:43) [@a:XXX] [debug/ast-final] # State tables: [debug/ast-final] [D1] Foo::Foo1 [declaration::Type] (foo.hlt:6:1-6:24) -[debug/ast-final] [D2] Foo::Foo2 [declaration::Type] (foo.hlt:7:1-7:29) -[debug/ast-final] [D3] Foo [declaration::Module] (foo.hlt:2:1-11:1) -[debug/ast-final] [D4] hilti::BitOrder [declaration::Type] (hilti.hlt:8:1-8:83) -[debug/ast-final] [D5] hilti::ByteOrder [declaration::Type] (hilti.hlt:9:1-9:92) -[debug/ast-final] [D6] hilti::Side [declaration::Type] (hilti.hlt:10:1-10:80) -[debug/ast-final] [D7] hilti::AddressFamily [declaration::Type] (hilti.hlt:11:1-11:84) -[debug/ast-final] [D8] hilti::RealType [declaration::Type] (hilti.hlt:12:1-12:96) -[debug/ast-final] [D9] hilti::Protocol [declaration::Type] (hilti.hlt:13:1-13:78) -[debug/ast-final] [D10] hilti::Charset [declaration::Type] (hilti.hlt:14:1-14:80) -[debug/ast-final] [D11] hilti::DecodeErrorStrategy [declaration::Type] (hilti.hlt:15:1-15:116) -[debug/ast-final] [D12] hilti::Captures [declaration::Type] (hilti.hlt:16:1-16:37) -[debug/ast-final] [D13] hilti::Profiler [declaration::Type] (hilti.hlt:17:1-17:61) -[debug/ast-final] [D14] hilti::MatchState [declaration::Type] (hilti.hlt:19:1-21:43) -[debug/ast-final] [D15] hilti::Exception [declaration::Type] (hilti.hlt:39:1-39:66) -[debug/ast-final] [D16] hilti::SystemException [declaration::Type] (hilti.hlt:42:1-42:80) -[debug/ast-final] [D17] hilti::RuntimeError [declaration::Type] (hilti.hlt:46:1-46:86) -[debug/ast-final] [D18] hilti::RecoverableFailure [declaration::Type] (hilti.hlt:49:1-49:98) -[debug/ast-final] [D19] hilti::MissingData [declaration::Type] (hilti.hlt:52:1-52:84) -[debug/ast-final] [D20] hilti [declaration::Module] (hilti.hlt:3:1-61:1) -[debug/ast-final] [D21] Bar::Bar1 [declaration::Type] (bar.hlt:6:1-6:26) -[debug/ast-final] [D22] Bar::Bar2 [declaration::Type] (bar.hlt:7:1-7:29) -[debug/ast-final] [D23] Bar [declaration::Module] (bar.hlt:2:1-11:1) -[debug/ast-final] [D24] hilti::UTF8 [declaration::Constant] (hilti.hlt:14:23-14:42) -[debug/ast-final] [D25] hilti::REPLACE [declaration::Constant] (hilti.hlt:15:35-15:66) +[debug/ast-final] [D2] Foo [declaration::Module] (foo.hlt:2:1-11:1) +[debug/ast-final] [D3] hilti::BitOrder [declaration::Type] (hilti.hlt:8:1-8:83) +[debug/ast-final] [D4] hilti::ByteOrder [declaration::Type] (hilti.hlt:9:1-9:92) +[debug/ast-final] [D5] hilti::Side [declaration::Type] (hilti.hlt:10:1-10:80) +[debug/ast-final] [D6] hilti::AddressFamily [declaration::Type] (hilti.hlt:11:1-11:84) +[debug/ast-final] [D7] hilti::RealType [declaration::Type] (hilti.hlt:12:1-12:96) +[debug/ast-final] [D8] hilti::Protocol [declaration::Type] (hilti.hlt:13:1-13:78) +[debug/ast-final] [D9] hilti::Charset [declaration::Type] (hilti.hlt:14:1-14:80) +[debug/ast-final] [D10] hilti::DecodeErrorStrategy [declaration::Type] (hilti.hlt:15:1-15:116) +[debug/ast-final] [D11] hilti::Captures [declaration::Type] (hilti.hlt:16:1-16:37) +[debug/ast-final] [D12] hilti::Profiler [declaration::Type] (hilti.hlt:17:1-17:61) +[debug/ast-final] [D13] hilti::MatchState [declaration::Type] (hilti.hlt:19:1-21:43) +[debug/ast-final] [D14] hilti::Exception [declaration::Type] (hilti.hlt:39:1-39:66) +[debug/ast-final] [D15] hilti::SystemException [declaration::Type] (hilti.hlt:42:1-42:80) +[debug/ast-final] [D16] hilti::RuntimeError [declaration::Type] (hilti.hlt:46:1-46:86) +[debug/ast-final] [D17] hilti::RecoverableFailure [declaration::Type] (hilti.hlt:49:1-49:98) +[debug/ast-final] [D18] hilti::MissingData [declaration::Type] (hilti.hlt:52:1-52:84) +[debug/ast-final] [D19] hilti [declaration::Module] (hilti.hlt:3:1-61:1) +[debug/ast-final] [D20] Bar::Bar1 [declaration::Type] (bar.hlt:6:1-6:26) +[debug/ast-final] [D21] Bar [declaration::Module] (bar.hlt:2:1-11:1) +[debug/ast-final] [D22] hilti::UTF8 [declaration::Constant] (hilti.hlt:14:23-14:42) +[debug/ast-final] [D23] hilti::REPLACE [declaration::Constant] (hilti.hlt:15:35-15:66) [debug/ast-final] [T1] hilti::BitOrder [type::Enum] (hilti.hlt:8:24-8:42) [debug/ast-final] [T2] hilti::ByteOrder [type::Enum] (hilti.hlt:9:25-9:59) [debug/ast-final] [T3] hilti::Side [type::Enum] (hilti.hlt:10:20-10:45) diff --git a/tests/Baseline/spicy.types.unit.alias-fail/output b/tests/Baseline/spicy.types.unit.alias-fail/output new file mode 100644 index 0000000000..8a5865cab0 --- /dev/null +++ b/tests/Baseline/spicy.types.unit.alias-fail/output @@ -0,0 +1,3 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +[error] <...>/alias-fail.spicy:14:1-14:18: public unit alias cannot refer to a non-public type +[error] spicyc: aborting after errors diff --git a/tests/Baseline/spicy.types.unit.alias/output b/tests/Baseline/spicy.types.unit.alias/output new file mode 100644 index 0000000000..3bc563dc79 --- /dev/null +++ b/tests/Baseline/spicy.types.unit.alias/output @@ -0,0 +1,12 @@ +### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. +Available parsers: + + Test::X + Test::A + Test::Y + Test::Z + +[$x=b"123\x0a"] +[$x=b"123\x0a"] +[$x=b"123\x0a"] +[$x=b"123\x0a"] diff --git a/tests/spicy/types/unit/alias-fail.spicy b/tests/spicy/types/unit/alias-fail.spicy new file mode 100644 index 0000000000..dad68d8dd6 --- /dev/null +++ b/tests/spicy/types/unit/alias-fail.spicy @@ -0,0 +1,15 @@ +# @TEST-EXEC-FAIL: spicyc -d -p %INPUT 2>output +# @TEST-EXEC: btest-diff output +# +# @TEST-DOC: Checks that we catch illegal type aliases + +module Test; + + +type A = unit { + x: bytes &eod; + on %done { print self; } +}; + +public type X = A; # not ok +type non_public = A; # ok diff --git a/tests/spicy/types/unit/alias.spicy b/tests/spicy/types/unit/alias.spicy new file mode 100644 index 0000000000..6f02dbd982 --- /dev/null +++ b/tests/spicy/types/unit/alias.spicy @@ -0,0 +1,23 @@ +# @TEST-EXEC: spicyc -d -j -o test.hlto %INPUT +# @TEST-EXEC: spicy-driver -l test.hlto >>output +# @TEST-EXEC: echo 123 | spicy-driver test.hlto -p Test::A >>output +# @TEST-EXEC: echo 123 | spicy-driver test.hlto -p Test::X >>output +# @TEST-EXEC: echo 123 | spicy-driver test.hlto -p Test::Y >>output +# @TEST-EXEC: echo 123 | spicy-driver test.hlto -p Test::Z >>output +# @TEST-EXEC: btest-diff output +# +# @TEST-DOC: Checks exported unit aliases: they should be accessible for parsing + +module Test; + +public type X = A; + +public type A = unit { + x: bytes &eod; + on %done { print self; } +}; + +public type Y = A; +public type Z = Y; + +type non_public = A;