digitalmars.D - D1: accepts-invalid?
- klickverbot (18/18) Aug 23 2010 Hello all,
- Don (2/28) Aug 23 2010 Yes. Please put it in Bugzilla.
- Nick Sabalausky (11/26) Aug 23 2010 I'm pretty sure that should work fine in D1 without any errors. Although...
- Steven Schveighoffer (4/35) Aug 23 2010 Wait, how can you pass a runtime string as a template parameter? I'm
- Nick Sabalausky (3/39) Aug 23 2010 Oh, yea, now I see it :)
- Don (2/45) Aug 23 2010 It may be a duplicate of bug 2962.
- Stewart Gordon (6/14) Sep 04 2010 Bug 2962 relies on an alias template parameter. It took me a moment or
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
Aug 23 2010
klickverbot wrote: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, klickverbotYes. Please put it in Bugzilla.
Aug 23 2010
"klickverbot" <see klickverbot.at> wrote in message news:i4ualh$1qh1$1 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).
Aug 23 2010
On Mon, 23 Aug 2010 15:29:32 -0400, Nick Sabalausky <a a.a> wrote:"klickverbot" <see klickverbot.at> wrote in message news:i4ualh$1qh1$1 digitalmars.com...Wait, how can you pass a runtime string as a template parameter? I'm pretty sure the whole thing is a bug. -SteveHello 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 ---------------------------------------
Aug 23 2010
"Steven Schveighoffer" <schveiguy yahoo.com> wrote in message news:op.vhwolemleav7ka localhost.localdomain...On Mon, 23 Aug 2010 15:29:32 -0400, Nick Sabalausky <a a.a> wrote:Oh, yea, now I see it :)"klickverbot" <see klickverbot.at> wrote in message news:i4ualh$1qh1$1 digitalmars.com...Wait, how can you pass a runtime string as a template parameter? I'm pretty sure the whole thing is a bug.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 ---------------------------------------
Aug 23 2010
Nick Sabalausky wrote:"Steven Schveighoffer" <schveiguy yahoo.com> wrote in message news:op.vhwolemleav7ka localhost.localdomain...It may be a duplicate of bug 2962.On Mon, 23 Aug 2010 15:29:32 -0400, Nick Sabalausky <a a.a> wrote:Oh, yea, now I see it :)"klickverbot" <see klickverbot.at> wrote in message news:i4ualh$1qh1$1 digitalmars.com...Wait, how can you pass a runtime string as a template parameter? I'm pretty sure the whole thing is a bug.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 ---------------------------------------
Aug 23 2010
On 24/08/2010 07:55, Don wrote:Nick Sabalausky wrote:<snip>"Steven Schveighoffer" <schveiguy yahoo.com> wrote in message news:op.vhwolemleav7ka localhost.localdomain...Bug 2962 relies on an alias template parameter. It took me a moment or 3 to make out why you'd decided it isn't accepts-invalid. On the other hand, this clearly is. Stewart.It may be a duplicate of bug 2962.Wait, how can you pass a runtime string as a template parameter? I'm pretty sure the whole thing is a bug.Oh, yea, now I see it :)
Sep 04 2010