Return one of types (expanded) if it is a supertype of other, otherwise top type.
(s: Type, t: Type)
| 195 | |
| 196 | |
| 197 | def trivial_join(s: Type, t: Type) -> Type: |
| 198 | """Return one of types (expanded) if it is a supertype of other, otherwise top type.""" |
| 199 | if is_subtype(s, t): |
| 200 | return t |
| 201 | elif is_subtype(t, s): |
| 202 | return s |
| 203 | else: |
| 204 | return object_or_any_from_type(get_proper_type(t)) |
| 205 | |
| 206 | |
| 207 | @overload |
no test coverage detected
searching dependent graphs…