Commit 8da1c70b by Ian Lance Taylor

Permit new of a function type.

From-SVN: r173672
parent 2d8f63a1
...@@ -10624,9 +10624,6 @@ class Allocation_expression : public Expression ...@@ -10624,9 +10624,6 @@ class Allocation_expression : public Expression
do_determine_type(const Type_context*) do_determine_type(const Type_context*)
{ } { }
void
do_check_types(Gogo*);
Expression* Expression*
do_copy() do_copy()
{ return new Allocation_expression(this->type_, this->location()); } { return new Allocation_expression(this->type_, this->location()); }
...@@ -10639,15 +10636,6 @@ class Allocation_expression : public Expression ...@@ -10639,15 +10636,6 @@ class Allocation_expression : public Expression
Type* type_; Type* type_;
}; };
// Check the type of an allocation expression.
void
Allocation_expression::do_check_types(Gogo*)
{
if (this->type_->function_type() != NULL)
this->report_error(_("invalid new of function type"));
}
// Return a tree for an allocation expression. // Return a tree for an allocation expression.
tree tree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment