| 576 | } |
| 577 | |
| 578 | func (s *selectScope) superType(sctx *super.Context, unknown *super.TypeError) super.Type { |
| 579 | fields := []super.Field{super.NewField("in", s.in.superType(sctx, unknown))} |
| 580 | if s.isGrouped() { |
| 581 | fields = append(fields, super.NewField("g", s.gType(sctx))) |
| 582 | } |
| 583 | if s.out != nil { |
| 584 | fields = append(fields, super.NewField("out", s.out.superType(sctx, unknown))) |
| 585 | } |
| 586 | return sctx.MustLookupTypeRecord(fields) |
| 587 | } |
| 588 | |
| 589 | func (s *selectScope) gType(sctx *super.Context) super.Type { |
| 590 | var fields []super.Field |