Skip to content

Commit 8ae90d7

Browse files
committed
test: fix test case to match intention as commented
1 parent 0c30349 commit 8ae90d7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

regression-tests/pure2-optional-typename.cpp2

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ f: <T, V: T::value_type> (x: T::value_type) -> T::value_type = {
1313
// Emitted `template`.
1414
ptr: type == * T; // Needed, pending #502.
1515
type: type == std::pointer_traits<ptr>::rebind<ptr>; // Type-only context.
16-
_ = :std::pointer_traits<ptr>::rebind<ptr> = (); // Non type-only context.
16+
// Uncomment once `typename` is supported for template arguments.
17+
// _ = :identity<typename std::pointer_traits<ptr>::rebind<ptr>> = (); // Non type-only context.
1718

1819
// Aliases.
1920
w: type == T;

regression-tests/test-results/pure2-optional-typename.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ template<typename T> using identity = T;
1515
template<typename T, typename T::value_type V> [[nodiscard]] auto f(cpp2::in<typename T::value_type> x) -> typename T::value_type;
1616

1717

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

2121

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

4243
// Aliases.
4344
using w = T;

0 commit comments

Comments
 (0)