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

an issue in GO programming language spec #743

Closed
gopherbot opened this issue Apr 23, 2010 · 2 comments
Closed

an issue in GO programming language spec #743

gopherbot opened this issue Apr 23, 2010 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by unix.sh:

The follow is from GO programming lanugage spec:

//spec starts

Type declarations
...
// A Mutex is a data type with two methods Lock and Unlock.
type Mutex struct         { /* Mutex fields */ }
func (m *Mutex) Lock()    { /* Lock implementation */ }
func (m *Mutex) Unlock()  { /* Unlock implementation */ }

// NewMutex has the same composition as Mutex but its method set is empty.
type NewMutex Mutex

// PrintableMutex's method set contains the methods
// Lock and Unlock bound to its anonymous field Mutex.
type PrintableMutex struct {
        Mutex
}

//spec ends

I think the method set in anonymous field Mutex of PrintableMutex doesn't
have two methods: Lock and Unlock, only *Mutex does(the receiver is of *T).
So the comments of PrintableMutex are wrong. It should be *Mutex instead.
@rsc
Copy link
Contributor

rsc commented Apr 26, 2010

Comment 1:

Owner changed to g...@golang.org.

Status changed to Accepted.

@griesemer
Copy link
Contributor

Comment 2:

This issue was closed by revision f5b3c14.

Status changed to Fixed.

@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
Development

No branches or pull requests

3 participants