compiler: don't set btype_ too early for alias type

CL 123362 introduced a bug in creating alias type's backend
representation. A type's btype_ should not be set before
named types are converted if it is a placeholder. For alias
type, it is set too early. This may result in unresolved
placeholders. This CL fixes it.

Change-Id: Icf85677c2f25160423f6bf0dfbb9e49b1a322233
Reviewed-on: https://go-review.googlesource.com/123975
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/go/types.cc b/go/types.cc
index fa8c0ad..2fb6706 100644
--- a/go/types.cc
+++ b/go/types.cc
@@ -992,8 +992,10 @@
     return this->btype_;
 
   if (this->named_type() != NULL && this->named_type()->is_alias()) {
-    this->btype_ = this->unalias()->get_backend(gogo);
-    return this->btype_;
+    Btype* bt = this->unalias()->get_backend(gogo);
+    if (gogo != NULL && gogo->named_types_are_converted())
+      this->btype_ = bt;
+    return bt;
   }
 
   if (this->forward_declaration_type() != NULL