https://issues.dlang.org/show_bug.cgi?id=12597
--- Comment #3 from Andrej Mitrovic <[email protected]> --- (In reply to bearophile_hugs from comment #2) > (In reply to Andrej Mitrovic from comment #1) > > > what if the original type is a user-defined type > > that already defines the get() method? > > Then perhaps you need to write this? > > auto y3 = sin(x.get.get); That would cause existing and generic code to break. For example: ----- module test; import std.typecons; struct S { int get() { return 0; } } alias S2 = Typedef!S; void main() { S2 s2; auto x = s2.get(); // works now } ----- If we want a solid Typedef in D2 then we have to take this into account as well. --
