[Issue 21922] New: rdmd linker error with simple import structure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat May 15 09:22:00 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21922
Issue ID: 21922
Summary: rdmd linker error with simple import structure
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: tools
Assignee: nobody at puremagic.com
Reporter: bmqawsed4 at gmail.com
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");
writeln("Leaving fnB1");
}
--
More information about the Digitalmars-d-bugs
mailing list