diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-30 13:16:35 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-05-30 13:16:35 +0800 |
commit | 6eedc6e7977a34c0d498567347937454044e76ff (patch) | |
tree | 9b327f315db6fce345c20ddeec553342e98eaf21 /test/libsolidity | |
parent | 8f04c59046595216e9fffd93435055aa864fbd1f (diff) | |
download | dexon-solidity-6eedc6e7977a34c0d498567347937454044e76ff.tar dexon-solidity-6eedc6e7977a34c0d498567347937454044e76ff.tar.gz dexon-solidity-6eedc6e7977a34c0d498567347937454044e76ff.tar.bz2 dexon-solidity-6eedc6e7977a34c0d498567347937454044e76ff.tar.lz dexon-solidity-6eedc6e7977a34c0d498567347937454044e76ff.tar.xz dexon-solidity-6eedc6e7977a34c0d498567347937454044e76ff.tar.zst dexon-solidity-6eedc6e7977a34c0d498567347937454044e76ff.zip |
Extend function type comparison test
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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 @@ -293,6 +293,22 @@ BOOST_AUTO_TEST_CASE(comparison_of_function_types) 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) { return f == f; } function g() public returns (bool ret) { |