Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Resolve Literal#constant if required. Fixes #755. #758

Merged
merged 5 commits into from
Jul 25, 2016

Conversation

msteinbeck
Copy link
Contributor

In some cases (an example is given in #755) Literal#constant may
be null and, thus, causes a NullPointerException when calling
localDeclaration.initialization.traverse(this, scope);. This
patch fixes the issue by resolving Literal#constant if required.

In some cases (an example is given in INRIA#755) Literal#constant may
be `null` and, thus, causes a NullPointerException when calling
`localDeclaration.initialization.traverse(this, scope);`. This
patch fixes the issue by resolving Literal#constant if required.
@monperrus
Copy link
Collaborator

Excellent, thanks! Would you add a test case showing that the bug has disappeared?

@GerardPaligot
Copy link
Contributor

AppVayor seems to fail for bad reasons here. I relaunched it.

@ReTuXx do you find time to add a test case on your PR?

@msteinbeck
Copy link
Contributor Author

Working on it.

@GerardPaligot
Copy link
Contributor

Thanks! :)

If you need help, come back to us.

In case of a StringLiteral type resolution must be omitted is scope is null.
Otherwise, a NullPointerException is thrown.
@msteinbeck
Copy link
Contributor Author

Test case has been added. Fixed another issue that occurs if a Literal is a StringLiteral and scope is null.

@msteinbeck
Copy link
Contributor Author

Oh sorry, looks like I forgot to check style guide.

@GerardPaligot GerardPaligot merged commit 4a89309 into INRIA:master Jul 25, 2016
@tdurieux tdurieux mentioned this pull request Sep 19, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants