summaryrefslogtreecommitdiff
path: root/src/cmd/gc/subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gc/subr.c')
-rw-r--r--src/cmd/gc/subr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c
index e180258bb..e1fb97d62 100644
--- a/src/cmd/gc/subr.c
+++ b/src/cmd/gc/subr.c
@@ -2140,6 +2140,14 @@ loop:
print(" %lT\n", tl);
if(tr != T)
print(" %lT\n", tr);
+
+ // common mistake: *struct and *interface.
+ if(tl && tr && isptr[tl->etype] && isptr[tr->etype]) {
+ if(tl->type->etype == TSTRUCT && tr->type->etype == TINTER)
+ print(" (*struct vs *interface)\n");
+ else if(tl->type->etype == TINTER && tr->type->etype == TSTRUCT)
+ print(" (*interface vs *struct)\n");
+ }
}
/*