Thread overview |
---|
May 07, 2010 Assertion failure: 'fieldi>=0 && fieldi < se->elements->dim' on line 2062 in file 'interpret.c' | ||||
---|---|---|---|---|
| ||||
Killed it again :( |
May 07, 2010 Re: Assertion failure: 'fieldi>=0 && fieldi < se->elements->dim' on line 2062 in file 'interpret.c' | ||||
---|---|---|---|---|
| ||||
Posted in reply to strtr | 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? |
May 07, 2010 Re: Assertion failure: 'fieldi>=0 && fieldi < se->elements->dim' on line 2062 in file 'interpret.c' | ||||
---|---|---|---|---|
| ||||
Posted in reply to strtr | 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!
|
May 13, 2010 Re: Assertion failure: 'fieldi>=0 && fieldi < se->elements->dim' on line 2062 in file 'interpret.c' | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don | 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 the few dependencies of the fixed problem module and tried to compile it by importing it in a clean main module. It didn't compile, which led me to this tiny version which still doesn't compile : ---- module main; import s_def; void main(){} ---- module s_def; struct S { float area; static S opCall( float a_ ) { S s = { a_ }; return s; } const S _s = S( 1f ); } ---- s_def.d(3): Error: struct s_def.S no size yet for forward reference I don't know what this means s_def.d(12): Error: cannot evaluate opCall(1F) at compile time Probably related. As far as I know I do exactly the same in my program After understanding this I'll try to recreate the ToString!() bug :) |
May 14, 2010 Re: Assertion failure: 'fieldi>=0 && fieldi < se->elements->dim' on line 2062 in file 'interpret.c' | ||||
---|---|---|---|---|
| ||||
Posted in reply to strtr | This produces the same errors: struct Foo { int bar; static Foo baz() { return Foo(); } const Foo one = Foo.baz(); } void main() {} Bye, bearophile |
May 14, 2010 Re: Assertion failure: 'fieldi>=0 && fieldi < se->elements->dim' on line 2062 in file 'interpret.c' | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | == Quote from bearophile (bearophileHUGS@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 anyways :
----
module main;
import s_def;
void main(){}
----
module s_def;
import e_def; // <---this
struct S
{
float area;
static S opCall( float a_ )
{
S s = { a_ };
return s;
}
const S _s = S( 1f );
}
----
module e_def;
import s_def;
const S e = S(1f);
----
I have import problems quite regularly, but I always fail at tinifying them :)
|
May 14, 2010 Re: Assertion failure: 'fieldi>=0 && fieldi < se->elements->dim' on line 2062 in file 'interpret.c' | ||||
---|---|---|---|---|
| ||||
Posted in reply to strtr | 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(){} |
Copyright © 1999-2021 by the D Language Foundation