www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - import inside function sometimes causes link errors

reply "timotheecour" <thelastmammoth gmail.com> writes:
does D fully support using import statements inside functions?
I sometimes get link errors eg:

void fun(){
     import mypackage.mymodule;
     mypackage.mymodule.myfun(); //will cause link error
}

if you haven't encountered it yet I can provide a simplified test 
case.
Oct 19 2012
next sibling parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
On 10/19/12, timotheecour <thelastmammoth gmail.com> wrote:
 does D fully support using import statements inside functions?

It's a rather recent feature, there's probably a few bugs. Feel free to file: http://d.puremagic.com/issues/
Oct 19 2012
prev sibling parent "timotheecour" <thelastmammoth gmail.com> writes:
 It's a rather recent feature, there's probably a few bugs. Feel 
 free to file: http://d.puremagic.com/issues/

done: http://d.puremagic.com/issues/show_bug.cgi?id=8856
Oct 19 2012