assert(false)

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Jun 20 14:37:17 PDT 2013


On 06/20/2013 10:33 PM, Joseph Rushton Wakeling wrote:
> On 06/20/2013 10:25 PM, Jonathan M Davis wrote:
>> Putting it at the end of the function is unnecessary. The compiler already 
>> does that for you.
> 
> Then there are a bunch of functions in std.random ending with unnecessary
> assert(false) statements.  Shall I make this tweak as an addition to current
> pull request?

... one is necessary as it's in a function that is supposed to return a value.

There are also some return; statements at the end of void functions.



More information about the Digitalmars-d-learn mailing list