Skip to content

Non-ascii chars cause compilation failure, (inserting else branch in the wrong place) #418

Open
@boolafish

Description

@boolafish

What

Somehow the coverage tool inserts the else in wrong place and make the contract non-compilable. (It failed to insert after the { of if block and inserted inside the if)

Error: CompileError: /home/circleci/repo/plasma_framework/.coverage_contracts/src/transactions/eip712Libs/PaymentEip712Lib.sol:138:8: ParserError: Expected primary expression.
       else { coverage_0x2e142684(0x95339fce433c333b185bc690238a8492dbe8aa4afb211e28c4d5a379ce051e16); /* branch */ 

Here is one error instance on our CI: https://circleci.com/gh/omisego/plasma-contracts/3663
I make a branch for the failing code: https://github.com/boolafish/plasma-contracts/tree/solidity_coverage_bug_inserting_coverage_op_wrongly

I think the root cause is I copy pasted some weird symbol to the code comment and it start to fail. And I tried to fix with this commit: omgnetwork/plasma-contracts@c7ff3eb

It was able to work locally (to compile)

Version

  • version: 0.7.0-beta.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions