summaryrefslogtreecommitdiff
path: root/src/cmd/gc/subr.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-04-20 15:44:41 +0200
committerOndřej Surý <ondrej@sury.org>2011-04-20 15:44:41 +0200
commit50104cc32a498f7517a51c8dc93106c51c7a54b4 (patch)
tree47af80be259cc7c45d0eaec7d42e61fa38c8e4fb /src/cmd/gc/subr.c
parentc072558b90f1bbedc2022b0f30c8b1ac4712538e (diff)
downloadgolang-upstream/2011.03.07.1.tar.gz
Imported Upstream version 2011.03.07.1upstream/2011.03.07.1
Diffstat (limited to 'src/cmd/gc/subr.c')
-rw-r--r--src/cmd/gc/subr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cmd/gc/subr.c b/src/cmd/gc/subr.c
index 0755ca3cd..142e5ba41 100644
--- a/src/cmd/gc/subr.c
+++ b/src/cmd/gc/subr.c
@@ -203,7 +203,6 @@ fatal(char *fmt, ...)
flusherrors();
-*(int*)0=0;
print("%L: internal compiler error: ", lineno);
va_start(arg, fmt);
vfprint(1, fmt, arg);
@@ -1909,8 +1908,12 @@ assignop(Type *src, Type *dst, char **why)
return 0;
}
if(src->etype == TINTER && dst->etype != TBLANK) {
- if(why != nil)
- *why = ": need type assertion";
+ if(why != nil) {
+ if(isptrto(dst, TINTER))
+ *why = smprint(":\n\t%T is interface, not pointer to interface", src);
+ else
+ *why = ": need type assertion";
+ }
return 0;
}
@@ -2265,7 +2268,7 @@ syslook(char *name, int copy)
s = pkglookup(name, runtimepkg);
if(s == S || s->def == N)
- fatal("looksys: cant find runtime.%s", name);
+ fatal("syslook: can't find runtime.%s", name);
if(!copy)
return s->def;