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

Function literal parsed as struct initialization #170

Closed
pirocks opened this issue Sep 7, 2017 · 1 comment
Closed

Function literal parsed as struct initialization #170

pirocks opened this issue Sep 7, 2017 · 1 comment

Comments

@pirocks
Copy link

pirocks commented Sep 7, 2017

The following:

int function() func = {
    return 6;
};

parses as;

<module>
    <declaration>
        <variableDeclaration>
            <type pretty="int function()">
                <type2>int</type2>
                <function/>
                <parameters>
                </parameters>
            </type>
            <declarator line="1">
                <name>func</name><initializer>
                <nonVoidInitializer>
                    <structInitializer>
                        <structMemberInitializers>
                        </structMemberInitializers>
                    </structInitializer>
                </nonVoidInitializer>
            </initializer>
            </declarator>
        </variableDeclaration>
    </declaration>
</module>

Which does not seem to be correct.

@pirocks
Copy link
Author

pirocks commented Oct 21, 2017

I take it this is now solved.

@pirocks pirocks closed this as completed Oct 21, 2017
dlang-bot added a commit that referenced this issue Oct 23, 2017
fix #170 - Function literal parsed as struct initialization
merged-on-behalf-of: Brian Schott <[email protected]>
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