or :
module main;
//const S s = S(.5f); // Uncomment to make it compile
struct S
{
float a;
static S opCall( float a_ )
{
S s = { a_ };
return s;
}
const S _s = S( 1f );
}
void main(){}
== Quote from bearophile (bearophileh...@lycos.com)'s article
> This produces the same errors:
> struct Foo {
> int bar;
> static Foo baz() {
> return Foo();
> }
> const Foo one = Foo.baz();
> }
> void main() {}
> Bye,
> bearophile
And this is why in my program compiled any
This produces the same errors:
struct Foo {
int bar;
static Foo baz() {
return Foo();
}
const Foo one = Foo.baz();
}
void main() {}
Bye,
bearophile
Don Wrote:
> strtr wrote:
> > Killed it again :(
> >
>
> Are you using the latest DMD?
I was/am using 1.060
> If so, please try to create a test case,
> as this bug has never been reported before. Thanks!
Had to put some time into actual coding..
but I just tried to create a test case:
Removed t
strtr wrote:
Killed it again :(
Are you using the latest DMD? If so, please try to create a test case,
as this bug has never been reported before. Thanks!
Not feeding a float to ToString! seems to bring it back to life.
What is up with that anyway?
How do I output a float in compile time?
Killed it again :(