gopherdata / gopherdata/gophernotes
not a package: "n" in n.multiply <*ast.SelectorExpr>
Aperta
bug
- Lingua principale
- Go
- Stelle
- 4k
- Fork
- 264
- Merge medio
- 7g 21h
- PR unite (30g)
- 1
Descrizione
```go
type Node struct {
value int
next *Node
}
func (n Node) multiply(x int) int {
return n.value * x
}
n := Node{2, nil}
n.multiply(3)
```
repl.go:11:1: not a package: "n" in n.multiply <*ast.SelectorExpr>
However, this works:
```go
type Node struct {
value int
}
func (n Node) multiply(x int) int {
return n.value * x
}
n := Node{2}
n.multiply(3)
```
Versions:
- go version go1.19.2 linux/amd64
- gophernotes@v0.7.5
Related to #240
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.