Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Another regression in 4.0.0 #43

Closed
@tpaviot

Description

@tpaviot

Following example fails using 4.0.0 and newer (but not with 3.3.0 and older):

import CppHeaderParser

h = """
typedef C A;

class B
{
public:
   A aMethod();
}
"""
CppHeaderParser.CppHeader(h, "string")

Following exception is raised:

Traceback (most recent call last):
  File "ess.py", line 12, in <module>
    CppHeaderParser.CppHeader(h, "string")
  File "/home/thomas/miniconda3/envs/bindgen/lib/python3.7/site-packages/CppHeaderParser/CppHeaderParser.py", line 2981, in __init__
    self.finalize()
  File "/home/thomas/miniconda3/envs/bindgen/lib/python3.7/site-packages/CppHeaderParser/CppHeaderParser.py", line 1936, in finalize
    self.resolve_type(meth["rtnType"], rtnType)
  File "/home/thomas/miniconda3/envs/bindgen/lib/python3.7/site-packages/CppHeaderParser/CppHeaderParser.py", line 1551, in resolve_type
    result["typedefs"] += 1
KeyError: 'typedefs'

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