Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rdmd linker error with simple import structure #96

Open
mdparker opened this issue Jun 21, 2023 · 0 comments
Open

rdmd linker error with simple import structure #96

mdparker opened this issue Jun 21, 2023 · 0 comments

Comments

@mdparker
Copy link
Member

bmqawsed4 reported this on 2021-05-15T09:22:00Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=21922

Description

See code below. rdmd main.d fails with 'Error 42 Undefined Symbol'.
Unexpectedly,removing the comment around import B in main removes issue at cost of widening scope.

// main
void main() {
   import A;
// import B;
   import std.stdio;

   writeln("Entered main");

   fnA1();
   writeln("Leaving main");
}

module A;

void fnA1() {

   import B;
   import std.stdio;
   writeln("Entered fnA1");
   fnB1();
   writeln("Leaving fnA1");
}

module B;

void fnB1() {

import std.stdio;
writeln("Entered fnB1");

}

Comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant