diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-08-02 01:01:50 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-08-03 19:41:27 +0800 |
commit | 20c6cea7bb803a5217f6b96062c7bce150ba2b73 (patch) | |
tree | 4e1dcf9400c354b05aaffdc42daf4bfcd988c7fc /test/libsolidity/syntaxTests/events | |
parent | da6cefd475210a9bcae0aad80c03f3679ae00f56 (diff) | |
download | dexon-solidity-20c6cea7bb803a5217f6b96062c7bce150ba2b73.tar.gz dexon-solidity-20c6cea7bb803a5217f6b96062c7bce150ba2b73.tar.zst dexon-solidity-20c6cea7bb803a5217f6b96062c7bce150ba2b73.zip |
Disallow structs in events without ABIEncoderV2
Diffstat (limited to 'test/libsolidity/syntaxTests/events')
5 files changed, 27 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/events/event_nested_array.sol b/test/libsolidity/syntaxTests/events/event_nested_array.sol new file mode 100644 index 00000000..70af63b6 --- /dev/null +++ b/test/libsolidity/syntaxTests/events/event_nested_array.sol @@ -0,0 +1,5 @@ +contract c { + event E(uint[][]); +} +// ---- +// TypeError: (25-33): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. diff --git a/test/libsolidity/syntaxTests/events/event_nested_array_2.sol b/test/libsolidity/syntaxTests/events/event_nested_array_2.sol new file mode 100644 index 00000000..5825650e --- /dev/null +++ b/test/libsolidity/syntaxTests/events/event_nested_array_2.sol @@ -0,0 +1,4 @@ +contract c { + event E(uint[2][]); +} +// ---- diff --git a/test/libsolidity/syntaxTests/events/event_nested_array_in_struct.sol b/test/libsolidity/syntaxTests/events/event_nested_array_in_struct.sol new file mode 100644 index 00000000..fd59e962 --- /dev/null +++ b/test/libsolidity/syntaxTests/events/event_nested_array_in_struct.sol @@ -0,0 +1,6 @@ +contract c { + struct S { uint x; uint[][] arr; } + event E(S); +} +// ---- +// TypeError: (61-62): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. diff --git a/test/libsolidity/syntaxTests/events/event_struct.sol b/test/libsolidity/syntaxTests/events/event_struct.sol new file mode 100644 index 00000000..c955dc5e --- /dev/null +++ b/test/libsolidity/syntaxTests/events/event_struct.sol @@ -0,0 +1,6 @@ +contract c { + struct S { uint a ; } + event E(S); +} +// ---- +// TypeError: (51-52): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. diff --git a/test/libsolidity/syntaxTests/events/event_struct_indexed.sol b/test/libsolidity/syntaxTests/events/event_struct_indexed.sol new file mode 100644 index 00000000..69ee5017 --- /dev/null +++ b/test/libsolidity/syntaxTests/events/event_struct_indexed.sol @@ -0,0 +1,6 @@ +contract c { + struct S { uint a ; } + event E(S indexed); +} +// ---- +// TypeError: (51-52): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. |