Skip to content
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

Fix 21472 - Support tuple comparison with -checkaction=context (2/2) #12055

Merged
merged 1 commit into from Feb 18, 2021

Conversation

MoonlightSentinel
Copy link
Contributor

@MoonlightSentinel MoonlightSentinel commented Dec 27, 2020

Detect TupleExp used inside the assert and redirect them to a new variadic hook in druntime (see dlang/druntime#3318).

Example:

alias a = AliasSeq!(...);
alias b = AliasSeq!(...);
assert(a == b);

This assertion will call:

_d_assert_fail_tuple!(typeof(a))(("==", a, b);

Detect `TupleExp` used inside the `assert` and redirect them to a new
variadic hook in druntime (see dlang/druntime#3318).

Example:
```d
alias a = AliasSeq!(...);
alias b = AliasSeq!(...);
assert(a == b);
```

This assertion will call:
```d
_d_assert_fail!("==", typeof(a))(a, b);
```
@MoonlightSentinel MoonlightSentinel marked this pull request as ready for review February 18, 2021 14:04
Copy link
Member

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dlang-bot dlang-bot merged commit df3c9e0 into dlang:master Feb 18, 2021
@MoonlightSentinel MoonlightSentinel deleted the checkaction-tuples branch June 20, 2021 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants