diff options
author | Leonardo Alt <leo@ethereum.org> | 2018-11-28 23:16:02 +0800 |
---|---|---|
committer | Leonardo Alt <leo@ethereum.org> | 2018-11-29 17:38:47 +0800 |
commit | 1d47919c0c77f23542f62f3e4cab83b264d06fa4 (patch) | |
tree | ed25309876b893cab0d2427a72868d8c8b9f5dce /test | |
parent | b4086ac87037813eb553e92839bbc40de6bbd9ac (diff) | |
download | dexon-solidity-1d47919c0c77f23542f62f3e4cab83b264d06fa4.tar.gz dexon-solidity-1d47919c0c77f23542f62f3e4cab83b264d06fa4.tar.zst dexon-solidity-1d47919c0c77f23542f62f3e4cab83b264d06fa4.zip |
Fix ICE when function type struct parameter has field of non-existent type
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/syntaxTests/functionTypes/function_type_struct.sol | 8 | ||||
-rw-r--r-- | test/libsolidity/syntaxTests/functionTypes/function_type_struct_undefined_member.sol | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/functionTypes/function_type_struct.sol b/test/libsolidity/syntaxTests/functionTypes/function_type_struct.sol new file mode 100644 index 00000000..a367996e --- /dev/null +++ b/test/libsolidity/syntaxTests/functionTypes/function_type_struct.sol @@ -0,0 +1,8 @@ +library L +{ + struct Nested + { + uint y; + } + function f(function(Nested memory) external) external pure {} +} diff --git a/test/libsolidity/syntaxTests/functionTypes/function_type_struct_undefined_member.sol b/test/libsolidity/syntaxTests/functionTypes/function_type_struct_undefined_member.sol new file mode 100644 index 00000000..ca08afe5 --- /dev/null +++ b/test/libsolidity/syntaxTests/functionTypes/function_type_struct_undefined_member.sol @@ -0,0 +1,11 @@ +library L +{ + struct Nested + { + Non y; + } + function f(function(Nested memory) external) external pure {} +} +// ---- +// DeclarationError: (32-35): Identifier not found or not unique. +// TypeError: (63-76): Internal type cannot be used for external function type. |