Accepted baselines.

This commit is contained in:
Daniel Rosenwasser 2018-11-09 16:21:16 -08:00
parent 15f2f047f8
commit 17b77dfdce
4 changed files with 20 additions and 14 deletions

View file

@ -1,7 +1,7 @@
tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,22): error TS1351: Experimental support for BigInt is a feature that is subject to change in a future release. Set the 'experimentalBigInt' option to remove this warning.
tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,29): error TS1351: Experimental support for BigInt is a feature that is subject to change in a future release. Set the 'experimentalBigInt' option to remove this warning.
tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,39): error TS1351: Experimental support for BigInt is a feature that is subject to change in a future release. Set the 'experimentalBigInt' option to remove this warning.
tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,48): error TS1351: Experimental support for BigInt is a feature that is subject to change in a future release. Set the 'experimentalBigInt' option to remove this warning.
tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,22): error TS2737: BigInt literals are not available when targeting lower than ESNext.
tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,29): error TS2737: BigInt literals are not available when targeting lower than ESNext.
tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,39): error TS2737: BigInt literals are not available when targeting lower than ESNext.
tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,48): error TS2737: BigInt literals are not available when targeting lower than ESNext.
==== tests/cases/compiler/warnExperimentalBigIntLiteral.ts (4 errors) ====
@ -11,10 +11,12 @@ tests/cases/compiler/warnExperimentalBigIntLiteral.ts(5,48): error TS1351: Exper
let bigintNegativeLiteralType: -123n; // should not error when used as type
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
~~~~
!!! error TS1351: Experimental support for BigInt is a feature that is subject to change in a future release. Set the 'experimentalBigInt' option to remove this warning.
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
~~~~~~~
!!! error TS1351: Experimental support for BigInt is a feature that is subject to change in a future release. Set the 'experimentalBigInt' option to remove this warning.
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
~~~~~~
!!! error TS1351: Experimental support for BigInt is a feature that is subject to change in a future release. Set the 'experimentalBigInt' option to remove this warning.
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.
~~~~~
!!! error TS1351: Experimental support for BigInt is a feature that is subject to change in a future release. Set the 'experimentalBigInt' option to remove this warning.
!!! error TS2737: BigInt literals are not available when targeting lower than ESNext.

View file

@ -3,11 +3,13 @@ const normalNumber = 123; // should not error
let bigintType: bigint; // should not error
let bigintLiteralType: 123n; // should not error when used as type
let bigintNegativeLiteralType: -123n; // should not error when used as type
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
//// [warnExperimentalBigIntLiteral.js]
const normalNumber = 123; // should not error
let bigintType; // should not error
let bigintLiteralType; // should not error when used as type
let bigintNegativeLiteralType; // should not error when used as type
const bigintNumber = 123n * 15n + 292n * 0x7fn; // each literal should error
var normalNumber = 123; // should not error
var bigintType; // should not error
var bigintLiteralType; // should not error when used as type
var bigintNegativeLiteralType; // should not error when used as type
var bigintNumber = 123n * 15n + 292n * 0x7fn; // each literal should error

View file

@ -14,3 +14,4 @@ let bigintNegativeLiteralType: -123n; // should not error when used as type
const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should error
>bigintNumber : Symbol(bigintNumber, Decl(warnExperimentalBigIntLiteral.ts, 4, 5))

View file

@ -24,3 +24,4 @@ const bigintNumber = 123n * 0b1111n + 0o444n * 0x7fn; // each literal should err
>0o444n : 292n
>0x7fn : 127n