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

go/types: missing error for incorrect [...]array #45651

Closed
griesemer opened this issue Apr 20, 2021 · 2 comments
Closed

go/types: missing error for incorrect [...]array #45651

griesemer opened this issue Apr 20, 2021 · 2 comments

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Apr 20, 2021

There appears to be no error for:

package p
var _ = [...]byte("foo")

See also #42987.

@findleyr
Copy link
Contributor

@findleyr findleyr commented Apr 20, 2021

I do see an error for this exact source:

> go test -run=Fixedbugs/45651.src
--- FAIL: TestFixedbugs (0.00s)
    --- FAIL: TestFixedbugs/issue45651.src (0.00s)
        check_test.go:187: fixedbugs/issue45651.src:2:10: no error expected: "expected array length, found '...'"
> cat fixedbugs/issue45651.src 
package p
var _ = [...]byte("foo")

Loading

@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Apr 20, 2021

My apologies. Tests are run a bit differently with go/types than types2. Confirmed that the error is reported.

Loading

@griesemer griesemer closed this Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants