mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Treat invalid external function type as a fatal error to prevent the type from being used
- `returnParameterTypesWithoutDynamicTypes()` assumes it won't encounter such types.
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
function f() public {
|
||||
function() external returns (function() internal) getCallback;
|
||||
getCallback();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 2582: (76-96): Internal type cannot be used for external function type.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
function f(
|
||||
function() external returns (function() internal) getCallback
|
||||
) public {
|
||||
getCallback();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 2582: (66-86): Internal type cannot be used for external function type.
|
||||
Reference in New Issue
Block a user