http://d.puremagic.com/issues/show_bug.cgi?id=9062
--- Comment #9 from Kenji Hara <k.hara...@gmail.com> 2012-11-23 06:06:46 PST --- (In reply to comment #8) [snip] OK, I understood what you say. But implementing it in library might be much difficult... --- // An experimental implementation of timon's idea. template PropertyTypeOf(alias prop) { auto ref wrapper()(){ return prop(); } alias PropertyTypeOf = typeof(&wrapper!()); } /*@property*/ int foo() @trusted nothrow { return 10;} pragma(msg, PropertyTypeOf!foo); // -> int function() nothrow @safe (not @trusted) void main() { struct S { /*@property*/ string bar() pure { return ""; } } pragma(msg, PropertyTypeOf!(S.bar)); // -> Error... } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------