TranslateType takes a type from another context and creates and returns that type in this context.
(ext Type)
| 393 | // TranslateType takes a type from another context and creates and returns that |
| 394 | // type in this context. |
| 395 | func (c *Context) TranslateType(ext Type) (Type, error) { |
| 396 | return c.LookupByValue(EncodeTypeValue(ext)) |
| 397 | } |
| 398 | |
| 399 | func (c *Context) enterWithLock(typ Type) { |
| 400 | c.byID = append(c.byID, typ) |