(t Type)
| 35 | } |
| 36 | |
| 37 | func NewPrimitiveTypeWithType(t Type) Type { |
| 38 | declareFunctionType, ok := t.(*DeclareFunctionType) |
| 39 | if ok { |
| 40 | returnType := declareFunctionType.GetReturnType() |
| 41 | if returnType != nil { |
| 42 | return NewPrimitiveType(returnType.GetName(), returnType.IsArray()) |
| 43 | } else { |
| 44 | return NewPrimitiveType(t.GetName(), t.IsArray()) |
| 45 | } |
| 46 | } else { |
| 47 | return t |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | func (b *PrimitiveType) GetName() string { |
| 52 | return b.name |
no test coverage detected