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

Unhandled System.InvalidOperationException when parsing 3 dimensional array #138

Closed
iobajwa opened this issue May 12, 2020 · 0 comments · Fixed by #215
Closed

Unhandled System.InvalidOperationException when parsing 3 dimensional array #138

iobajwa opened this issue May 12, 2020 · 0 comments · Fixed by #215

Comments

@iobajwa
Copy link

iobajwa commented May 12, 2020

Try parsing a header file containing following code:

extern int some_array_var [10][20][30];

throws following exception:

Unhandled exception. System.InvalidOperationException: Sequence contains more than one element

Replacing Line 33 in sources\ClangSharp\Cursors\Decls\VarDecl.cs from

return exprs.SingleOrDefault();

to

return exprs.FirstOrDefault();

fixes the issue.

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

Successfully merging a pull request may close this issue.

1 participant