logoalt Hacker News

amiga386today at 9:34 AM1 replyview on HN

    ./prog.go:20:29: cannot specify promoted field name and enclosing embedded field Object
Which is what you get if you don't add a direct "name" field to Line, because it's then completely unambiguous, the deeper "name"s are not promotable.

Replies

pjmlptoday at 9:53 AM

Yeah, but that isn't what I am talking about.

The whole point is the implicit bug, when the field is added and initialisation code rewritten to take advantage of this feature, without the developer realising the clash in first place.

show 1 reply