Under resolves named types and untags unions repeatedly, returning a value guaranteed not to have a fusion type, named type or union type.
()
| 451 | // Under resolves named types and untags unions repeatedly, returning a value |
| 452 | // guaranteed not to have a fusion type, named type or union type. |
| 453 | func (v Value) Under() Value { |
| 454 | switch v.Type().(type) { |
| 455 | case *TypeUnion, *TypeNamed, *TypeFusion: |
| 456 | return v.under() |
| 457 | } |
| 458 | // This is the common case; make sure the compiler can inline it. |
| 459 | return v |
| 460 | } |
| 461 | |
| 462 | // under contains logic for Under that the compiler won't inline. |
| 463 | func (v Value) under() Value { |