mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Improve error message for failed member lookup.
This commit is contained in:
committed by
Alex Beregszaszi
parent
17beac1e07
commit
a94945dfe4
@@ -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.
|
||||
@@ -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)
|
||||
@@ -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.
|
||||
Reference in New Issue
Block a user