diff options
author | chriseth <chris@ethereum.org> | 2018-06-27 18:04:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-27 18:04:49 +0800 |
commit | b67dfa154cacbe173d2a54a85d73f8b9a03cc15f (patch) | |
tree | 53d6ea6851e2a2d14d23f20ddbaa993cd9312065 /test/libsolidity/syntaxTests | |
parent | 503eb8caa53c1f6ef00cec1fee099b2457c304f4 (diff) | |
parent | 4e8883b63d26eb2bcfc5e1c18c8bab8236fff16b (diff) | |
download | dexon-solidity-b67dfa154cacbe173d2a54a85d73f8b9a03cc15f.tar dexon-solidity-b67dfa154cacbe173d2a54a85d73f8b9a03cc15f.tar.gz dexon-solidity-b67dfa154cacbe173d2a54a85d73f8b9a03cc15f.tar.bz2 dexon-solidity-b67dfa154cacbe173d2a54a85d73f8b9a03cc15f.tar.lz dexon-solidity-b67dfa154cacbe173d2a54a85d73f8b9a03cc15f.tar.xz dexon-solidity-b67dfa154cacbe173d2a54a85d73f8b9a03cc15f.tar.zst dexon-solidity-b67dfa154cacbe173d2a54a85d73f8b9a03cc15f.zip |
Merge pull request #4269 from ethereum/require-emit
[BREAKING] Remove non-0.5.0 warning for emit keyword (make it mandatory)
Diffstat (limited to 'test/libsolidity/syntaxTests')
6 files changed, 6 insertions, 20 deletions
diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/080_event.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/080_event.sol index 780d26a6..c5f9e4d0 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/080_event.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/080_event.sol @@ -1,6 +1,5 @@ contract c { event e(uint indexed a, bytes3 indexed s, bool indexed b); - function f() public { e(2, "abc", true); } + function f() public { emit e(2, "abc", true); } } // ---- -// Warning: (102-119): Invoking events without "emit" prefix is deprecated. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/090_event_call.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/090_event_call.sol index abf46f94..8cf50597 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/090_event_call.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/090_event_call.sol @@ -1,6 +1,5 @@ contract c { event e(uint a, bytes3 indexed s, bool indexed b); - function f() public { e(2, "abc", true); } + function f() public { emit e(2, "abc", true); } } // ---- -// Warning: (94-111): Invoking events without "emit" prefix is deprecated. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/094_event_inheritance.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/094_event_inheritance.sol index d177209b..b13d5755 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/094_event_inheritance.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/094_event_inheritance.sol @@ -2,7 +2,6 @@ contract base { event e(uint a, bytes3 indexed s, bool indexed b); } contract c is base { - function f() public { e(2, "abc", true); } + function f() public { emit e(2, "abc", true); } } // ---- -// Warning: (120-137): Invoking events without "emit" prefix is deprecated. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/563_event_without_emit_deprecated.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/563_event_without_emit_deprecated.sol index d6068ff6..e9a56671 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/563_event_without_emit_deprecated.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/563_event_without_emit_deprecated.sol @@ -5,4 +5,4 @@ contract C { } } // ---- -// Warning: (62-65): Invoking events without "emit" prefix is deprecated. +// TypeError: (62-65): Event invocations have to be prefixed by "emit". diff --git a/test/libsolidity/syntaxTests/types/empty_tuple_event.sol b/test/libsolidity/syntaxTests/types/empty_tuple_event.sol index 3e40b155..24327db0 100644 --- a/test/libsolidity/syntaxTests/types/empty_tuple_event.sol +++ b/test/libsolidity/syntaxTests/types/empty_tuple_event.sol @@ -2,9 +2,8 @@ pragma solidity ^0.4.3; contract C { event SomeEvent(); function a() public { - (SomeEvent(), 7); + (emit SomeEvent(), 7); } } // ---- -// Warning: (95-106): Invoking events without "emit" prefix is deprecated. -// Warning: (95-106): Tuple component cannot be empty. +// ParserError: (95-99): Expected primary expression. diff --git a/test/libsolidity/syntaxTests/types/empty_tuple_event_050.sol b/test/libsolidity/syntaxTests/types/empty_tuple_event_050.sol deleted file mode 100644 index aec5ff2a..00000000 --- a/test/libsolidity/syntaxTests/types/empty_tuple_event_050.sol +++ /dev/null @@ -1,10 +0,0 @@ -pragma experimental "v0.5.0"; -contract C { - event SomeEvent(); - function a() public { - (SomeEvent(), 7); - } -} -// ---- -// TypeError: (101-112): Event invocations have to be prefixed by "emit". -// TypeError: (101-112): Tuple component cannot be empty. |