From 20b23e124be8f3d0d914e1b4bf8fc42c37a401bc Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Thu, 15 Aug 2019 14:01:07 +0200 Subject: [PATCH] Add test case. --- .../syntaxTests/functionTypes/conversion_to_address.sol | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/libsolidity/syntaxTests/functionTypes/conversion_to_address.sol diff --git a/test/libsolidity/syntaxTests/functionTypes/conversion_to_address.sol b/test/libsolidity/syntaxTests/functionTypes/conversion_to_address.sol new file mode 100644 index 000000000..6bc3e6c44 --- /dev/null +++ b/test/libsolidity/syntaxTests/functionTypes/conversion_to_address.sol @@ -0,0 +1,7 @@ +contract C { + function f() public view returns (address) { + return address(this.f); + } +} +// ---- +// TypeError: (77-92): Explicit type conversion not allowed from "function () view external returns (address)" to "address".