May 08, 2004 brackets cause compiler error [0.88] | ||||
---|---|---|---|---|
| ||||
Walter, I assume this is due to dmd still supporting C style casts ? -------------------------------- import std.c.stdio; class Foo { } template typename( T : Object ) { private static char[] _name; static char[] name() { if ( _name ) return _name; _name = (T.classinfo.name).dup; // _name = T.classinfo.name.dup; // works return _name; } } int main( char[][] args ) { Foo f = new Foo(); printf( "typename!(Foo).getname=%.*s\n", typename!(Foo).name ); return 0; } // //no property 'classinfo' for type 'Foo' // |
May 09, 2004 Re: brackets cause compiler error [0.88] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wynn | "Mike Wynn" <one_mad_alien@hotmail.com> wrote in message news:31gq909enic9s98upa609f1vcf3r27ovac@4ax.com... > I assume this is due to dmd still supporting C style casts ? Yes. I won't bother fixing this bug, since C style casts are going away. It's an example of why they should go <g>. |
Copyright © 1999-2021 by the D Language Foundation