From 6eedc6e7977a34c0d498567347937454044e76ff Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 30 May 2018 06:16:35 +0100 Subject: Extend function type comparison test --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index ab7cfb12..760139c1 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -290,6 +290,22 @@ BOOST_AUTO_TEST_CASE(comparison_of_function_types) } )"; CHECK_ERROR(text, TypeError, "Operator < not compatible"); + text = R"( + contract C { + function f() public returns (bool ret) { + return this.f > this.f; + } + } + )"; + CHECK_ERROR(text, TypeError, "Operator > not compatible"); + text = R"( + contract C { + function f() public returns (bool ret) { + return f > f; + } + } + )"; + CHECK_ERROR(text, TypeError, "Operator > not compatible"); text = R"( contract C { function f() public returns (bool ret) { -- cgit v1.2.3