Skip to content

Commit

Permalink
test: fix test case to match intention as commented
Browse files Browse the repository at this point in the history
  • Loading branch information
JohelEGP committed Jul 4, 2023
1 parent 0c30349 commit 8ae90d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion regression-tests/pure2-optional-typename.cpp2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ f: <T, V: T::value_type> (x: T::value_type) -> T::value_type = {
// Emitted `template`.
ptr: type == * T; // Needed, pending #502.
type: type == std::pointer_traits<ptr>::rebind<ptr>; // Type-only context.
_ = :std::pointer_traits<ptr>::rebind<ptr> = (); // Non type-only context.
// Uncomment once `typename` is supported for template arguments.
// _ = :identity<typename std::pointer_traits<ptr>::rebind<ptr>> = (); // Non type-only context.

// Aliases.
w: type == T;
Expand Down
5 changes: 3 additions & 2 deletions regression-tests/test-results/pure2-optional-typename.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ template<typename T> using identity = T;
template<typename T, typename T::value_type V> [[nodiscard]] auto f(cpp2::in<typename T::value_type> x) -> typename T::value_type;


#line 36 "pure2-optional-typename.cpp2"
#line 37 "pure2-optional-typename.cpp2"
auto main() -> int;


Expand All @@ -37,7 +37,8 @@ template<typename T, typename T::value_type V> [[nodiscard]] auto f(cpp2::in<typ
// Emitted `template`.
using ptr = T*; // Needed, pending #502.
using type = typename std::pointer_traits<ptr>::template rebind<ptr>;// Type-only context.
(void) typename std::pointer_traits<ptr>::template rebind<ptr>{};// Non type-only context.
// Uncomment once `typename` is supported for template arguments.
// _ = :identity<typename std::pointer_traits<ptr>::rebind<ptr>> = (); // Non type-only context.

// Aliases.
using w = T;
Expand Down

0 comments on commit 8ae90d7

Please sign in to comment.