[Issue 8444] New: Cannot use dot to disambiguate between local method and class declaration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 25 17:13:49 PDT 2012
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: nobody at puremagic.com
ReportedBy: andrej.mitrovich at gmail.com
--- Comment #0 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list