Add entity.FormatType()
This commit is contained in:
parent
7d2f435d18
commit
cb3e5b6bfb
|
@ -208,3 +208,13 @@ func TypesEqual (left, right Type) bool {
|
|||
if left == nil { return true }
|
||||
return left.Equals(right)
|
||||
}
|
||||
|
||||
// FormatType returns a string representing a type. If the type is nil, it
|
||||
// returns "Void".
|
||||
func FormatType (ty Type) string {
|
||||
if ty == nil {
|
||||
return "Void"
|
||||
} else {
|
||||
return ty.String()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue