Skip to content

Commit e7a7710

Browse files
committed
fixed
1 parent fd226b1 commit e7a7710

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func (r *astParser) ParserDecl(decl ast.Decl) {
107107
}
108108

109109
tt := r.EvalType(s.Type)
110-
if s.Assign == 0 {
110+
if s.Assign == 0 && tt.Kind() != Interface {
111111
tt = newTypeNamed(s.Name.Name, tt, r)
112112
} else {
113113
tt = newTypeAlias(s.Name.Name, tt)

types_alias.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ type typeAlias struct {
1515
func (t *typeAlias) Name() string {
1616
return t.name
1717
}
18+
19+
func (t *typeAlias) String() string {
20+
return t.name
21+
}

0 commit comments

Comments
 (0)