← Back to index
|
Original Bugzilla link
Bug 21922 – rdmd linker error with simple import structure
Status
NEW
Severity
enhancement
Priority
P4
Component
tools
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2021-05-15T09:22:00Z
Last change time
2022-12-17T10:31:18Z
Assigned to
No Owner
Creator
bmqawsed4
Comments
Comment #0
by bmqawsed4 — 2021-05-15T09:22:00Z
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"); }