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".