1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
tests/cases/compiler/numericLiteralsWithTrailingDecimalPoints01.ts(3,3): error TS1351: An identifier or keyword cannot immediately follow a numeric literal.
tests/cases/compiler/numericLiteralsWithTrailingDecimalPoints01.ts(9,15): error TS1351: An identifier or keyword cannot immediately follow a numeric literal.
tests/cases/compiler/numericLiteralsWithTrailingDecimalPoints01.ts(9,23): error TS1005: ',' expected.
tests/cases/compiler/numericLiteralsWithTrailingDecimalPoints01.ts(9,24): error TS1109: Expression expected.
==== tests/cases/compiler/numericLiteralsWithTrailingDecimalPoints01.ts (4 errors) ====
1..toString();
1.0.toString();
1.toString();
~~~~~~~~
!!! error TS1351: An identifier or keyword cannot immediately follow a numeric literal.
1.+2.0 + 3. ;
// Preserve whitespace and comments where important for JS compatibility
var i: number = 1;
var test1 = i.toString();
var test2 = 2.toString();
~~~~~~~~
!!! error TS1351: An identifier or keyword cannot immediately follow a numeric literal.
~
!!! error TS1005: ',' expected.
~
!!! error TS1109: Expression expected.
var test3 = 3 .toString();
var test4 = 3 .toString();
var test5 = 3 .toString();
var test6 = 3.['toString']();
var test7 = 3
.toString();
var test8 = new Number(4).toString();
var test9 = 3. + 3.;
var test10 = 0 /* comment */.toString();
var test11 = 3. /* comment */ .toString();
var test12 = 3
/* comment */ .toString();
var test13 = 3.
/* comment */ .toString();
var test14 = 3
// comment
.toString();
var test15 = 3.
// comment
.toString();
var test16 = 3 // comment time
.toString();
var test17 = 3. // comment time again
.toString();
|