June 28, 2023 Issues » [Issue 24021] Issue a warning on assert with side effects | |||
|---|---|---|---|
| |||
https://issues.dlang.org/show_bug.cgi?id=24021
mhh <maxhaton@gmail.com> changed:
What... | |||
June 29, 2023 General » Re: Algorithms should be free from rich types | |||
|---|---|---|---|
| |||
...if (Name == name) {
return from.tupleof[I];
}
}
}
assert(0);
}
--- foo.d
module foo;
class Foo... | |||
June 28, 2023 Issues » [Issue 24021] Issue a warning on assert with side effects | |||
|---|---|---|---|
| |||
https://issues.dlang.org/show_bug.cgi?id=24021 Nick Treleaven <nick@geany.org> changed... | |||
June 28, 2023 Issues » [Issue 24022] New: ImportC: Error: attribute `__anonymous` is used as a type | |||
|---|---|---|---|
| |||
...auto res = some_d_func(A);
assert (res == A);
assert (res == expected);
}
```
This example produces... | |||
June 28, 2023 Issues » [Issue 24021] Issue a warning on assert with side effects | |||
|---|---|---|---|
| |||
https://issues.dlang.org/show_bug.cgi?id=24021 --- Comment #2 from RazvanN <razvan.nitu1305... | |||
June 28, 2023 Issues » [Issue 24021] Issue a warning on assert with side effects | |||
|---|---|---|---|
| |||
...issue an error if used in an assert. That is very restrictive. Even if it... | |||
June 28, 2023 Issues » [Issue 24021] New: Issue a warning on assert with side effects | |||
|---|---|---|---|
| |||
...ID: 24021
Summary: Issue a warning on assert with side effects
Product: D
Version: D2... | |||
June 27, 2023 General » Algorithms should be free from rich types | |||
|---|---|---|---|
| |||
...able to access the members! A 'static assert' attempts to protect the project from changes... | |||
June 27, 2023 Issues » [Issue 23440] closure over typesafe variadic or scope array passes safe though leads to stack corruption | |||
|---|---|---|---|
| |||
...void main() @safe
{
auto dg = escapeClosure();
pragma(msg,typeof(dg));
clobberStack();
assert(dg() == 123); // kaboom
}
-- | |||
June 27, 2023 Learn » Re: pragma msg field name? | |||
|---|---|---|---|
| |||
...converted to strings and concatenated to form the message. The same applies to `static assert()`. | |||
Copyright © 1999-2021 by the D Language Foundation