gopherdata / gopherdata/gophernotes
not a package: "n" in n.multiply <*ast.SelectorExpr>
Abierto
bug
- Lenguaje dominante
- Go
- Estrellas
- 4k
- Forks
- 264
- Merge medio
- 7 d 21 h
- PR fusionados (30 d)
- 1
Descripción
```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
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.