Introduce FunctionKind::Declaration and allow accessing function signatures via contract name.

This commit is contained in:
Daniel Kirchner
2020-01-09 15:40:41 +01:00
parent 17158995b5
commit 9535c0f520
18 changed files with 202 additions and 34 deletions
+10
View File
@@ -1691,6 +1691,16 @@ void TypeChecker::typeCheckFunctionCall(
solAssert(!!_functionType, "");
solAssert(_functionType->kind() != FunctionType::Kind::ABIDecode, "");
if (_functionType->kind() == FunctionType::Kind::Declaration)
{
m_errorReporter.typeError(
_functionCall.location(),
"Cannot call function via contract name."
);
return;
}
// Check for unsupported use of bare static call
if (
_functionType->kind() == FunctionType::Kind::BareStaticCall &&