We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ffcf25 commit fed7ffaCopy full SHA for fed7ffa
src/compiler.ts
@@ -4150,7 +4150,7 @@ export class Compiler extends DiagnosticEmitter {
4150
rightExpr = this.compileExpression(right, leftType);
4151
rightType = this.currentType;
4152
commonType = Type.commonType(leftType, rightType, contextualType);
4153
- if (!commonType || !leftType.isNumericValue) {
+ if (!commonType || !commonType.isNumericValue) {
4154
this.error(
4155
DiagnosticCode.Operator_0_cannot_be_applied_to_types_1_and_2,
4156
expression.range, "-", leftType.toString(), rightType.toString()
0 commit comments