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

Possibly an error handling problem #1688

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

Possibly an error handling problem #1688

haoyang9804 opened this issue Jan 7, 2025 · 0 comments

Comments

@haoyang9804
Copy link

Describe the bug
When the '--emit' flag is followed by more than one choice, Solang emits a strange error message.

To Reproduce
Command: solang compile <program_path> —target solana --emit ast-dot cfg

Expected behavior
I guess if emitting more than one format is disallowed, solang should warns users with readable text.

Screenshots
Image

Hyperledger Solang version
solang version v0.3.3

Include the complete solidity source code

contract contract0 {
  struct struct1 {
    bool var2;
  }

  struct struct3 {
    int16 var4;
    int16 var5;
  }

  mapping(int16 => bool) public mapping6;

  modifier modifier9() {
    int16 var10;
    var10--;
    _;
  }

  function func13() internal view modifier9() returns (string memory var14) {
    var14 = var14;
    bool var18 = true;
    bool var19 = true;
    int16 var20 = 1;
    for (mapping(int16 => bool) storage mapping15 = (mapping6); (var19 && (var18)); (var20 %= struct3(int16(-17061), int16(-23874)).var5)) {}
    string memory var21 = "111";
    var21 = var21;
    return (var21);
  }
}

contract contract22 {
  event event23();

  struct struct24 {
    string var25;
    mapping(int16 => contract0.struct1) mapping26;
  }

  string internal var30;

  modifier modifier31() {
    contract0.struct1 memory struct_instance32;
    struct_instance32 = struct_instance32;
    !struct_instance32.var2;
    _;
  }

  modifier modifier33(string calldata var34) {
    int16 var35;
    var35++;
    _;
  }

  constructor() {
    int16 var39 = 1;
    do {} while((int16(-26842)) < (var39));
  }

  function func36(int16 var37) internal pure returns (int16 var38) {
    int16 var40 = 1;
    (++var40);
  }
}
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