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

Parser doesn't handle interface functions with contracts #8

Closed
alexrp opened this issue Dec 31, 2011 · 2 comments
Closed

Parser doesn't handle interface functions with contracts #8

alexrp opened this issue Dec 31, 2011 · 2 comments

Comments

@alexrp
Copy link

alexrp commented Dec 31, 2011

The parser can't handle code such as:

public interface Iterable(T)
{
    public int opApply(scope int delegate(ref T) dg)
    in
    {
        assert(dg);
    }
}

It will complain on line 7, saying it expects a {.

@alexrp
Copy link
Author

alexrp commented Dec 31, 2011

Such contracts are also valid in abstract classes (in general, anywhere actually; the parser shouldn't care about the context).

@aBothe
Copy link
Owner

aBothe commented Dec 31, 2011

You're right - it's that function body thing (again). Got to fix that.

@aBothe aBothe closed this as completed Dec 31, 2011
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

2 participants