Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore invalid field declarations #24

Closed
pgenfer opened this issue Nov 18, 2016 · 1 comment
Closed

Ignore invalid field declarations #24

pgenfer opened this issue Nov 18, 2016 · 1 comment

Comments

@pgenfer
Copy link
Owner

pgenfer commented Nov 18, 2016

Given the following code snippet:

public interface IInterface
{
        bool startTyping
}

Obviously, this is not valid code (but could appear while typing) but the fragment is interpreted as field declaration.
But since an interface cannot contain a field declaration, mixinSharp assumes that every field declaration is hosted inside a ClassDeclaration and therefore cannot cast the declaration of IInterface to the correct type.

An additional check should be added to ensure that field definitions that are not hosted inside a class declaration are ignored.

pgenfer added a commit that referenced this issue Dec 3, 2016
@pgenfer
Copy link
Owner Author

pgenfer commented Dec 3, 2016

Fixed in 1.6.1

@pgenfer pgenfer closed this as completed Dec 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant