(args []super.Value)
| 44 | } |
| 45 | |
| 46 | func (t *typeName) Call(args []super.Value) super.Value { |
| 47 | if super.TypeUnder(args[0].Type()) != super.TypeString { |
| 48 | return t.sctx.WrapError("typename: argument must be a string", args[0]) |
| 49 | } |
| 50 | name := string(args[0].Bytes()) |
| 51 | typ := t.sctx.LookupTypeDef(name) |
| 52 | if typ == nil { |
| 53 | return t.sctx.Missing() |
| 54 | } |
| 55 | return t.sctx.LookupTypeValue(typ) |
| 56 | } |
| 57 | |
| 58 | type Error struct { |
| 59 | sctx *super.Context |
nothing calls this directly
no test coverage detected