| 232 | } |
| 233 | |
| 234 | func objRecursive() *expr.UserTypeExpr { |
| 235 | res := &expr.UserTypeExpr{ |
| 236 | AttributeExpr: &expr.AttributeExpr{ |
| 237 | Type: &expr.Object{ |
| 238 | {Name: "Foo", Attribute: &expr.AttributeExpr{Type: expr.String}}, |
| 239 | {Name: "Bar", Attribute: &expr.AttributeExpr{Type: expr.Int}}, |
| 240 | }, |
| 241 | }, |
| 242 | TypeName: "objRecursiveT", |
| 243 | } |
| 244 | obj := res.Type.(*expr.Object) |
| 245 | *obj = append(*obj, &expr.NamedAttributeExpr{ |
| 246 | Name: "Rec", |
| 247 | Attribute: &expr.AttributeExpr{Type: res}}) |
| 248 | |
| 249 | return res |
| 250 | } |
| 251 | |
| 252 | type objT struct { |
| 253 | Foo string |