diff --git a/AK/TypeCasts.h b/AK/TypeCasts.h index 231ab466a73..1bf42a8a201 100644 --- a/AK/TypeCasts.h +++ b/AK/TypeCasts.h @@ -16,7 +16,7 @@ namespace AK { template ALWAYS_INLINE bool is(InputType& input) { - static_assert(!SameAs); + static_assert(!SameAs, RemoveCVReference>); if constexpr (requires { input.template fast_is(); }) { return input.template fast_is(); } diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp index afaaa842801..57ad00eb0a3 100644 --- a/Libraries/LibWeb/DOM/Element.cpp +++ b/Libraries/LibWeb/DOM/Element.cpp @@ -3686,7 +3686,7 @@ Optional Element::contained_text_auto_directionality(bo // - an element whose dir attribute is not in the undefined state // then continue. // NOTE: "any ancestor element of descendant that is a descendant of element" will be iterated already. - auto is_one_of_the_filtered_elements = [](auto& descendant) -> bool { + auto is_one_of_the_filtered_elements = [](DOM::Node const& descendant) -> bool { return is(descendant) || is(descendant) || is(descendant)