Skip to content

new detector: Unnamed Return Shadows Local#1403

Open
xternet wants to merge 2 commits intocrytic:masterfrom
xternet:dev-detector-unnamed
Open

new detector: Unnamed Return Shadows Local#1403
xternet wants to merge 2 commits intocrytic:masterfrom
xternet:dev-detector-unnamed

Conversation

@xternet
Copy link
Copy Markdown

@xternet xternet commented Oct 5, 2022

Detects when return function without return statement has unnamed variables inside returns.

Example:

pragma solidity ^0.8.0;

contract Bug {
    function unnamed() external view returns(uint) {
        uint val = 1;
    } //returns 0
}

@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Oct 5, 2022

This pull request introduces 1 alert when merging 9fd5aaf into 996712c - view on LGTM.com

new alerts:

  • 1 for Unused import

@dguido dguido changed the base branch from dev to master January 15, 2026 19:07
@dguido dguido requested a review from smonicas as a code owner January 15, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants