My Little Dustmite: Bisect is Magic

Kagamin spam at here.lot
Sat Jul 27 16:36:35 UTC 2019


On Saturday, 27 July 2019 at 11:24:11 UTC, Ethan wrote:
> https://run.dlang.io/is/rjTRks
>
> --
>
> void broken()
> {
>     doesntexist();
> }
>
> int main( string[] args )
> {
>     broken();
> }
>
> static assert( false, "so here's a static assert" );

Again, in this example the compiler does provide context that 
assert fails at line 11. Function bodies are compiled at a later 
stage and it doesn't make sense to compile them if top level 
declarations failed to compile, if `doesntexist` only failed to 
compile and its every usage is reported as an error, it will be a 
very big amount of errors, which isn't helpful.


More information about the Digitalmars-d mailing list