From 45041e8b9c2a132af9c5a2929bc2352f921ee0ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20M=C3=BCller?= Date: Fri, 7 Apr 2017 19:02:07 +0200 Subject: [PATCH] Implement equality for dependent types --- test/cpp_type_alias.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/cpp_type_alias.cpp b/test/cpp_type_alias.cpp index 5013aa8..754a2cc 100644 --- a/test/cpp_type_alias.cpp +++ b/test/cpp_type_alias.cpp @@ -178,9 +178,12 @@ bool equal_types(const cpp_entity_index& idx, const cpp_type& parsed, const cpp_ return iter_a == inst_parsed.arguments().end() && iter_b == inst_synthesized.arguments().end(); } - // TODO: implement equality when those can be parsed case cpp_type_kind::dependent_t: - break; + { + auto& dep_a = static_cast(parsed); + auto& dep_b = static_cast(synthesized); + return dep_a.name() == dep_b.name() && equal_types(idx, dep_a.dependee(), dep_b.dependee()); + } case cpp_type_kind::unexposed_t: return static_cast(parsed).name()