TypeScript/tests/baselines/reference/symbolType3.errors.txt

33 lines
1.6 KiB
Plaintext
Raw Normal View History

2015-02-05 04:18:54 +01:00
tests/cases/conformance/es6/Symbols/symbolType3.ts(5,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es6/Symbols/symbolType3.ts(6,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
2015-02-11 01:13:28 +01:00
tests/cases/conformance/es6/Symbols/symbolType3.ts(7,3): error TS2469: The '+' operator cannot be applied to type 'symbol'.
tests/cases/conformance/es6/Symbols/symbolType3.ts(8,3): error TS2469: The '-' operator cannot be applied to type 'symbol'.
tests/cases/conformance/es6/Symbols/symbolType3.ts(9,3): error TS2469: The '~' operator cannot be applied to type 'symbol'.
tests/cases/conformance/es6/Symbols/symbolType3.ts(12,2): error TS2469: The '+' operator cannot be applied to type 'symbol'.
2015-02-05 04:18:54 +01:00
==== tests/cases/conformance/es6/Symbols/symbolType3.ts (6 errors) ====
var s = Symbol();
delete Symbol.iterator;
void Symbol.toPrimitive;
typeof Symbol.toStringTag;
++s;
~
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
--s;
~
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
+ Symbol();
~~~~~~~~
2015-02-11 01:13:28 +01:00
!!! error TS2469: The '+' operator cannot be applied to type 'symbol'.
2015-02-05 04:18:54 +01:00
- Symbol();
~~~~~~~~
2015-02-11 01:13:28 +01:00
!!! error TS2469: The '-' operator cannot be applied to type 'symbol'.
2015-02-05 04:18:54 +01:00
~ Symbol();
~~~~~~~~
2015-02-11 01:13:28 +01:00
!!! error TS2469: The '~' operator cannot be applied to type 'symbol'.
2015-02-05 04:18:54 +01:00
! Symbol();
+(Symbol() || 0);
~~~~~~~~~~~~~~~
2015-02-11 01:13:28 +01:00
!!! error TS2469: The '+' operator cannot be applied to type 'symbol'.