1
0
mirror of https://github.com/golang/go synced 2024-11-06 00:36:14 -07:00
go/misc
Rémy Oudompheng 711ea1e716 cmd/cgo: simplify and fix handling of untyped constants
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.

Fixes #30527

Change-Id: I2120cd90e90a74b9d765eeec53f6a3d2cfc1b642
Reviewed-on: https://go-review.googlesource.com/c/go/+/164897
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-03-06 21:16:20 +00:00
..
android misc/android: use adb exec-out instead of adb shell to avoid buffering 2019-03-02 22:21:49 +00:00
arm
cgo cmd/cgo: simplify and fix handling of untyped constants 2019-03-06 21:16:20 +00:00
chrome/gophertool
ios misc/android,misc/ios: evaluate current working directory symlinks 2019-03-01 16:41:38 +00:00
linkcheck
nacl all: move cmd/internal/xcoff to internal/xcoff 2018-12-10 18:52:31 +00:00
swig
trace misc/trace: update trace_viewer_full.html 2018-04-26 20:26:23 +00:00
wasm misc/wasm: better adapt to different JavaScript environments 2019-03-03 17:55:52 +00:00
benchcmp
editors
go.mod misc: add go.mod file 2019-02-27 17:47:31 +00:00