Closed Estrangeling closed 1 year ago
Hi @Estrangeling, ~this looks very much like a bug with our pattern matching system. I'll investigate and we'll hopefully have a fix in the next release.~
This is the same as sourcery-ai/sourcery#328, so I'm going to close this issue in favour of the older one.
I am using Visual Studio Code with Sourcery extension.
And I have encountered the bug multiple times, the bug is as follows:
Inside a script, if there is a class defined above a function, the function isn't a member of the class, Sourcery will mistake the function as a member of the class and show the following message:
This is a bug, the function isn't part of the class definition. This can happen for various reasons, but the bug most frequently occurs when a class is added before a function in a script.
As an example:
The message goes away if I close the editor and reopen it. But it will easily resurface if I add a new class or edit a class defined before a function.
How can I fix this?