for _, prefix := range cgoPrefixes {
// cgo objects are part of the current package (in file
// _cgo_gotypes.go). Use regular lookup.
- _, exp = check.scope.LookupParent(prefix+sel, check.pos)
+ exp = check.lookup(prefix + sel)
if exp != nil {
break
}
var v *Var
var v_used bool
if lhs {
- if _, obj := check.scope.LookupParent(n.Value, nopos); obj != nil {
+ if obj := check.lookup(n.Value); obj != nil {
// It's ok to mark non-local variables, but ignore variables
// from other packages to avoid potential race conditions with
// dot-imported variables.
for _, prefix := range cgoPrefixes {
// cgo objects are part of the current package (in file
// _cgo_gotypes.go). Use regular lookup.
- _, exp = check.scope.LookupParent(prefix+sel, check.pos)
+ exp = check.lookup(prefix + sel)
if exp != nil {
break
}
var v *Var
var v_used bool
if lhs {
- if _, obj := check.scope.LookupParent(n.Name, nopos); obj != nil {
+ if obj := check.lookup(n.Name); obj != nil {
// It's ok to mark non-local variables, but ignore variables
// from other packages to avoid potential race conditions with
// dot-imported variables.