mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Treat invalid external function type as a fatal error to prevent the type from being used
- `returnParameterTypesWithoutDynamicTypes()` assumes it won't encounter such types.
This commit is contained in:
@@ -721,7 +721,7 @@ void TypeChecker::endVisit(FunctionTypeName const& _funType)
|
||||
{
|
||||
solAssert(t->annotation().type, "Type not set for parameter.");
|
||||
if (!t->annotation().type->interfaceType(false).get())
|
||||
m_errorReporter.typeError(2582_error, t->location(), "Internal type cannot be used for external function type.");
|
||||
m_errorReporter.fatalTypeError(2582_error, t->location(), "Internal type cannot be used for external function type.");
|
||||
}
|
||||
solAssert(fun.interfaceType(false), "External function type uses internal types.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user