Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

add checks for evm types as arg names #204

Merged
merged 4 commits into from
Aug 30, 2022
Merged

add checks for evm types as arg names #204

merged 4 commits into from
Aug 30, 2022

Conversation

refcell
Copy link
Collaborator

@refcell refcell commented Aug 25, 2022

Overview

Attempts a fix for #196

Checklist

  • 1.1 Naming parameters as native solidity datatypes should lead to an error
    #define function balanceOf(address uint256) view returns (uint256 balance) => now errors with:
    carbon(2)

  • 1.2 A lack of a comma in a function definition should not lead to following datatypes affecting the function signature

    • This will not compile now as of 1.1
  • 2. You should be allowed to give a parameter a name that starts with "int" / "uint" / "bytes"

    • This was due to a bug in the PrimitiveEVMType that optimistically unwrapped on parsing the remaining bit of a string as a usize.
  • 3. You should be able to name dynamic parameters (string, bytes, <type>[], etc.)

@refcell refcell added parser Huff Parser Related. med-priority Medium Priority Task bug Code Smells labels Aug 25, 2022
@refcell refcell self-assigned this Aug 25, 2022
@JetJadeja
Copy link
Contributor

Does this also support events?

@refcell refcell requested a review from clabby August 25, 2022 21:18
@refcell
Copy link
Collaborator Author

refcell commented Aug 25, 2022

Does this also support events?

I believe it should! Will add some tests

@refcell refcell linked an issue Aug 25, 2022 that may be closed by this pull request
Copy link
Member

@clabby clabby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@refcell refcell merged commit 004da95 into stage Aug 30, 2022
@refcell refcell deleted the ab/philogy_fixes branch February 26, 2023 19:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Code Smells med-priority Medium Priority Task parser Huff Parser Related.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler incorrectly interprets parameter names
3 participants