#Struct embedding throws NPE
1 messages · Page 1 of 1 (latest)
Here's a minimal repro
package main
type Embed struct {
Name string
}
func New(
// +optional
// +default="nipuna"
name string,
) *Embed {
return &Embed{
Name: name,
}
}
type Second struct {
*Embed
}
func (e *Embed) GetSeconds() *Second {
return &Second{e}
}
func (s *Second) PrintName() string {
return s.Name
}
Ah there's an open issue for this https://github.com/dagger/dagger/issues/6662
I think what I'm seeing is slightly different. Are embedded fields supposed to work?
Ah I'm on mobile so can't repro, but I expect this is related
If you could chuck your repro into the issue, I'll make sure to try and fix as part of the one I have in the works
(embedded fields should work, but for some reason they don't always seem to)
I am on mobile too so I'll put it there when I get back 🙂