fix #20621 Comparing addresses of rvalue reference parameters not correct (#20622)

This commit is contained in:
Walter Bright 2024-12-31 01:00:03 -08:00 committed by GitHub
parent 1fa6c0a960
commit c57da0cf59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 38 additions and 2 deletions

View file

@ -55,6 +55,8 @@ struct S4
{
void* p;
this(ref S4) { }
this(S4 s)
{
assert(&s is &x); // confirm the rvalue reference