Accepting existing baselines
This commit is contained in:
parent
141dbb8986
commit
85173a07d3
6 changed files with 65 additions and 223 deletions
40
tests/baselines/reference/downlevelLetConst18.errors.txt
Normal file
40
tests/baselines/reference/downlevelLetConst18.errors.txt
Normal file
|
@ -0,0 +1,40 @@
|
|||
tests/cases/compiler/downlevelLetConst18.ts(5,14): error TS1250: In ES5 or lower, function declarations are not allowed in block scope in strict mode.
|
||||
tests/cases/compiler/downlevelLetConst18.ts(9,14): error TS1250: In ES5 or lower, function declarations are not allowed in block scope in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/downlevelLetConst18.ts (2 errors) ====
|
||||
|
||||
'use strict'
|
||||
|
||||
for (let x; ;) {
|
||||
function foo() { x };
|
||||
~~~
|
||||
!!! error TS1250: In ES5 or lower, function declarations are not allowed in block scope in strict mode.
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
function foo1() { x };
|
||||
~~~~
|
||||
!!! error TS1250: In ES5 or lower, function declarations are not allowed in block scope in strict mode.
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
(() => { x })();
|
||||
}
|
||||
|
||||
for (const x = 1; ;) {
|
||||
(() => { x })();
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
({ foo() { x }})
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
({ get foo() { return x } })
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
({ set foo(v) { x } })
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
=== tests/cases/compiler/downlevelLetConst18.ts ===
|
||||
|
||||
'use strict'
|
||||
|
||||
for (let x; ;) {
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 3, 8))
|
||||
|
||||
function foo() { x };
|
||||
>foo : Symbol(foo, Decl(downlevelLetConst18.ts, 3, 16))
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 3, 8))
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 7, 8))
|
||||
|
||||
function foo1() { x };
|
||||
>foo1 : Symbol(foo1, Decl(downlevelLetConst18.ts, 7, 16))
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 7, 8))
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 11, 8))
|
||||
|
||||
(() => { x })();
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 11, 8))
|
||||
}
|
||||
|
||||
for (const x = 1; ;) {
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 15, 10))
|
||||
|
||||
(() => { x })();
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 15, 10))
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 19, 8))
|
||||
|
||||
({ foo() { x }})
|
||||
>foo : Symbol(foo, Decl(downlevelLetConst18.ts, 20, 6))
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 19, 8))
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 23, 8))
|
||||
|
||||
({ get foo() { return x } })
|
||||
>foo : Symbol(foo, Decl(downlevelLetConst18.ts, 24, 6))
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 23, 8))
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 27, 8))
|
||||
|
||||
({ set foo(v) { x } })
|
||||
>foo : Symbol(foo, Decl(downlevelLetConst18.ts, 28, 6))
|
||||
>v : Symbol(v, Decl(downlevelLetConst18.ts, 28, 15))
|
||||
>x : Symbol(x, Decl(downlevelLetConst18.ts, 27, 8))
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
=== tests/cases/compiler/downlevelLetConst18.ts ===
|
||||
|
||||
'use strict'
|
||||
>'use strict' : string
|
||||
|
||||
for (let x; ;) {
|
||||
>x : any
|
||||
|
||||
function foo() { x };
|
||||
>foo : () => void
|
||||
>x : any
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : any
|
||||
|
||||
function foo1() { x };
|
||||
>foo1 : () => void
|
||||
>x : any
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : any
|
||||
|
||||
(() => { x })();
|
||||
>(() => { x })() : void
|
||||
>(() => { x }) : () => void
|
||||
>() => { x } : () => void
|
||||
>x : any
|
||||
}
|
||||
|
||||
for (const x = 1; ;) {
|
||||
>x : number
|
||||
>1 : number
|
||||
|
||||
(() => { x })();
|
||||
>(() => { x })() : void
|
||||
>(() => { x }) : () => void
|
||||
>() => { x } : () => void
|
||||
>x : number
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : any
|
||||
|
||||
({ foo() { x }})
|
||||
>({ foo() { x }}) : { foo(): void; }
|
||||
>{ foo() { x }} : { foo(): void; }
|
||||
>foo : () => void
|
||||
>x : any
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : any
|
||||
|
||||
({ get foo() { return x } })
|
||||
>({ get foo() { return x } }) : { readonly foo: any; }
|
||||
>{ get foo() { return x } } : { readonly foo: any; }
|
||||
>foo : any
|
||||
>x : any
|
||||
}
|
||||
|
||||
for (let x; ;) {
|
||||
>x : any
|
||||
|
||||
({ set foo(v) { x } })
|
||||
>({ set foo(v) { x } }) : { foo: any; }
|
||||
>{ set foo(v) { x } } : { foo: any; }
|
||||
>foo : any
|
||||
>v : any
|
||||
>x : any
|
||||
}
|
||||
|
25
tests/baselines/reference/downlevelLetConst19.errors.txt
Normal file
25
tests/baselines/reference/downlevelLetConst19.errors.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
tests/cases/compiler/downlevelLetConst19.ts(9,14): error TS1250: In ES5 or lower, function declarations are not allowed in block scope in strict mode.
|
||||
|
||||
|
||||
==== tests/cases/compiler/downlevelLetConst19.ts (1 errors) ====
|
||||
'use strict'
|
||||
declare function use(a: any);
|
||||
var x;
|
||||
function a() {
|
||||
{
|
||||
let x;
|
||||
use(x);
|
||||
|
||||
function b() {
|
||||
~
|
||||
!!! error TS1250: In ES5 or lower, function declarations are not allowed in block scope in strict mode.
|
||||
{
|
||||
let x;
|
||||
use(x);
|
||||
}
|
||||
use(x);
|
||||
}
|
||||
}
|
||||
use(x)
|
||||
}
|
||||
use(x)
|
|
@ -1,42 +0,0 @@
|
|||
=== tests/cases/compiler/downlevelLetConst19.ts ===
|
||||
'use strict'
|
||||
declare function use(a: any);
|
||||
>use : Symbol(use, Decl(downlevelLetConst19.ts, 0, 12))
|
||||
>a : Symbol(a, Decl(downlevelLetConst19.ts, 1, 21))
|
||||
|
||||
var x;
|
||||
>x : Symbol(x, Decl(downlevelLetConst19.ts, 2, 3))
|
||||
|
||||
function a() {
|
||||
>a : Symbol(a, Decl(downlevelLetConst19.ts, 2, 6))
|
||||
{
|
||||
let x;
|
||||
>x : Symbol(x, Decl(downlevelLetConst19.ts, 5, 7))
|
||||
|
||||
use(x);
|
||||
>use : Symbol(use, Decl(downlevelLetConst19.ts, 0, 12))
|
||||
>x : Symbol(x, Decl(downlevelLetConst19.ts, 5, 7))
|
||||
|
||||
function b() {
|
||||
>b : Symbol(b, Decl(downlevelLetConst19.ts, 6, 11))
|
||||
{
|
||||
let x;
|
||||
>x : Symbol(x, Decl(downlevelLetConst19.ts, 10, 15))
|
||||
|
||||
use(x);
|
||||
>use : Symbol(use, Decl(downlevelLetConst19.ts, 0, 12))
|
||||
>x : Symbol(x, Decl(downlevelLetConst19.ts, 10, 15))
|
||||
}
|
||||
use(x);
|
||||
>use : Symbol(use, Decl(downlevelLetConst19.ts, 0, 12))
|
||||
>x : Symbol(x, Decl(downlevelLetConst19.ts, 5, 7))
|
||||
}
|
||||
}
|
||||
use(x)
|
||||
>use : Symbol(use, Decl(downlevelLetConst19.ts, 0, 12))
|
||||
>x : Symbol(x, Decl(downlevelLetConst19.ts, 2, 3))
|
||||
}
|
||||
use(x)
|
||||
>use : Symbol(use, Decl(downlevelLetConst19.ts, 0, 12))
|
||||
>x : Symbol(x, Decl(downlevelLetConst19.ts, 2, 3))
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
=== tests/cases/compiler/downlevelLetConst19.ts ===
|
||||
'use strict'
|
||||
>'use strict' : string
|
||||
|
||||
declare function use(a: any);
|
||||
>use : (a: any) => any
|
||||
>a : any
|
||||
|
||||
var x;
|
||||
>x : any
|
||||
|
||||
function a() {
|
||||
>a : () => void
|
||||
{
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
use(x);
|
||||
>use(x) : any
|
||||
>use : (a: any) => any
|
||||
>x : any
|
||||
|
||||
function b() {
|
||||
>b : () => void
|
||||
{
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
use(x);
|
||||
>use(x) : any
|
||||
>use : (a: any) => any
|
||||
>x : any
|
||||
}
|
||||
use(x);
|
||||
>use(x) : any
|
||||
>use : (a: any) => any
|
||||
>x : any
|
||||
}
|
||||
}
|
||||
use(x)
|
||||
>use(x) : any
|
||||
>use : (a: any) => any
|
||||
>x : any
|
||||
}
|
||||
use(x)
|
||||
>use(x) : any
|
||||
>use : (a: any) => any
|
||||
>x : any
|
||||
|
Loading…
Reference in a new issue