Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go2go: unclear error message for type parameter #40047
Fails to compile with:
Presumably there is an unresolvable ambiguity (though honestly I haven't figured out what it is yet). An extra pair of parentheses makes it work:
Assuming this is working as intended, a clearer error message would be nice.
@crawshaw The problem here is that
Now, in "type context", we know that it cannot be a conversion and we can do the right thing. For instance,
Arguably, in the
This, and many other problems would go away if our keyboards had one more style of easily accessible parentheses...
Thanks for the detailed explanation. That is indeed a sticky situation.
It seems unlikely I have any novel thoughts about syntax given the effort you have put into this, but I would point out that the Go spec has some unused characters that could be used to prefix type parentheses: