- changed status to resolved
import package when required by type of simple declaration
Issue #10
resolved
A type of new variable declared with := may come from an unimported package. Import the package if the name is available. Example:
package pkgname
import "go/ast"
type Model float64
func (m Model) Observe(x []float64) float64 {
pos := ast.Ident{}.NamePos
pos = pos
return 0.
}
"go/token" must be imported to declare pos.
Comments (1)
-
reporter - Log in to comment
resolves issue
#10→ <<cset 6e382737efab>>