D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 9470 - Missing symbols in object file if template instantiated inside `with`
Summary: Missing symbols in object file if template instantiated inside `with`
Status: RESOLVED DUPLICATE of issue 8414
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Windows
: P2 critical
Assignee: No Owner
URL:
Keywords: link-failure
Depends on:
Blocks:
 
Reported: 2013-02-07 12:15 UTC by Denis Shelomovskii
Modified: 2013-02-07 12:17 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Denis Shelomovskii 2013-02-07 12:15:22 UTC
---
enum E { x }

void g(T)() { }

void main()
{
    with(E) g!int();
}
---

OPTLINK output:
---
OPTLINK (R) for Win32  Release 8.00.12
...
 Error 42: Symbol Undefined _D4main9__T1gTAiZ1gFNaNbNfAiZE4main1E
---

The source of such link failures is not just unexpected and hard to reduce. Worst of all one will likely think this is one of "unfixable" OPTLINK buffer overflow bugs making D unusable on Windows (or is it a cross-platform issue?).
Comment 1 Andrej Mitrovic 2013-02-07 12:17:09 UTC

*** This issue has been marked as a duplicate of issue 8414 ***