Skip to content
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

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

Open
haoyang9804 opened this issue Jan 9, 2025 · 0 comments

Comments

@haoyang9804
Copy link

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));
  }
}
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

No branches or pull requests

1 participant