Skip to content

Unhandled System.InvalidOperationException when parsing 3 dimensional array #138

Closed
@iobajwa

Description

@iobajwa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions