[Issue 8855] New: cannot define a function name that matches a package name in import statements
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 19 11:47:55 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8855
Summary: cannot define a function name that matches a package
name in import statements
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: thelastmammoth at gmail.com
--- Comment #0 from thelastmammoth at gmail.com 2012-10-19 11:47:54 PDT ---
When I define a function name (eg test() ) that matches a package name in
import statements (eg test.fun), I get a CT error: function main.test conflicts
with import main.test at main.d(1).
Not only is the CT error misleading, causing headaches in larger projects, but
also, is that an intended restriction?
suppose the following files:
├── main.d
└── test
└── fun.d
cat main.d:
import test.fun;
void test(){} //CT error: function main.test conflicts with import main.test at
main.d(1)
void main(){}
cat test/fun.d:
module test.fun;
--
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