Disallow variable declaration with inferred empty tuple type.

This commit is contained in:
chriseth
2017-03-02 14:33:58 +01:00
parent 2600fa0413
commit cc01d870ff
+5
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