Skip to content

Conversation

grandizzy
Copy link
Collaborator

Motivation

Closes #4311

NodeType::FunctionCall can have different kinds (functionCall, typeConversion, structConstructorCall, others?)

Solution

  • check function call kind and add coverage only if functionCall kind

@grandizzy grandizzy changed the title fix(coverage): count covearge only for function call kind fix(coverage): count coverage only for function call kind Jul 14, 2024
@grandizzy grandizzy marked this pull request as ready for review July 14, 2024 12:25
@grandizzy grandizzy changed the title fix(coverage): count coverage only for function call kind fix(coverage): add coverage only for function call kind Jul 14, 2024
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NodeType::FunctionCall can have different kinds (functionCall, typeConversion, structConstructorCall, others?)

https://github.com/ethereum/solidity/blob/64facd4919308dc4f20341ca5016ca8f88a24fe2/libsolidity/ast/ASTAnnotations.h#L333-L338

@grandizzy
Copy link
Collaborator Author

NodeType::FunctionCall can have different kinds (functionCall, typeConversion, structConstructorCall, others?)

https://github.com/ethereum/solidity/blob/64facd4919308dc4f20341ca5016ca8f88a24fe2/libsolidity/ast/ASTAnnotations.h#L333-L338

ah, nice, thanks for pointing it!

@grandizzy grandizzy merged commit 6de15b0 into foundry-rs:master Jul 14, 2024
@grandizzy grandizzy deleted the issue-4311 branch July 14, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(forge): no-effect statements on the stack are not ignored in the coverage report
2 participants