Skip to content

Commit

Permalink
fix: fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
vuilder0 committed Jan 6, 2022
1 parent 3d8a378 commit b820bdc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions test/syntax/solidity/parsing/modifier_invocation.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
contract c {
modifier mod1(uint a) { if (msg.sender == address(uint160(a))) _; }
modifier mod2 { if (msg.sender == address(2)) _; }
function f() public mod1(7) mod2 { }
modifier mod1(address a) { if (msg.sender == a) _; }
modifier mod2 { if (msg.sender == "vite_0ab5b9c50b27647538cbb7918980c1dd4c281b1a53b2a7c4a1") _; }
function f() public mod1("vite_591e456aa84fccd65e4c916c258ef3b80fadd94eab6f37518c") mod2 { }
}
// ----
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
contract C {
function f() public payable {
abi.encode(this.f{value: 2});
abi.encode(this.f{"tti_5649544520544f4b454e6e40"});
abi.encode(this.f{value: 2,"tti_5649544520544f4b454e6e40"});
abi.encode(this.f{token: "tti_5649544520544f4b454e6e40"});
abi.encode(this.f{value: 2, token: "tti_5649544520544f4b454e6e40"});
}
}
// ----
// TypeError 2056: (60-76): This type cannot be encoded.
// TypeError 2056: (92-106): This type cannot be encoded.
// TypeError 2056: (122-146): This type cannot be encoded.
// TypeError 2056: (92-137): This type cannot be encoded.
// TypeError 2056: (153-208): This type cannot be encoded.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
contract C {
function f() public pure {
function f() public payable {
bytes32 h = keccak256(abi.encodePacked(keccak256, f, this.f{value: 2}, blockhash));
h;
}
}
// ----
// TypeError 2056: (91-100): This type cannot be encoded.
// TypeError 2056: (102-103): This type cannot be encoded.
// TypeError 2056: (105-119): This type cannot be encoded.
// TypeError 2056: (121-130): This type cannot be encoded.
// TypeError 2056: (94-103): This type cannot be encoded.
// TypeError 2056: (105-106): This type cannot be encoded.
// TypeError 2056: (108-124): This type cannot be encoded.
// TypeError 2056: (126-135): This type cannot be encoded.

0 comments on commit b820bdc

Please sign in to comment.