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

Comments

@gopherbot
Copy link

commented Jun 25, 2014

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

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2014

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

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2014

Comment 2:

Owner changed to @griesemer.

@gopherbot gopherbot added new labels Jun 26, 2014

@bradfitz bradfitz removed the new label Dec 18, 2014

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc removed release-none labels Apr 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.