[Issue 10591] New: Error: only one main allowed doesn't show location of conflicting main symbols

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 9 20:19:04 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10591

           Summary: Error: only one main allowed doesn't show location of
                    conflicting main symbols
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thelastmammoth at gmail.com


--- Comment #0 from thelastmammoth at gmail.com 2013-07-09 20:19:02 PDT ---
---a.d
void main(){}
---

---b.d
void main(){}
---

---main.d
import a,b;
---

rdmd main.d
(or dmd main.d a.d b.d)

=>b.d(1): Error: only one main allowed
the error message should show:
b.d(1): Error: only one main allowed (previously defined in a.d(1))

In more complex cases (with auto generated code or mixins etc), it can be hard
to trace down location of such main symbols, so compiler should show that.

-- 
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