maybe a noreturn issue

Basile B. b2.temp at gmx.com
Tue Dec 3 12:41:18 UTC 2024


Not sure if that should compile

```d
int f()
{
     while (true) {}
}
```

What I observe and think right now is:

1. if you remove the while statement, you get an error about 
return statement missing
2. here the compiler detects that `f` while not return, in 
consequence it should not accept the input and says that `f` 
return type should be `noreturn`.

What's you're position ?


More information about the Digitalmars-d-learn mailing list