D1: accepts-invalid?

klickverbot see at klickverbot.at
Mon Aug 23 10:20:45 PDT 2010


Hello all,

currently, DMD accepts the following code, but the resulting binary 
bus-errors at runtime:

---
import std.stdio;

void foo( string str ) () {
     writefln( str );
}

void bar( string text ) {
     foo!( text );
}

void main() {	
     bar( "asdf" );
}
---

Shouldn't this be a compile-time error?

Thanks,
klickverbot



More information about the Digitalmars-d mailing list