Also remove lineno from typecheckdeftype since copytype was
the only user of it and typecheck uses lineno independently.
toolstach-check passed.
Updates #19683.
Change-Id: I1663fdb8cf519d505cc087c8657dcbff3c8b1a0a
Reviewed-on: https://go-review.googlesource.com/114875
Run-TryBot: Yury Smolsky <yury@smolsky.by>
Reviewed-by: Robert Griesemer <gri@golang.org>
}
// Double-check use of type as embedded type.
- lno := lineno
-
if embedlineno.IsKnown() {
- lineno = embedlineno
if t.IsPtr() || t.IsUnsafePtr() {
- yyerror("embedded type cannot be a pointer")
+ yyerrorl(embedlineno, "embedded type cannot be a pointer")
}
}
-
- lineno = lno
}
func typecheckdeftype(n *Node) {
- lno := lineno
- setlineno(n)
n.Type.Sym = n.Sym
n.SetTypecheck(1)
n.Name.Param.Ntype = typecheck(n.Name.Param.Ntype, Etype)
// that don't come along.
copytype(n, t)
}
-
- lineno = lno
}
func typecheckdef(n *Node) {