Closed sbinet closed 6 years ago
the following fails in ng:
ng
$> cat t-hplot.ng import "go-hep.org/x/hep/hplot" p := hplot.New() p.Title.Text = "hello" printf("title=%q\n", p.Plot.Title.Text) $> ng ./t-hplot.ng ng: typecheck: p.Title undefined (type struct { Plot *Plot Style Style } has no field or method Title) title=""
hplot.Plot embeds gonum/v1/plot.Plot:
hplot.Plot
gonum/v1/plot.Plot
type Plot struct { *plot.Plot Style Style }
but we still need to explicitly mention p.Plot.Title to access that field (although this works for embedded types defined directly from ng.)
p.Plot.Title
the following fails in
ng
:hplot.Plot
embedsgonum/v1/plot.Plot
:but we still need to explicitly mention
p.Plot.Title
to access that field (although this works for embedded types defined directly fromng
.)