True if the bounds imply the subject is non-zero (e.g. `Im(x) > 0`).
(bounds: IntervalBounds)
| 1112 | def.value.type = new BoxedType(type, ce._typeResolver); |
| 1113 | // The type was explicitly asserted: it is no longer an inferred type |
| 1114 | // (so a subsequent bare-symbol inequality won't widen it to 'real') |
| 1115 | def.value.inferredType = false; |
| 1116 | recordAssumedType(ce, def.value, cause, previous); |
| 1117 | return 'ok'; |
| 1118 | } |
| 1119 | if (isOperatorDef(def)) { |
| 1120 | // `functionResult` yields `undefined` when the signature has no single |
| 1121 | // result type — an overload set (an intersection of signatures) is the |
| 1122 | // reachable case. The `!` that used to be here was a lie: `isSubtype` |
| 1123 | // dereferenced the `undefined` and threw a raw TypeError. |
| 1124 | // |
| 1125 | // "Cannot determine the result type" is not a proven contradiction, so |
| 1126 | // decline to claim one. |
| 1127 | const result = functionResult(def.operator.signature.type); |
| 1128 | if (result === undefined) return 'ok'; |
| 1129 | if (!isSubtype(type, result)) return 'contradiction'; |
| 1130 | return 'ok'; |
| 1131 | } |
no test coverage detected