http://d.puremagic.com/issues/show_bug.cgi?id=8444
Summary: Cannot use dot to disambiguate between local method
and class declaration
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Andrej Mitrovic <[email protected]> 2012-07-25
17:13:47 PDT ---
module test;
class Foo
{
void foo(.test.Foo) { } // should work
void test() { }
}
void main() { }
test.d(5): Error: identifier 'test' of '.test.Foo' is not defined
test.d(5): Error: .test.Foo is used as a type
Not that it does work if "test" is an *imported* module, e.g.:
module mymod;
import test;
class Bar
{
void foo(.test.Foo) { }
void test() { }
}
void main() { }
This compiles.
I'd really like the first case to work because it makes code generation easier
to do (so I'm not talking about handwritten code here). But it's low priority
for me, I can implement workarounds.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------