Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved reference on slice objects #1837

Closed
vburenin opened this issue Aug 30, 2015 · 1 comment
Closed

Unresolved reference on slice objects #1837

vburenin opened this issue Aug 30, 2015 · 1 comment
Assignees
Milestone

Comments

@vburenin
Copy link

Recently I started seeing this issue:

screen shot 2015-08-30 at 1 40 27 pm

It happens with arrays/slices defined as a different type. You can see it happens to SomeId struct member.

type TestStruct struct {
    SomeId int
}

type DataSlice []*TestStruct

func NewDataSlice() *DataSlice {
    return &DataSlice{}
}

func ErrorCode() {
    data := NewDataSlice()
    for _, element := range data {
        if element.SomeId > 20 {
            println("some text")
        }
    }
}

Environment:
➜ ~ uname -a
Darwin domain.com 14.5.0 Darwin Kernel Version 14.5.0: Wed Jul 29 02:26:53 PDT 2015; root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64
screen shot 2015-08-30 at 2 30 26 pm
screen shot 2015-08-30 at 2 29 49 pm

Go: 1.5 and 1.4.2.

@dlsniper dlsniper added this to the 1.0.0 milestone Aug 30, 2015
@dlsniper
Copy link
Member

I can replicate this for commit: c3eb6cd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants