gc: line number + type checking nits
Fixes #1910.
Fixes #1979.
Fixes #1990.
Fixes #1993.
Fixes #2089.
R=ken2
CC=golang-dev
https://golang.org/cl/4828046
diff --git a/src/cmd/gc/typecheck.c b/src/cmd/gc/typecheck.c
index 81b9dd2..78cdb5b 100644
--- a/src/cmd/gc/typecheck.c
+++ b/src/cmd/gc/typecheck.c
@@ -146,17 +146,18 @@
case OPACK:
break;
default:
+ lineno = lno;
return n;
}
}
if(n->typecheck == 2) {
yyerror("typechecking loop");
+ lineno = lno;
return n;
}
n->typecheck = 2;
- lno = setlineno(n);
if(n->sym) {
if(n->op == ONAME && n->etype != 0 && !(top & Ecall)) {
yyerror("use of builtin %S not in function call", n->sym);