Skip to content

Vague exception thrown when redefining classes in debug mode #110

@AutonomicPerfectionist

Description

@AutonomicPerfectionist

Describe the bug
I discovered that some tests do not enable debug mode for the entire test; they only set it in one subsection,
which is not preserved in any tests or sections above it. An example is here:

set(CMAKEPP_LANG_DEBUG_MODE ON)

Upon enabling it for the entire test, I discovered that multiple tests started failing because they were redefining classes, but the exception was a type error in the signature of the cpp_decl() function:

Assertion: class is convertible to desc failed.
CMakePPLang/cmake/cmakepp_lang/class/class_decl.cmake:63 (cpp_assert_signature)

It appears that since the class is defined, the type of MyClass changes from desc to class, which fails the signature check. Might be a good idea to explicitly disallow redefining classes, or if it's desired to change the type in the signature to str

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions