aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsolidity/analysis/TypeChecker.cpp6
-rw-r--r--test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol2
-rw-r--r--test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol2
-rw-r--r--test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol2
4 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index b1ab6f97..c737fe41 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -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())
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.