Message ID | mcrtyfuyt9f.fsf@google.com |
---|---|
State | New |
Headers | show |
diff -r 50b98fea9d3b go/statements.cc --- a/go/statements.cc Wed Feb 23 19:52:03 2011 -0800 +++ b/go/statements.cc Wed Feb 23 19:58:43 2011 -0800 @@ -3911,7 +3911,11 @@ if (val_type->is_nil_type()) rhs = Expression::make_nil(loc); else - rhs = Expression::make_type_descriptor(val_type, loc); + { + if (val_type->is_abstract()) + val_type = val_type->make_non_abstract_type(); + rhs = Expression::make_type_descriptor(val_type, loc); + } Statement* s = Statement::make_assignment(lhs, rhs, loc); b->add_statement(s); }