Disallow variable declaration with inferred empty tuple type.

This commit is contained in:
chriseth 2017-03-01 15:42:53 +01:00
parent 2600fa0413
commit cc01d870ff

View File

@ -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