[Issue 7623] New: Allow aliasing of symbols of an aliased subtype
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 1 15:27:52 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7623
Summary: Allow aliasing of symbols of an aliased subtype
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
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-03-01 15:27:51 PST ---
struct Foo
{
@property bool isOne() { return true; }
}
struct Bar
{
Foo foo;
alias foo this;
alias isOne isTwo;
}
void main() { }
test.d(10): Error: undefined identifier isOne
Essentially I wanted to partially merge two types which had a similar
structure, but I still wanted to keep the different APIs. I can use property
getters and setters to forward a function, but I thought an alias would help me
more by allowing me to alias a symbol that was going to be merged via the alias
this feature.
So while it's not crucially important, I'm making this a feature request.
--
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