Improved error message for lookup in function types.

This commit is contained in:
Martin Diz
2018-10-10 11:53:53 -03:00
parent dd4acda73a
commit ef25454a04
7 changed files with 105 additions and 2 deletions
@@ -0,0 +1,19 @@
contract A{
function f() public pure{
}
}
contract B{
A public a;
}
contract C{
B public b;
}
contract D{
C c;
function f() public view{
c.b.a.f();
}
}
// ----
// TypeError: (170-175): Member "a" not found or not visible after argument-dependent lookup in function () view external returns (contract B). Did you intend to call the function?
@@ -0,0 +1,17 @@
contract A{
function f() public pure{
}
}
contract B{
A public a;
}
contract C{
B b;
function f() public view{
b.a.f();
}
}
// ----
// TypeError: (140-145): Member "f" not found or not visible after argument-dependent lookup in function () view external returns (contract A). Did you intend to call the function?
@@ -0,0 +1,15 @@
contract A{
}
contract B{
A public a;
}
contract C{
B b;
function f() public view{
b.a.f();
}
}
// ----
// TypeError: (104-109): Member "f" not found or not visible after argument-dependent lookup in function () view external returns (contract A). Did you intend to call the function?
@@ -0,0 +1,17 @@
contract A{
function f() public pure{
}
}
contract B{
A private a;
}
contract C{
B b;
function f() public view{
b.a.f();
}
}
// ----
// TypeError: (141-144): Member "a" not found or not visible after argument-dependent lookup in contract B.
@@ -0,0 +1,17 @@
contract A{
function f() private pure{
}
}
contract B{
A public a;
}
contract C{
B b;
function f() public view{
b.a.f();
}
}
// ----
// TypeError: (141-146): Member "f" not found or not visible after argument-dependent lookup in function () view external returns (contract A). Did you intend to call the function?