mirror of
https://github.com/golang/go
synced 2024-11-17 22:24:47 -07:00
9536480edc
Always process the DWARF info, even when the const value is determined using the debug data block. This ensures that the injected enum is removed and future loads of the same constant do not trigger inconsistent definitions. Add tests for issues 2470 and 4054. Fixes #4054. R=golang-dev, fullung, dave, rsc, minux.ma CC=golang-dev https://golang.org/cl/6501101
24 lines
341 B
Go
24 lines
341 B
Go
// Copyright 2012 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package cgotest
|
|
|
|
/*
|
|
typedef enum {
|
|
A = 0,
|
|
B,
|
|
C,
|
|
D,
|
|
E,
|
|
F,
|
|
G,
|
|
H,
|
|
I,
|
|
J,
|
|
} issue4054a;
|
|
*/
|
|
import "C"
|
|
|
|
var issue4054a = []int{C.A, C.B, C.C, C.D, C.E, C.F, C.G, C.H, C.I, C.J}
|