Skip to content

Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file Instructions.cpp, line 3187. #1690

Open
@haoyang9804

Description

@haoyang9804

Describe the bug
As the title hints, the assertion fails during compilation but no error message pops up.
Detected by Erwin
To Reproduce
Use solang compile --target solana <program_path> to compile the given source code

Expected behavior
Pass the compilation or give a readable error message.
Screenshots
Image

Hyperledger Solang version
solang version v0.3.3

Include the complete solidity source code

contract contract0 {
  event event1();

  event event2(int64 var3);

  int64 internal var4;
  uint256[] internal array5;

  function func7() internal returns (uint256 var8, int64 var9) {
    (array5[uint256(30540437740801590618713333456399316997494264502286891660448982163878547524711)] >>= (49299593977788076240728314283023589672119058173983524203648106490831753987427));
    int64 var10 = int64(-0);
    return ((array5[uint256(57404517660657689229145854691350161686808893277519877101294400948421418549571)] -= 52781929409446463364312880211757877359107646042403382876414870862870492513261), ((var10) >>= (array5[(11439729903439580632265693942046073424570788779415595998185405687371276421962)])));
  }
}

contract contract11 {
  event event12();

  event event13(int64 var14);

  int64[2] internal array19;
  int64[2] internal array17 = array19;
  int64[2] internal array15 = (array17);
  string internal var21;

  constructor(string memory var22) {
    (int64(-0)) ^ (array17[uint256(0)]);
  }

  function func23() internal pure returns (int64 var24) {
    int64 var28 = int64(-0);
    (bool(false) ? var28 : var28);
    return (int64(-0));
  }

  function func25(int64 var26) internal pure returns (int64 var27) {
    int64 var29 = (int64(-0));
    (var29 += int64(-0));
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions