Skip to content

Commit e86066a

Browse files
compiler: add Type::message_name
As we move toward generics, the error messages need to be able to refer to types in a readable manner. Add that capability, and use it today in AST dumps. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/536716
1 parent 51f8ac3 commit e86066a

File tree

4 files changed

+375
-25
lines changed

4 files changed

+375
-25
lines changed

gcc/go/gofrontend/MERGE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
8c056e335cecec67d1d223a329b7ba4dac778a65
1+
1cb83a415e86ab4de0d436d277377d8fc060cb61
22

33
The first line of this file holds the git revision number of the last
44
merge done from the gofrontend repository.

gcc/go/gofrontend/ast-dump.cc

+1-8
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,7 @@ Ast_dump_context::dump_type(const Type* t)
223223
if (t == NULL)
224224
this->ostream() << "(nil type)";
225225
else
226-
// FIXME: write a type pretty printer instead of
227-
// using mangled names.
228-
if (this->gogo_ != NULL)
229-
{
230-
Backend_name bname;
231-
t->backend_name(this->gogo_, &bname);
232-
this->ostream() << "(" << bname.name() << ")";
233-
}
226+
this->ostream() << "(" << t->message_name() << ")";
234227
}
235228

236229
// Dump a textual representation of a block to the

0 commit comments

Comments
 (0)