-0c8c4fca4b52bc2323561a432436af5343e0f7b4
+312af623f48633989e9eb6e559ede84a23998ece
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
{
len_arg = *parg;
len_arg->determine_type(&int_context);
+ if (len_arg->type()->integer_type() == NULL)
+ {
+ go_error_at(len_arg->location(), "non-integer len argument in make");
+ return Expression::make_error(this->location());
+ }
if (!this->check_int_value(len_arg, true, &len_small))
return Expression::make_error(this->location());
++parg;
{
cap_arg = *parg;
cap_arg->determine_type(&int_context);
+ if (cap_arg->type()->integer_type() == NULL)
+ {
+ go_error_at(cap_arg->location(), "non-integer cap argument in make");
+ return Expression::make_error(this->location());
+ }
if (!this->check_int_value(cap_arg, false, &cap_small))
return Expression::make_error(this->location());
return Type::make_error_type();
case BUILTIN_NEW:
- case BUILTIN_MAKE:
{
const Expression_list* args = this->args();
if (args == NULL || args->empty())
return Type::make_pointer_type(args->front()->type());
}
+ case BUILTIN_MAKE:
+ {
+ const Expression_list* args = this->args();
+ if (args == NULL || args->empty())
+ return Type::make_error_type();
+ return args->front()->type();
+ }
+
case BUILTIN_CAP:
case BUILTIN_COPY:
case BUILTIN_LEN: