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

fix: parenthesized expression as receiver #78

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Conversation

ldez
Copy link
Contributor

@ldez ldez commented Apr 20, 2024

Fixes #77

Copy link
Owner

@mvdan mvdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I went nearly ten years writing Go without really noticing that this was possible. From reading the spec, it seems like multiple parentheses are possible too, but I guess noone really does that in practice.

@mvdan mvdan merged commit 063aff9 into mvdan:master Apr 27, 2024
6 checks passed
@ldez ldez deleted the fix/parenExpr branch April 28, 2024 01:58
@ldez
Copy link
Contributor Author

ldez commented Apr 28, 2024

Me too, it's my first time seeing that and it's unexpected as a syntax, I'm still looking for a real use-case for this.

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

Successfully merging this pull request may close these issues.

panic: unexpected receiver AST node: *ast.ParenExpr
2 participants