mirror of
https://github.com/golang/go
synced 2024-11-20 04:24:51 -07:00
cmd/compile: fix internal consistency check with binary exporter
Per feedback from mdempsky from https://go-review.googlesource.com/22096. Also fix emitted position info. Change-Id: I7ff1967430867d922be8784832042c75d81df28b Reviewed-on: https://go-review.googlesource.com/22198 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
262814467e
commit
a5386f3c7d
@ -558,16 +558,13 @@ func (p *exporter) typ(t *Type) {
|
|||||||
Fatalf("exporter: predeclared type missing from type map?")
|
Fatalf("exporter: predeclared type missing from type map?")
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(gri) The assertion below is incorrect (crashes during all.bash),
|
n := typenod(t)
|
||||||
// likely because of symbol shadowing (we expect the respective definition
|
if n.Type != t {
|
||||||
// to point to us). Determine the correct Def so we get correct position
|
Fatalf("exporter: named type definition incorrectly set up")
|
||||||
// info.
|
}
|
||||||
// if tsym.Def.Type != t {
|
|
||||||
// Fatalf("exporter: type definition doesn't point to us?")
|
|
||||||
// }
|
|
||||||
|
|
||||||
p.tag(namedTag)
|
p.tag(namedTag)
|
||||||
p.pos(tsym.Def) // TODO(gri) this may not be the correct node - fix and add tests
|
p.pos(n)
|
||||||
p.qualifiedName(tsym)
|
p.qualifiedName(tsym)
|
||||||
|
|
||||||
// write underlying type
|
// write underlying type
|
||||||
|
Loading…
Reference in New Issue
Block a user