diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-09 01:25:32 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-09 01:25:32 +0100 |
commit | 1a05a69ebfaed97a387ec5f5ccdada7e82409743 (patch) | |
tree | dd15592771e5a414a5291b812ab0400a1ce5c591 | |
parent | e44fb038ec4404f2c38b698ec95c80d051b8d0cf (diff) |
adapted to new code
-rw-r--r-- | src/core/model/Domain.cpp | 8 | ||||
-rw-r--r-- | test/core/model/TestAdvanced.hpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core/model/Domain.cpp b/src/core/model/Domain.cpp index f03bd7a..1de4f1a 100644 --- a/src/core/model/Domain.cpp +++ b/src/core/model/Domain.cpp @@ -29,9 +29,11 @@ namespace model { void Descriptor::continueResolve(ResolutionState &state) { - const NodeVector<Attribute> &attributes = - attributesDescriptor->getAttributes(); - continueResolveComposita(attributes, attributes.getIndex(), state); + if (attributesDescriptor != nullptr) { + const NodeVector<Attribute> &attributes = + attributesDescriptor->getAttributes(); + continueResolveComposita(attributes, attributes.getIndex(), state); + } continueResolveComposita(fieldDescriptors, fieldDescriptors.getIndex(), state); } diff --git a/test/core/model/TestAdvanced.hpp b/test/core/model/TestAdvanced.hpp index 5af6003..98b41b4 100644 --- a/test/core/model/TestAdvanced.hpp +++ b/test/core/model/TestAdvanced.hpp @@ -30,12 +30,10 @@ static Rooted<StructuredClass> resolveDescriptor(Handle<Domain> domain, const std::string &className) { // use the actual resolve method. - std::vector<Rooted<Managed>> resolved = domain->resolve(className); + std::vector<ResolutionResult> resolved = domain->resolve(className, typeOf<StructuredClass>()); // take the first valid result. for (auto &r : resolved) { - if (r->isa(typeOf<StructuredClass>())) { - return r.cast<StructuredClass>(); - } + return r.node.cast<StructuredClass>(); } // if no valid result exists, return nullptr. return {nullptr}; |