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

Not all blocks are parsed #52

Closed
bombsimon opened this issue Oct 25, 2019 · 1 comment · Fixed by #55
Closed

Not all blocks are parsed #52

bombsimon opened this issue Oct 25, 2019 · 1 comment · Fixed by #55
Labels
bug Something isn't working enhancement New feature or request

Comments

@bombsimon
Copy link
Owner

Must be more generous about when to enter a block and parse it.

Gives no error but should

var foo string

func() {
    var err error
    foo = "1"
}

Gives error if assigned to variable

var foo string

x := func() {
    var err error
    foo = "1"
}

assignments should only be cuddled with other assignments

Also this gives no error, assignign or not:

var err error
foo, err = func() { return "", nil }
@bombsimon bombsimon added bug Something isn't working enhancement New feature or request labels Oct 25, 2019
@bombsimon
Copy link
Owner Author

I think the last statement is actually OK. It doesn't yield an error because err is used in the assignment on the second line and I think that is actually ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant