8000 fixed BooleanLiteral value by ktb88 · Pull Request #7 · ConsenSysDiligence/python-solidity-parser · GitHub
[go: up one dir, main page]

Skip to content

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

0