diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-08-15 22:58:41 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-09-07 00:28:16 +0800 |
commit | 13c8bb1c8920b6ea507688e24adb68e3bf0aed9f (patch) | |
tree | a3ea50b64012387bf81161c60cf05d852e2befca | |
parent | bc6366fd5231b1542e50acb9519535903134a44a (diff) | |
download | dexon-solidity-13c8bb1c8920b6ea507688e24adb68e3bf0aed9f.tar dexon-solidity-13c8bb1c8920b6ea507688e24adb68e3bf0aed9f.tar.gz dexon-solidity-13c8bb1c8920b6ea507688e24adb68e3bf0aed9f.tar.bz2 dexon-solidity-13c8bb1c8920b6ea507688e24adb68e3bf0aed9f.tar.lz dexon-solidity-13c8bb1c8920b6ea507688e24adb68e3bf0aed9f.tar.xz dexon-solidity-13c8bb1c8920b6ea507688e24adb68e3bf0aed9f.tar.zst dexon-solidity-13c8bb1c8920b6ea507688e24adb68e3bf0aed9f.zip |
Review suggestions
4 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index f786a83d..2062458e 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -872,12 +872,12 @@ bool TypeChecker::visit(EventDefinition const& _eventDef) { numIndexed++; if ( - _eventDef.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::ABIEncoderV2) - && dynamic_cast<ReferenceType const*>(type(*var).get()) + _eventDef.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::ABIEncoderV2) && + dynamic_cast<ReferenceType const*>(type(*var).get()) ) m_errorReporter.typeError( var->location(), - "Reference types cannot be indexed." + "Indexed reference types cannot yet be used with ABIEncoderV2." ); } if (!type(*var)->canLiveOutsideStorage()) diff --git a/test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol b/test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol index 6b126db4..aaf6028a 100644 --- a/test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol +++ b/test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol @@ -4,4 +4,4 @@ contract c { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (59-65): Reference types cannot be indexed. +// TypeError: (59-65): Indexed reference types cannot yet be used with ABIEncoderV2. diff --git a/test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol b/test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol index 5c556125..ffae5b9c 100644 --- a/test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol +++ b/test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol @@ -4,4 +4,4 @@ contract c { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (59-67): Reference types cannot be indexed. +// TypeError: (59-67): Indexed reference types cannot yet be used with ABIEncoderV2. diff --git a/test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol b/test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol index 8d2d4f8c..a8e0837f 100644 --- a/test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol +++ b/test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol @@ -5,4 +5,4 @@ contract c { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (85-86): Reference types cannot be indexed. +// TypeError: (85-86): Indexed reference types cannot yet be used with ABIEncoderV2. |