Review suggestions

This commit is contained in:
Leonardo Alt 2018-08-15 16:58:41 +02:00
parent c3d3ae80fa
commit faed71c6b1
4 changed files with 6 additions and 6 deletions

View File

@ -898,12 +898,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())

View File

@ -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.

View File

@ -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.

View File

@ -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.