mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
update baselines
This commit is contained in:
parent
ef9f4043c4
commit
1a41ebf542
@ -0,0 +1,58 @@
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts(5,1): error TS2365: Operator '>' cannot be applied to types 'BrandedNum' and '0'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts(10,1): error TS2365: Operator '<' cannot be applied to types 'BrandedNum' and '0'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts(15,1): error TS2365: Operator '>=' cannot be applied to types 'BrandedNum' and '0'.
|
||||
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts(20,1): error TS2365: Operator '<=' cannot be applied to types 'BrandedNum' and '0'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithNumericLiteral.ts (4 errors) ====
|
||||
type BrandedNum = number & { __numberBrand: any };
|
||||
var x : BrandedNum;
|
||||
|
||||
// operator >
|
||||
x > 0;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '>' cannot be applied to types 'BrandedNum' and '0'.
|
||||
x > <number>0;
|
||||
x > <BrandedNum>0;
|
||||
|
||||
// operator <
|
||||
x < 0;
|
||||
~~~~~
|
||||
!!! error TS2365: Operator '<' cannot be applied to types 'BrandedNum' and '0'.
|
||||
x < <number>0;
|
||||
x < <BrandedNum>0;
|
||||
|
||||
// operator >=
|
||||
x >= 0;
|
||||
~~~~~~
|
||||
!!! error TS2365: Operator '>=' cannot be applied to types 'BrandedNum' and '0'.
|
||||
x >= <number>0;
|
||||
x >= <BrandedNum>0;
|
||||
|
||||
// operator <=
|
||||
x <= 0;
|
||||
~~~~~~
|
||||
!!! error TS2365: Operator '<=' cannot be applied to types 'BrandedNum' and '0'.
|
||||
x <= <number>0;
|
||||
x <= <BrandedNum>0;
|
||||
|
||||
// operator ==
|
||||
x == 0;
|
||||
x == <number>0;
|
||||
x == <BrandedNum>0;
|
||||
|
||||
// operator !=
|
||||
x != 0;
|
||||
x != <number>0;
|
||||
x != <BrandedNum>0;
|
||||
|
||||
// operator ===
|
||||
x === 0;
|
||||
x === <number>0;
|
||||
x === <BrandedNum>0;
|
||||
|
||||
// operator !==
|
||||
x !== 0;
|
||||
x !== <number>0;
|
||||
x !== <BrandedNum>0;
|
||||
|
||||
@ -0,0 +1,79 @@
|
||||
//// [comparisonOperatorWithNumericLiteral.ts]
|
||||
type BrandedNum = number & { __numberBrand: any };
|
||||
var x : BrandedNum;
|
||||
|
||||
// operator >
|
||||
x > 0;
|
||||
x > <number>0;
|
||||
x > <BrandedNum>0;
|
||||
|
||||
// operator <
|
||||
x < 0;
|
||||
x < <number>0;
|
||||
x < <BrandedNum>0;
|
||||
|
||||
// operator >=
|
||||
x >= 0;
|
||||
x >= <number>0;
|
||||
x >= <BrandedNum>0;
|
||||
|
||||
// operator <=
|
||||
x <= 0;
|
||||
x <= <number>0;
|
||||
x <= <BrandedNum>0;
|
||||
|
||||
// operator ==
|
||||
x == 0;
|
||||
x == <number>0;
|
||||
x == <BrandedNum>0;
|
||||
|
||||
// operator !=
|
||||
x != 0;
|
||||
x != <number>0;
|
||||
x != <BrandedNum>0;
|
||||
|
||||
// operator ===
|
||||
x === 0;
|
||||
x === <number>0;
|
||||
x === <BrandedNum>0;
|
||||
|
||||
// operator !==
|
||||
x !== 0;
|
||||
x !== <number>0;
|
||||
x !== <BrandedNum>0;
|
||||
|
||||
|
||||
//// [comparisonOperatorWithNumericLiteral.js]
|
||||
var x;
|
||||
// operator >
|
||||
x > 0;
|
||||
x > 0;
|
||||
x > 0;
|
||||
// operator <
|
||||
x < 0;
|
||||
x < 0;
|
||||
x < 0;
|
||||
// operator >=
|
||||
x >= 0;
|
||||
x >= 0;
|
||||
x >= 0;
|
||||
// operator <=
|
||||
x <= 0;
|
||||
x <= 0;
|
||||
x <= 0;
|
||||
// operator ==
|
||||
x == 0;
|
||||
x == 0;
|
||||
x == 0;
|
||||
// operator !=
|
||||
x != 0;
|
||||
x != 0;
|
||||
x != 0;
|
||||
// operator ===
|
||||
x === 0;
|
||||
x === 0;
|
||||
x === 0;
|
||||
// operator !==
|
||||
x !== 0;
|
||||
x !== 0;
|
||||
x !== 0;
|
||||
@ -0,0 +1,42 @@
|
||||
type BrandedNum = number & { __numberBrand: any };
|
||||
var x : BrandedNum;
|
||||
|
||||
// operator >
|
||||
x > 0;
|
||||
x > <number>0;
|
||||
x > <BrandedNum>0;
|
||||
|
||||
// operator <
|
||||
x < 0;
|
||||
x < <number>0;
|
||||
x < <BrandedNum>0;
|
||||
|
||||
// operator >=
|
||||
x >= 0;
|
||||
x >= <number>0;
|
||||
x >= <BrandedNum>0;
|
||||
|
||||
// operator <=
|
||||
x <= 0;
|
||||
x <= <number>0;
|
||||
x <= <BrandedNum>0;
|
||||
|
||||
// operator ==
|
||||
x == 0;
|
||||
x == <number>0;
|
||||
x == <BrandedNum>0;
|
||||
|
||||
// operator !=
|
||||
x != 0;
|
||||
x != <number>0;
|
||||
x != <BrandedNum>0;
|
||||
|
||||
// operator ===
|
||||
x === 0;
|
||||
x === <number>0;
|
||||
x === <BrandedNum>0;
|
||||
|
||||
// operator !==
|
||||
x !== 0;
|
||||
x !== <number>0;
|
||||
x !== <BrandedNum>0;
|
||||
Loading…
x
Reference in New Issue
Block a user