aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/functionTypes/internal_function_type_to_address.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/functionTypes/internal_function_type_to_address.sol')
-rw-r--r--test/libsolidity/syntaxTests/functionTypes/internal_function_type_to_address.sol7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/functionTypes/internal_function_type_to_address.sol b/test/libsolidity/syntaxTests/functionTypes/internal_function_type_to_address.sol
new file mode 100644
index 00000000..b75a0d43
--- /dev/null
+++ b/test/libsolidity/syntaxTests/functionTypes/internal_function_type_to_address.sol
@@ -0,0 +1,7 @@
+contract C {
+ function f() public returns (address) {
+ return address(f);
+ }
+}
+// ----
+// TypeError: (72-82): Explicit type conversion not allowed from "function () returns (address)" to "address".