TypeScript/tests/baselines/reference/symbolType3.errors.txt
2015-02-10 16:13:28 -08:00

33 lines
1.6 KiB
Plaintext

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.
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'.
==== 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();
~~~~~~~~
!!! error TS2469: The '+' operator cannot be applied to type 'symbol'.
- Symbol();
~~~~~~~~
!!! error TS2469: The '-' operator cannot be applied to type 'symbol'.
~ Symbol();
~~~~~~~~
!!! error TS2469: The '~' operator cannot be applied to type 'symbol'.
! Symbol();
+(Symbol() || 0);
~~~~~~~~~~~~~~~
!!! error TS2469: The '+' operator cannot be applied to type 'symbol'.