Hi guys,

when I do the following:

module myMain;

import example;
import std.traits;
import my.static.library.binding;

static this()
{
   foreach ( m; __traits(allMembers, example) )
   {
      static if ( isCallable!(mixing(m) )
      {
         // ... do something here
      }
   }
}

void main() { /* do something here */ }

And my example-module looks like:

module example;

void exmapleFunction()
{
   // do something here
}

I can compile my application without any error, BUT when I move the import of "my.static.library.binding" to the example-module:

module example;

import my.static.library.binding;

void exmapleFunction()
{
   // do something here
}

... I'm getting many error messages like these:

myMain.d-mixin-11(11): Error: undefined identifier _D12TypeInfo_xAa6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D49TypeInfo_xAS3std8typecons16__T5TupleTkTkTkZ5Tuple6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D75TypeInfo_xAS3std3uni38__T13InversionListTS3std3uni8GcPolicyZ13InversionList6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D55TypeInfo_xAE3std5regex15__T6ParserTAyaZ6Parser8Operator6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D31TypeInfo_xAS3std5regex8Bytecode6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D110TypeInfo_xAS3std3uni152__T4TrieTS3std3uni20__T9BitPackedTbVmi1Z9BitPackedTwVmi1114112TS3std3uni23__T9sliceBitsVmi8Vmi21Z9sliceBitsTS3std3uni22__T9sliceBitsVmi0Vmi8Z9sliceBitsZ4Trie6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D45TypeInfo_xS3std5regex14__T7ShiftOrTaZ7ShiftOr6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D11TypeInfo_xw6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D11TypeInfo_xb6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D13TypeInfo_xAya6__initZ myMain.d-mixin-11(11): Error: undefined identifier _D41TypeInfo_xS3std5regex12__T5StackTkZ5Stack6__initZ

I'm having no idea what's going wrong here. I'm simply moving the import from the file where my main() is located in to the example-module. When removing the import of "my.static.library.binding" in the example-module allows me to successfully compile everything. But I need the import in the example-module. Any suggestions what's going wrong here/how I can solve the error?

Reply via email to