IsComplete returns true if the type and all its arguments have non-variable exemplars.
(t Type)
| 218 | |
| 219 | // IsComplete returns true if the type and all its arguments have non-variable exemplars. |
| 220 | func IsComplete(t Type) bool { |
| 221 | switch v := t.Root().(type) { |
| 222 | case *Variable: |
| 223 | return false |
| 224 | case *Operator: |
| 225 | for _, a := range v.Args { |
| 226 | if !IsComplete(a) { |
| 227 | return false |
| 228 | } |
| 229 | } |
| 230 | return true |
| 231 | } |
| 232 | return false |
| 233 | } |
| 234 | |
| 235 | // Builtin type constants. |
| 236 | var ( |
no test coverage detected