aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-06-27 05:01:35 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-06-27 05:01:35 +0800
commit6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2 (patch)
tree734cf62327bf53fb1f705a93b6c25de3b0d51e75
parent4407a13c1730bf9ed4bcaf00c3f72640f6ddb2a7 (diff)
downloaddexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.tar.gz
dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.tar.zst
dexon-solidity-6b05bbbbb42dafdbf38661fd9c2c3c3e88a425a2.zip
Update tests for function type comparison
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index 0c56e585..eb1cf0dc 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -571,6 +571,17 @@ BOOST_AUTO_TEST_CASE(comparison_of_function_types)
}
}
)";
+ CHECK_ERROR(text, TypeError, "Operator < not compatible");
+ text = R"(
+ contract C {
+ function f() returns (bool ret) {
+ return f == f;
+ }
+ function g() returns (bool ret) {
+ return f != f;
+ }
+ }
+ )";
CHECK_SUCCESS(text);
}