-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: avoid unnamed parameter in function type template argument #1291
base: main
Are you sure you want to change the base?
Conversation
pure2-last-use.cpp2:279:272: error: no member named 'move_only_function' in namespace 'std' | ||
requires (std::is_convertible_v<CPP2_TYPEOF(f_), std::add_const_t<std::add_pointer_t<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(g_), std::add_const_t<std::add_pointer_t<int(cpp2::impl::in<int> in_)>>&> && std::is_convertible_v<CPP2_TYPEOF(mf_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(mg_), std::add_const_t<std::move_only_function<int(cpp2::impl::in<int> in_)>>&>) | ||
requires (std::is_convertible_v<CPP2_TYPEOF(f_), std::add_const_t<std::add_pointer_t<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(g_), std::add_const_t<std::add_pointer_t<int(cpp2::impl::in<int> inx)>>&> && std::is_convertible_v<CPP2_TYPEOF(mf_), std::add_const_t<std::move_only_function<int()>>&> && std::is_convertible_v<CPP2_TYPEOF(mg_), std::add_const_t<std::move_only_function<int(cpp2::impl::in<int> inx)>>&>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be one of the lowering bugs mentioned at 212eb15#commitcomment-147040717.
2137 | return false; | ||
| ^ | ||
2137 | template<typename T, specialization_of_template<std::optional> X> | ||
| ^~~~~~~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some GCC 10 version doesn't output these ~
squiggles.
Maybe @hsutter's local version or a CI runner's.
In the main
branch's commit c5feb42,
they are again removed: c5feb42#diff-aa97a613d9dea020a78ec4046393f329f881475e3d67f8796e6e8afec5849968R4.
Thanks! There are merge conflicts so I won't try to merge this for 0.8. As described in #1322, that means I need a new one-time CLA that will cover all your future contributions. I've emailed you the new CLA, and one it's completed I can look at this PR. |
@@ -1,12 +1,21 @@ | |||
pure2-last-use.cpp2:273:36: error: expected variable name or 'this' in lambda capture list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Regressions weren't re-run so I did that and committed the results.
Note these Clang-12 results in particular changed, can you check the diffs and see if they're benign?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the change looks right.
Resolves 212eb15#commitcomment-147400224
by avoiding the unnamed parameters,
rather than changing the lowering to Cpp1.