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/parser: (x.(type)) is not a valid type switch guard #4471

Closed
griesemer opened this issue Nov 30, 2012 · 1 comment
Closed

go/parser: (x.(type)) is not a valid type switch guard #4471

griesemer opened this issue Nov 30, 2012 · 1 comment
Assignees
Milestone

Comments

@griesemer
Copy link
Contributor

@griesemer griesemer commented Nov 30, 2012

The parser appears to accept (x.(type)) as a type switch guard. Investigate.
See also issue #4470.
@griesemer
Copy link
Contributor Author

@griesemer griesemer commented Dec 4, 2012

Comment 1:

The parser should continue to accept
switch (x.(type)) { ... }
in a type switch for now so that incorrect code is correctly rewritten by gofmt. The
form:
switch t := (x.(type)) { ... }
was never accepted, so leave it alone.
See CL 6867062 for a test case.

Status changed to WorkingAsIntended.

@griesemer griesemer self-assigned this Dec 4, 2012
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.