mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow variable declaration with inferred empty tuple type.
This commit is contained in:
parent
2600fa0413
commit
cc01d870ff
@ -824,6 +824,11 @@ bool TypeChecker::visit(VariableDeclarationStatement const& _statement)
|
||||
else
|
||||
solAssert(false, "");
|
||||
}
|
||||
else if (*var.annotation().type == TupleType())
|
||||
typeError(
|
||||
var.location(),
|
||||
"Cannot declare variable with void (empty tuple) type."
|
||||
);
|
||||
var.accept(*this);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user