Review suggestions

This commit is contained in:
Leonardo Alt
2018-09-06 18:28:16 +02:00
committed by chriseth
parent bc6366fd52
commit 13c8bb1c89
4 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -872,12 +872,12 @@ bool TypeChecker::visit(EventDefinition const& _eventDef)
{ {
numIndexed++; numIndexed++;
if ( if (
_eventDef.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::ABIEncoderV2) _eventDef.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::ABIEncoderV2) &&
&& dynamic_cast<ReferenceType const*>(type(*var).get()) dynamic_cast<ReferenceType const*>(type(*var).get())
) )
m_errorReporter.typeError( m_errorReporter.typeError(
var->location(), var->location(),
"Reference types cannot be indexed." "Indexed reference types cannot yet be used with ABIEncoderV2."
); );
} }
if (!type(*var)->canLiveOutsideStorage()) if (!type(*var)->canLiveOutsideStorage())
@@ -4,4 +4,4 @@ contract c {
} }
// ---- // ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. // 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.
@@ -4,4 +4,4 @@ contract c {
} }
// ---- // ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. // 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.
@@ -5,4 +5,4 @@ contract c {
} }
// ---- // ----
// Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. // 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.