Skip to content

cmd/api: cannot analyse exported constants referring to unexported ones. #2906

@remyoudompheng

Description

@remyoudompheng
What steps will reproduce the problem?
1. add a package test with

package test

const a = 1
const A = a

2. run "go tool api test"

What is the expected output? What do you see instead?

Expected:
pkg test, const A ideal-int

Got:
2012/02/07 21:41:42 unknown kind in const "A" (*ast.Ident): can't resolve
existing constant "a"

The gccgo syscall package uses such things:

const O_APPEND = _O_APPEND

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions