x/text: gotext nil dereferences when a const declaration is in another file #60555
Labels
help wanted
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
login.go
register.go
Then I called gotext via
gotext -srclang=en-US update -out=catalog.go -lang=en-US,hu-HU {package name}
I get the following panic:
As far as I understand it seems to happen because in
extract.go
ident.Obj is nil when extracting messages from register.go, since the the declaration is in the other file (according to #48141).Indeed modifying the relevant code to something like:
apparently fixes the problem.
What did you expect to see?
No panic.
What did you see instead?
A panic.
The text was updated successfully, but these errors were encountered: