[Issue 5733] New: Calling opDispatch As Template Results in Compiler Infinite Loop
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Mar 13 21:55:05 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5733
Summary: Calling opDispatch As Template Results in Compiler
Infinite Loop
Product: D
Version: D2
Platform: All
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: wfunction at hotmail.com
--- Comment #0 from wfunction at hotmail.com 2011-03-13 21:51:57 PDT ---
The code below causes the compiler to go into an infinite loop, continuously
allocating memory until it crashes:
struct Test
{
struct opDispatch(string dummy)
{ enum opDispatch = 1; }
}
auto temp = Test().foo!(int)();
Please *do* allow generics to work inside opDispatch (do not just remove the
feature), as it allows for some very neat tricks (like static "late" binding)
to be done.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list