Skip to content

Coverage doesn't cover functions that only return a value #2194

@franfrandev

Description

@franfrandev

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (153ae19 2022-06-26T00:04:15.775569508Z)

What command(s) is the bug in?

forge coverage

Operating System

Linux

Describe the bug

Hello,

When working on a weird ERC20 and checking the coverage, I noticed that public functions that just return a value are not marked as covered in the coverage report even if properly tested.

Screenshot from 2022-07-02 23-48-19
Screenshot from 2022-07-02 23-49-22

I've prepared a repo in order for you to quickly reproduce the bug: https://github.com/iFrostizz/broken-token-cov-repro

Thanks for the amazing work

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions