mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4514 from ethereum/errors_period_missing
Add missing period in the end of error messages
This commit is contained in:
commit
0f23445d84
@ -1951,7 +1951,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
|
|||||||
_memberAccess.location(),
|
_memberAccess.location(),
|
||||||
"Member \"" + memberName + "\" not found or not visible "
|
"Member \"" + memberName + "\" not found or not visible "
|
||||||
"after argument-dependent lookup in " + exprType->toString() +
|
"after argument-dependent lookup in " + exprType->toString() +
|
||||||
(memberName == "value" ? " - did you forget the \"payable\" modifier?" : "")
|
(memberName == "value" ? " - did you forget the \"payable\" modifier?" : ".")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (possibleMembers.size() > 1)
|
else if (possibleMembers.size() > 1)
|
||||||
@ -1959,7 +1959,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
|
|||||||
_memberAccess.location(),
|
_memberAccess.location(),
|
||||||
"Member \"" + memberName + "\" not unique "
|
"Member \"" + memberName + "\" not unique "
|
||||||
"after argument-dependent lookup in " + exprType->toString() +
|
"after argument-dependent lookup in " + exprType->toString() +
|
||||||
(memberName == "value" ? " - did you forget the \"payable\" modifier?" : "")
|
(memberName == "value" ? " - did you forget the \"payable\" modifier?" : ".")
|
||||||
);
|
);
|
||||||
|
|
||||||
auto& annotation = _memberAccess.annotation();
|
auto& annotation = _memberAccess.annotation();
|
||||||
@ -1971,7 +1971,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
|
|||||||
m_errorReporter.typeError(
|
m_errorReporter.typeError(
|
||||||
_memberAccess.location(),
|
_memberAccess.location(),
|
||||||
"Function \"" + memberName + "\" cannot be called on an object of type " +
|
"Function \"" + memberName + "\" cannot be called on an object of type " +
|
||||||
exprType->toString() + " (expected " + funType->selfType()->toString() + ")"
|
exprType->toString() + " (expected " + funType->selfType()->toString() + ")."
|
||||||
);
|
);
|
||||||
|
|
||||||
if (exprType->category() == Type::Category::Struct)
|
if (exprType->category() == Type::Category::Struct)
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (63-71): Member "pop" not found or not visible after argument-dependent lookup in uint256
|
// TypeError: (63-71): Member "pop" not found or not visible after argument-dependent lookup in uint256.
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (66-74): Member "pop" not found or not visible after argument-dependent lookup in uint256[3] storage ref
|
// TypeError: (66-74): Member "pop" not found or not visible after argument-dependent lookup in uint256[3] storage ref.
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (65-73): Member "pop" not found or not visible after argument-dependent lookup in string storage ref
|
// TypeError: (65-73): Member "pop" not found or not visible after argument-dependent lookup in string storage ref.
|
||||||
|
@ -6,4 +6,4 @@ contract C {
|
|||||||
function g() public { L.f(1, 2, 3); }
|
function g() public { L.f(1, 2, 3); }
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (115-118): Member "f" not found or not visible after argument-dependent lookup in type(library L)
|
// TypeError: (115-118): Member "f" not found or not visible after argument-dependent lookup in type(library L).
|
||||||
|
@ -4,4 +4,4 @@ contract Scope {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (101-115): Member "stateVar" not found or not visible after argument-dependent lookup in type(contract Scope)
|
// TypeError: (101-115): Member "stateVar" not found or not visible after argument-dependent lookup in type(contract Scope).
|
||||||
|
@ -8,4 +8,4 @@ contract B is A {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (95-102): Member "f" not found or not visible after argument-dependent lookup in contract super B
|
// TypeError: (95-102): Member "f" not found or not visible after argument-dependent lookup in contract super B.
|
||||||
|
@ -8,4 +8,4 @@ contract Child is Parent2 {
|
|||||||
function foo() public returns (uint256) { return Parent2.m_aMember1; }
|
function foo() public returns (uint256) { return Parent2.m_aMember1; }
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (200-218): Member "m_aMember1" not found or not visible after argument-dependent lookup in type(contract Parent2)
|
// TypeError: (200-218): Member "m_aMember1" not found or not visible after argument-dependent lookup in type(contract Parent2).
|
||||||
|
@ -9,4 +9,4 @@ contract Child is Parent2 {
|
|||||||
uint256 public m_aMember3;
|
uint256 public m_aMember3;
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (200-216): Member "m_aMember2" not found or not visible after argument-dependent lookup in type(contract Child)
|
// TypeError: (200-216): Member "m_aMember2" not found or not visible after argument-dependent lookup in type(contract Child).
|
||||||
|
@ -5,4 +5,4 @@ contract d {
|
|||||||
function g() public { c(0).f(); }
|
function g() public { c(0).f(); }
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (83-89): Member "f" not found or not visible after argument-dependent lookup in contract c
|
// TypeError: (83-89): Member "f" not found or not visible after argument-dependent lookup in contract c.
|
||||||
|
@ -5,4 +5,4 @@ contract d {
|
|||||||
function g() public { c(0).a(); }
|
function g() public { c(0).a(); }
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (66-72): Member "a" not found or not visible after argument-dependent lookup in contract c
|
// TypeError: (66-72): Member "a" not found or not visible after argument-dependent lookup in contract c.
|
||||||
|
@ -6,4 +6,4 @@ contract test {
|
|||||||
ActionChoices choices;
|
ActionChoices choices;
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (121-159): Member "RunAroundWavingYourHands" not found or not visible after argument-dependent lookup in type(enum test.ActionChoices)
|
// TypeError: (121-159): Member "RunAroundWavingYourHands" not found or not visible after argument-dependent lookup in type(enum test.ActionChoices).
|
||||||
|
@ -5,4 +5,4 @@ contract derived is base {
|
|||||||
function g() public { base.f(); }
|
function g() public { base.f(); }
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (99-105): Member "f" not found or not visible after argument-dependent lookup in type(contract base)
|
// TypeError: (99-105): Member "f" not found or not visible after argument-dependent lookup in type(contract base).
|
||||||
|
@ -5,4 +5,4 @@ contract derived is base {
|
|||||||
function g() public { base.f(); }
|
function g() public { base.f(); }
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (100-106): Member "f" not found or not visible after argument-dependent lookup in type(contract base)
|
// TypeError: (100-106): Member "f" not found or not visible after argument-dependent lookup in type(contract base).
|
||||||
|
@ -3,4 +3,4 @@ contract C {
|
|||||||
function f() public { uint a = s.length; }
|
function f() public { uint a = s.length; }
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (62-70): Member "length" not found or not visible after argument-dependent lookup in string storage ref
|
// TypeError: (62-70): Member "length" not found or not visible after argument-dependent lookup in string storage ref.
|
||||||
|
@ -6,4 +6,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (177-185): Member "double" not found or not visible after argument-dependent lookup in uint256
|
// TypeError: (177-185): Member "double" not found or not visible after argument-dependent lookup in uint256.
|
||||||
|
@ -8,4 +8,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (305-313): Member "double" not found or not visible after argument-dependent lookup in uint16
|
// TypeError: (305-313): Member "double" not found or not visible after argument-dependent lookup in uint16.
|
||||||
|
@ -7,4 +7,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (227-235): Member "double" not found or not visible after argument-dependent lookup in uint256
|
// TypeError: (227-235): Member "double" not found or not visible after argument-dependent lookup in uint256.
|
||||||
|
@ -6,4 +6,4 @@ contract test {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (100-103): Member "l" not found or not visible after argument-dependent lookup in library L
|
// TypeError: (100-103): Member "l" not found or not visible after argument-dependent lookup in library L.
|
||||||
|
@ -11,4 +11,4 @@ contract A {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (137-140): Member "b" not found or not visible after argument-dependent lookup in bytes memory
|
// TypeError: (137-140): Member "b" not found or not visible after argument-dependent lookup in bytes memory.
|
||||||
|
@ -4,4 +4,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (76-86): Member "selector" not found or not visible after argument-dependent lookup in function () view returns (bytes4)
|
// TypeError: (76-86): Member "selector" not found or not visible after argument-dependent lookup in function () view returns (bytes4).
|
||||||
|
@ -6,4 +6,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (115-125): Member "selector" not found or not visible after argument-dependent lookup in function () pure
|
// TypeError: (115-125): Member "selector" not found or not visible after argument-dependent lookup in function () pure.
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (99-109): Member "selector" not found or not visible after argument-dependent lookup in function ()
|
// TypeError: (99-109): Member "selector" not found or not visible after argument-dependent lookup in function ().
|
||||||
|
@ -4,4 +4,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes32)
|
// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes32).
|
||||||
|
@ -4,4 +4,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (47-57): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes32)
|
// TypeError: (47-57): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes32).
|
||||||
|
@ -4,4 +4,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes20)
|
// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes memory) pure returns (bytes20).
|
||||||
|
@ -4,4 +4,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes32,uint8,bytes32,bytes32) pure returns (address)
|
// TypeError: (47-60): Member "gas" not found or not visible after argument-dependent lookup in function (bytes32,uint8,bytes32,bytes32) pure returns (address).
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (77-89): Member "balance" not found or not visible after argument-dependent lookup in contract C
|
// TypeError: (77-89): Member "balance" not found or not visible after argument-dependent lookup in contract C.
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (77-90): Member "transfer" not found or not visible after argument-dependent lookup in contract C
|
// TypeError: (77-90): Member "transfer" not found or not visible after argument-dependent lookup in contract C.
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (77-86): Member "send" not found or not visible after argument-dependent lookup in contract C
|
// TypeError: (77-86): Member "send" not found or not visible after argument-dependent lookup in contract C.
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (77-86): Member "call" not found or not visible after argument-dependent lookup in contract C
|
// TypeError: (77-86): Member "call" not found or not visible after argument-dependent lookup in contract C.
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (77-90): Member "callcode" not found or not visible after argument-dependent lookup in contract C
|
// TypeError: (77-90): Member "callcode" not found or not visible after argument-dependent lookup in contract C.
|
||||||
|
@ -5,4 +5,4 @@ contract C {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (77-94): Member "delegatecall" not found or not visible after argument-dependent lookup in contract C
|
// TypeError: (77-94): Member "delegatecall" not found or not visible after argument-dependent lookup in contract C.
|
||||||
|
@ -4,4 +4,4 @@ contract test {
|
|||||||
uint256 c = 4.e-2;
|
uint256 c = 4.e-2;
|
||||||
}
|
}
|
||||||
// ----
|
// ----
|
||||||
// TypeError: (70-73): Member "e" not found or not visible after argument-dependent lookup in int_const 4
|
// TypeError: (70-73): Member "e" not found or not visible after argument-dependent lookup in int_const 4.
|
||||||
|
Loading…
Reference in New Issue
Block a user