Error: 'this' is only defined in non-static member functions, not parse

H. S. Teoh hsteoh at
Tue Jan 17 07:54:24 PST 2012

On Tue, Jan 17, 2012 at 12:23:55PM +0100, Matej Nanut wrote:
> I will try to remove all snippets in my code that aren't relevant but still
> exhibit the issue, when I find the time. What I forgot to mention is that
> this error appeared when I did some so-called "refactoring"; I moved a
> nested class out of its parent, since I wanted it visible on the outside.

This may be the cause of your trouble. If the nested class references
members in the outer class, then moving it outside will break it, since
it won't have an outer scope anymore.


Only boring people get bored. -- JM

More information about the Digitalmars-d-learn mailing list