April 01, 2023 General » Re: removing default case requirement? | |||
|---|---|---|---|
| |||
...break"? i pretty much exclusively use "default: assert(0)" If i have cases that do... | |||
April 01, 2023 General » Re: removing default case requirement? | |||
|---|---|---|---|
| |||
...use `final switch`. - Do some explicit action - assert(0); - enforce(0,"TODO: handle case") - Do... | |||
March 31, 2023 Issues » [Issue 20784] Assert expression specification needs to be updated | |||
|---|---|---|---|
| |||
https://issues.dlang.org/show_bug.cgi?id=20784 Nick Treleaven <nick@geany.org> changed... | |||
March 31, 2023 Issues » [Issue 20595] there should be a way to suggest that `auto` return will only be of certain types | |||
|---|---|---|---|
| |||
...OutStatement with a static assert:
auto f()
out (r)
{
static assert(is(typeof(r) : int... | |||
March 31, 2023 Issues » [Issue 23817] Reject `is` alias template instance TypeSpecialization when TemplateParameterList supplied | |||
|---|---|---|---|
| |||
...not defined static assert(!b); // result is false, not an error static assert(is(int... | |||
March 31, 2023 Issues » [Issue 23773] array length assignment in assert condition should error | |||
|---|---|---|---|
| |||
https://issues.dlang.org/show_bug.cgi?id=23773 Dlang Bot <dlang-bot@dlang.rocks... | |||
March 31, 2023 General » Re: There must be module with test assertions in Phobos | |||
|---|---|---|---|
| |||
...dlang.org/changelog/2.085.0#assert](https://dlang.org/changelog/2.085.0#assert). | |||
March 31, 2023 General » Trying to do alias template deduction myself. | |||
|---|---|---|---|
| |||
...import std.regex;
// import std.traits;
// static assert(isInstanceOf!(Regex, Regex!char)); // now fails, not... | |||
March 31, 2023 Learn » InputRange in arrays | |||
|---|---|---|---|
| |||
...arr = [0, 1]; arr.popFront; assert(arr.front == 1); assert(isInputRange!(typeof(arr))); } ``` SDB@79 | |||
March 30, 2023 General » Re: There must be module with test assertions in Phobos | |||
|---|---|---|---|
| |||
...d
unittest {
int x = 0, y = 5;
assert(x == y);
}
```
```sh
dmd -main -unittest -checkaction... | |||
Copyright © 1999-2021 by the D Language Foundation