Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

UnusedExpressionResult: Report unused stdlib calls #217

Open
Shvandre opened this issue Nov 14, 2024 · 1 comment
Open

UnusedExpressionResult: Report unused stdlib calls #217

Shvandre opened this issue Nov 14, 2024 · 1 comment
Labels
area:detectors Related to existing detectors blocked false negative

Comments

@Shvandre
Copy link

Shvandre commented Nov 14, 2024

Current behavior
No warning

Expected behavior

@name(__tact_store_bool)
extends native storeBit(self: Builder, value: Bool): Builder;

asm(cell self) extends fun storeRef(self: Builder, cell: Cell): Builder { STREF }

those functions are not marked with "mutates" keyword, so return value should be used.

Input source

contract Sample {
    receive("Test") {
        let x: Builder = beginCell();
        x.storeBit(true);
        x.storeRef(beginCell().storeUint(3, 5).endCell());
    }
}

Error report file
$ yarn misti ./tact.config.json -m info
$ /home/b4cksl4sh/TON-Studio/tact-template/node_modules/.bin/misti ./tact.config.json -m info
No errors found
Done in 0.89s.

@jubnzv jubnzv changed the title Unused return value does not cause a warning, even though function is pure. UnusedExpressionResult: Report unused stdlib calls Nov 15, 2024
@jubnzv jubnzv added bug Something isn't working false negative area:detectors Related to existing detectors and removed triage labels Nov 15, 2024
@jubnzv jubnzv added this to the v0.6 milestone Nov 15, 2024
@jubnzv
Copy link
Member

jubnzv commented Nov 22, 2024

I prefer to lower asm functions to something more convenient to use to don't rewrite the implementation later (requires #74)

@jubnzv jubnzv added blocked and removed bug Something isn't working labels Nov 22, 2024
@jubnzv jubnzv modified the milestones: v0.6, v0.7 Nov 22, 2024
@jubnzv jubnzv removed this from the v0.7 milestone Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:detectors Related to existing detectors blocked false negative
Projects
None yet
Development

No branches or pull requests

2 participants