Search

June 28, 2023
Issues »
https://issues.dlang.org/show_bug.cgi?id=24021

mhh <maxhaton@gmail.com> changed:

           What...
June 29, 2023
General »
...if (Name == name) {
                return from.tupleof[I];
            }
        }
    }

    assert(0);
}

--- foo.d
module foo;
class Foo...
June 28, 2023
Issues »
https://issues.dlang.org/show_bug.cgi?id=24021

Nick Treleaven <nick@geany.org> changed...
June 28, 2023
Issues »
...auto res = some_d_func(A);
    assert (res == A);
    assert (res == expected);
}

```

This example produces...
June 28, 2023
Issues »
https://issues.dlang.org/show_bug.cgi?id=24021

--- Comment #2 from RazvanN <razvan.nitu1305...
June 28, 2023
Issues »
...issue an error if used in an assert. That is very restrictive.

Even if it...
June 28, 2023
Issues »
...ID: 24021
           Summary: Issue a warning on assert with side effects
           Product: D
           Version: D2...
June 27, 2023
General »
...able to access the members! A 'static assert' attempts to protect the project from changes...
June 27, 2023
Issues »
...void main() @safe
{
    auto dg = escapeClosure();
    pragma(msg,typeof(dg));
    clobberStack();
    assert(dg() == 123); // kaboom
}

--
June 27, 2023
Learn »
...converted to strings and concatenated to form the message. The same applies to `static assert()`.
68 69 70 71 72 73 74 75 76 77 78 79
Next ›   Last »