mirror of
https://github.com/netbirdio/gomobile-tvos-fork.git
synced 2026-05-22 18:43:29 -07:00
bind: fallback to const.Value.String for pre go1.6
Fixes golang/go#14615 Change-Id: I75e130e5b7b2534660098907fa1f044390c01d01 Reviewed-on: https://go-review.googlesource.com/20164 Reviewed-by: Elias Naur <elias.naur@gmail.com>
This commit is contained in:
+1
-1
@@ -535,7 +535,7 @@ func (g *javaGen) genConst(o *types.Const) {
|
||||
// TODO(hyangah): should const names use upper cases + "_"?
|
||||
// TODO(hyangah): check invalid names.
|
||||
jType := g.javaType(o.Type())
|
||||
val := o.Val().ExactString()
|
||||
val := constExactString(o)
|
||||
switch b := o.Type().(*types.Basic); b.Kind() {
|
||||
case types.Int64, types.UntypedInt:
|
||||
i, exact := constant.Int64Val(o.Val())
|
||||
|
||||
Reference in New Issue
Block a user