Skip to content

fixed BooleanLiteral value #7

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

Merged
merged 1 commit into from
Oct 28, 2019
Merged

Conversation

ktb88
Copy link
Contributor

@ktb88 ktb88 commented Sep 21, 2019

This PR fixed to correct value of BooleanLiteral.

The original code compared with True so that true value produced false value.

pragma solidity 0.5.11;
contract C {
  function f() public {
    bool a = true;
  }
}
"type": "VariableDeclarationStatement",
"variables": [
    {
        "type": "VariableDeclaration",
        "typeName": {
            "type": "ElementaryTypeName",
            "name": "bool",
            "loc": {
                "start": {
                    "line": 4,
                    "column": 4
                },
                "end": {
                    "line": 4,
                    "column": 4
                }
            }
        },
        "name": "a",
        "storageLocation": null,
        "loc": {
            "start": {
                "line": 4,
                "column": 4
            },
            "end": {
                "line": 4,
                "column": 9
            }
        }
    }
],
"initialValue": {
    "type": "BooleanLiteral",
    "value": false,
    "loc": {
        "start": {
            "line": 4,
            "column": 13
        },
        "end": {
            "line": 4,
            "column": 13
        }
    }
},

@tintinweb tintinweb merged commit f044be2 into ConsenSysDiligence:master Oct 28, 2019
@tintinweb
Copy link
Collaborator

oh, good catch @ktb88! 🙌

thanks for the fix!
cheers,
tin

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.

2 participants