Skip to content

It should not be possible to store another object than a parser in PPCompositeParser's subclasses instance variable #50

@juliendelplanque

Description

@juliendelplanque

For instance variables that are meant to be used in production.

Allowing that can cause bug that are really complicated to find out and lead to strange behaviour (test being green when run alone and red when run with all the tests of the test suite because the parser is cached in a test resource).

On one of my personal project, I was able to solve this issue using TypedSlot. Maybe we need, in the same direction, to create a special slot to use for PPCompositeParser's subclasses instance variables.

I attached an example of such bad use of the framework to this issue.

PetitParser-Issue50.st.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions