Skip to content

Commit

Permalink
XX
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Ballance <matt.ballance@gmail.com>
  • Loading branch information
mballance committed Nov 6, 2023
1 parent 429bd08 commit 5600c71
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/TaskCompareParamLists.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ bool TaskCompareParamLists::equal(

// How do we compare?
if (type_value[0]) {
ret = !m_tref_comp.equal(
ret &= m_tref_comp.equal(
type_value[0]->getDflt(),
type_value[1]->getDflt());
} else if (expr_value[0] && expr_value[0]->getDflt()) {
DEBUG("TODO: Compare value-type parameters");
expr_value[0]->getDflt()->accept(m_this);
} else {
DEBUG("FATAL: didn't hit anything");
Expand Down
1 change: 1 addition & 0 deletions src/TaskGetSpecializedTemplateType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ast::ISymbolRefPath *TaskGetSpecializedTemplateType::find(
// Search through the list of available specializations for
// a matching one
TaskCompareParamLists p_comp(m_factory);
DEBUG("There are %d existing specializations", type_up->getSpec_types().size());
for (int32_t i=0; i<type_up->getSpec_types().size(); i++) {
ast::ISymbolTypeScope *sym_type_s_t = type_up->getSpec_types().at(i).get();
ast::ITypeScope *type_s_t = dynamic_cast<ast::ITypeScope *>(sym_type_s_t->getTarget());
Expand Down
8 changes: 6 additions & 2 deletions tests/src/TestBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,10 @@ void TestBase::parseLink(
const std::string &name,
ast::IGlobalScopeUP &global,
ast::ISymbolScopeUP &root) {
std::vector<ast::IGlobalScope *> files;
global = ast::IGlobalScopeUP(parse(marker_l, content, name));
root = ast::ISymbolScopeUP(link(marker_l, {global.get()}));
files.push_back(global.get());
root = ast::ISymbolScopeUP(link(marker_l, files));
}

std::pair<ast::IGlobalScope *, ast::ISymbolScope *> TestBase::parseLink(
Expand All @@ -168,7 +170,9 @@ std::pair<ast::IGlobalScope *, ast::ISymbolScope *> TestBase::parseLink(
ast::IGlobalScope *global = parse(marker_l, content, name, process_doc_comments);
ast::ISymbolScope *root = 0;
if (!marker_l->hasSeverity(MarkerSeverityE::Error)) {
root = link(marker_l, {global});
std::vector<ast::IGlobalScope *> files;
files.push_back(global);
root = link(marker_l, files);
}

return {global, root};
Expand Down
2 changes: 1 addition & 1 deletion tests/src/TestBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class TestBase : public ::testing::Test {
bool process_doc_comments=false);

ast::ISymbolScope *link(
parser::IMarkerListener *marker_l,
parser::IMarkerListener *marker_l,
const std::vector<ast::IGlobalScopeUP> &files
);

Expand Down

0 comments on commit 5600c71

Please sign in to comment.