1
0
mirror of https://github.com/golang/go synced 2024-11-26 22:01:27 -07:00
go/misc/cgo/test/issue28772.go
Ian Lance Taylor 4f26f24d2a cmd/cgo: recognize untyped constants defined in different files
An untyped constant can be defined in any input file, we shouldn't
segregate them by file.

Updates #28772

Change-Id: I0347f15236833bb511eb49f86c449ee9241b0a25
Reviewed-on: https://go-review.googlesource.com/c/151600
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-11-29 01:29:56 +00:00

13 lines
335 B
Go

// Copyright 2018 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
// Constants didn't work if defined in different source file.
// #define issue28772Constant2 2
import "C"
const issue28772Constant2 = C.issue28772Constant2