The same expression twice gets different results
code:
import std.stdio;
bool Fn(float i){ return true; }
const bool b = Fn(cast(int)0);
static if(b) bool Fn(int i){ return false; }
const bool c = Fn(cast(int)0);
void main()
{
writef("%s\n", b);
writef("%s\n", c);
}
output:
true
false
To help avoid duplicate issues, could the assert error messages in DMD be
edited to include the issue number of bugs known to trigger them? That would
be a little more robust than just line numbers and would also help people
find work arounds.
Hello Russell,
The idea here is that if you had return type 'exception', then
exceptions coming out of that function would be returned as return
values rather than thrown with the ordinary mechanism.
[...]
Thoughts?
An interesting idea. Might be of particular use if you have a function (or