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