Assertion failure: 'fieldi>=0 && fieldi < se->elements->dim' on line 2062 in file 'interpret.c'

strtr strtr at spam.com
Fri May 14 07:25:31 PDT 2010


== Quote from bearophile (bearophileHUGS at 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 :)





More information about the Digitalmars-d-learn mailing list