mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Properly use AST node name also for secondary location.
This commit is contained in:
parent
a4f2e591fe
commit
cf00faca33
@ -661,23 +661,21 @@ void OverrideChecker::overrideListError(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverrideChecker::overrideError(Declaration const& _overriding, Declaration const& _super, ErrorId _error, string const& _message, string const& _secondaryMsg)
|
void OverrideChecker::overrideError(
|
||||||
|
OverrideProxy const& _overriding,
|
||||||
|
OverrideProxy const& _super,
|
||||||
|
ErrorId _error,
|
||||||
|
string const& _message,
|
||||||
|
optional<string> const& _secondaryMsg
|
||||||
|
)
|
||||||
{
|
{
|
||||||
m_errorReporter.typeError(
|
m_errorReporter.typeError(
|
||||||
_error,
|
_error,
|
||||||
_overriding.location(),
|
_overriding.location(),
|
||||||
SecondarySourceLocation().append(_secondaryMsg, _super.location()),
|
SecondarySourceLocation().append(
|
||||||
_message
|
_secondaryMsg.value_or("Overridden " + _super.astNodeName() + " is here:"),
|
||||||
);
|
_super.location()
|
||||||
}
|
),
|
||||||
|
|
||||||
|
|
||||||
void OverrideChecker::overrideError(OverrideProxy const& _overriding, OverrideProxy const& _super, ErrorId _error, string const& _message, string const& _secondaryMsg)
|
|
||||||
{
|
|
||||||
m_errorReporter.typeError(
|
|
||||||
_error,
|
|
||||||
_overriding.location(),
|
|
||||||
SecondarySourceLocation().append(_secondaryMsg, _super.location()),
|
|
||||||
_message
|
_message
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -166,19 +166,12 @@ private:
|
|||||||
std::string const& _message1,
|
std::string const& _message1,
|
||||||
std::string const& _message2
|
std::string const& _message2
|
||||||
);
|
);
|
||||||
void overrideError(
|
|
||||||
Declaration const& _overriding,
|
|
||||||
Declaration const& _super,
|
|
||||||
langutil::ErrorId _error,
|
|
||||||
std::string const& _message,
|
|
||||||
std::string const& _secondaryMsg = "Overridden function is here:"
|
|
||||||
);
|
|
||||||
void overrideError(
|
void overrideError(
|
||||||
OverrideProxy const& _overriding,
|
OverrideProxy const& _overriding,
|
||||||
OverrideProxy const& _super,
|
OverrideProxy const& _super,
|
||||||
langutil::ErrorId _error,
|
langutil::ErrorId _error,
|
||||||
std::string const& _message,
|
std::string const& _message,
|
||||||
std::string const& _secondaryMsg = "Overridden function is here:"
|
std::optional<std::string> const& _secondaryMsg = {}
|
||||||
);
|
);
|
||||||
/// Checks for functions in different base contracts which conflict with each
|
/// Checks for functions in different base contracts which conflict with each
|
||||||
/// other and thus need to be overridden explicitly.
|
/// other and thus need to be overridden explicitly.
|
||||||
|
Loading…
Reference in New Issue
Block a user