Instead of trying to guess type of constants in the AST,
which is hard, use the "var cgo%d Type = Constant"
so that typechecking is left to the Go compiler.
The previous code could still fail in some cases
for constants imported from other modules
or defined in other, non-cgo files.
Run-TryBot: Emmanuel Odeke <firstname.lastname@example.org>
TryBot-Result: Gobot Gobot <email@example.com>
Reviewed-by: Ian Lance Taylor <firstname.lastname@example.org>
(cherry picked from commit 711ea1e)
Run-TryBot: Ian Lance Taylor <email@example.com>
Reviewed-by: Emmanuel Odeke <firstname.lastname@example.org>
Reviewed-by: Brad Fitzpatrick <email@example.com>