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

spec: unspecified or unclear behavior for arithmetic operators on named types #8289

Open
gopherbot opened this issue Jun 25, 2014 · 2 comments
Milestone

Comments

@gopherbot
Copy link

by arnaud.porterie:

It seems that the following code is not fully specified:

  type MyType int
  [...]
  var m MyType
  m += 0

I understand that 0 being an untype constant, it can be used in a binary operation with
a `MyType` operand. However, I cannot find what specifies that binary operations can be
used on operands of type `MyType` ("Arithmetic operators" paragraph isn't
really clear on that).
@ianlancetaylor
Copy link
Contributor

Comment 1:

To be honest, I think the current spec is pretty clear.  But I'll leave this for Robert.

Labels changed: added repo-main, release-none.

@griesemer
Copy link
Contributor

Comment 2:

Owner changed to @griesemer.

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
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

No branches or pull requests

5 participants