diff options
Diffstat (limited to 'test/libsolidity')
3 files changed, 24 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup.sol b/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup.sol new file mode 100644 index 00000000..c23992e9 --- /dev/null +++ b/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup.sol @@ -0,0 +1,7 @@ +contract C { + function f(uint, uint) {} + function f(uint) {} + function g() { f(1, 2, 3); } +} +// ---- +// TypeError: (80-81): No matching declaration found after argument-dependent lookup. diff --git a/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup_in_library.sol b/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup_in_library.sol new file mode 100644 index 00000000..310c4a10 --- /dev/null +++ b/test/libsolidity/syntaxTests/memberLookup/failed_function_lookup_in_library.sol @@ -0,0 +1,9 @@ +library L { + function f(uint, uint) {} + function f(uint) {} +} +contract C { + function g() { L.f(1, 2, 3); } +} +// ---- +// TypeError: (94-97): Member "f" not found or not visible after argument-dependent lookup in type(library L) diff --git a/test/libsolidity/syntaxTests/memberLookup/push_on_memory_types.sol b/test/libsolidity/syntaxTests/memberLookup/push_on_memory_types.sol new file mode 100644 index 00000000..310c073f --- /dev/null +++ b/test/libsolidity/syntaxTests/memberLookup/push_on_memory_types.sol @@ -0,0 +1,8 @@ +contract Test { + function f() public pure { + uint[] memory x; + x.push(1); + } +} +// ---- +// TypeError: (77-83): Member "push" is not available in uint256[] memory outside of storage. |