-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { } | ||
} | ||
// ---- |
8 changes: 4 additions & 4 deletions
8
test/syntax/solidity/specialFunctions/functionCallOptions_err.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
10 changes: 5 additions & 5 deletions
10
test/syntax/solidity/specialFunctions/types_with_unspecified_encoding_internal_functions.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |