mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Review suggestions
This commit is contained in:
parent
c3d3ae80fa
commit
faed71c6b1
@ -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())
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user