[Issue 6434] New: opDispatch must be considered before alias this.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 3 06:14:27 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6434
Summary: opDispatch must be considered before alias this.
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: gor at boloneum.com
--- Comment #0 from Gor Gyolchanyan <gor at boloneum.com> 2011-08-03 06:14:26 PDT ---
When a class or struct has an opDispatch and an alias this, the alias this is
considered first and a member access gives "no such property" error:
struct A
{
Variant i;
alias i this;
void opDispatch(string name)()
{
}
}
unittest
{
A a;
a.weird; // no property 'weird' for type 'VariantN!(maxSize)'
}
--
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