"klickverbot" <s...@klickverbot.at> wrote in message news:i4ualh$1qh...@digitalmars.com... > 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? >
I'm pretty sure that should work fine in D1 without any errors. Although on 1.062 I'm getting this (at run-time): --------------------------------------- Error: 4invalid UTF-8 sequence 1 --------------------------------------- Which is rather weird. It does work on 2.048, although it shouldn't since there's no "()" after "foo!(text)" (I guess that just hasn't been implemented yet).