Skip to content

Commit

Permalink
refactor(to_cpp1): clarify commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
JohelEGP committed Oct 2, 2024
1 parent aa77287 commit c539769
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions source/to_cpp1.h
Original file line number Diff line number Diff line change
Expand Up @@ -2120,14 +2120,25 @@ class cppfront
-> bool
{
auto type_id = std::get_if<declaration_node::an_object>(&n.type);
if (
!type_id
|| (*type_id)->is_wildcard()
)
{
return false; // (*this)(*term.initializer);
}
return self->is_dependent(**type_id);
return
(
(
!type_id
|| (*type_id)->is_wildcard()
)
&& (*this)(*n.initializer)
)
|| (
type_id
&& self->is_dependent(**type_id)
);
}

auto operator()(statement_node const&) const
-> bool
{
// TODO: Implement checking whether an initializer is dependent.
return false;
}

auto operator()(inspect_expression_node const& expr) const
Expand Down

0 comments on commit c539769

Please sign in to comment.