digitalmars.D.bugs - [Issue 1872] New: getVirtualFunctions should return empty if called for a field
- d-bugmail puremagic.com (37/37) Feb 26 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1872
- d-bugmail puremagic.com (9/9) Feb 27 2008 http://d.puremagic.com/issues/show_bug.cgi?id=1872
http://d.puremagic.com/issues/show_bug.cgi?id=1872 Summary: getVirtualFunctions should return empty if called for a field Product: D Version: 2.011 Platform: PC OS/Version: Linux Status: NEW Keywords: diagnostic, rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: dhasenan gmail.com class Bar { int snafu; } string foo() { string s = ``; foreach (i, m; __traits(getVirtualFunctions, Bar, "snafu")) { s ~= `0`; } return s; } foo() should return the empty string. Instead, it fails to compile with an obscure error message: test1 0x8171160 typedot type=foreach_virtualfuncs_field.Bar foreach_virtualfuncs_field.d(9): Error: 'this' is only allowed in non-static member functions, not foo foreach_virtualfuncs_field.d(9): Error: this for snafu needs to be type Bar not type int test2 --
Feb 26 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1872 dhasenan gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |DUPLICATE *** This bug has been marked as a duplicate of 1723 *** --
Feb 27 2008