Interface embedding

Interface embedding in Go enables structs to inherit fields and methods from other types for efficient code composition.

Interface embedding in Go allows a struct to inherit the fields and methods of another type by declaring it as an anonymous field, enabling code reuse and composition. In the Go compiler's IR, types like miniExpr embed miniNode to automatically gain common fields like pos, op, and bits without redefining them.

type miniExpr struct {
    miniNode // Embedded type inherits fields
    flags    bitset8
    typ      *types.Type
    init     Nodes
}