mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Accepting new baselines
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
tests/cases/compiler/nestedBlockScopedBindings13.ts(2,5): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings13.ts(7,5): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nestedBlockScopedBindings13.ts (2 errors) ====
|
||||
for (; false;) {
|
||||
let x;
|
||||
~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
() => x;
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
let y;
|
||||
~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
y = 1;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings13.ts ===
|
||||
for (; false;) {
|
||||
let x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings13.ts, 1, 7))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings13.ts, 1, 7))
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
let y;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings13.ts, 6, 7))
|
||||
|
||||
y = 1;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings13.ts, 6, 7))
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings13.ts ===
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
|
||||
let y;
|
||||
>y : any
|
||||
|
||||
y = 1;
|
||||
>y = 1 : number
|
||||
>y : any
|
||||
>1 : number
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
tests/cases/compiler/nestedBlockScopedBindings14.ts(3,5): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings14.ts(9,5): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nestedBlockScopedBindings14.ts (2 errors) ====
|
||||
var x;
|
||||
for (; false;) {
|
||||
let x;
|
||||
~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
() => x;
|
||||
}
|
||||
|
||||
var y;
|
||||
for (; false;) {
|
||||
let y;
|
||||
~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
y = 1;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings14.ts ===
|
||||
var x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings14.ts, 0, 3))
|
||||
|
||||
for (; false;) {
|
||||
let x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings14.ts, 2, 7))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings14.ts, 2, 7))
|
||||
}
|
||||
|
||||
var y;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings14.ts, 6, 3))
|
||||
|
||||
for (; false;) {
|
||||
let y;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings14.ts, 8, 7))
|
||||
|
||||
y = 1;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings14.ts, 8, 7))
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings14.ts ===
|
||||
var x;
|
||||
>x : any
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
|
||||
var y;
|
||||
>y : any
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
|
||||
let y;
|
||||
>y : any
|
||||
|
||||
y = 1;
|
||||
>y = 1 : number
|
||||
>y : any
|
||||
>1 : number
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
tests/cases/compiler/nestedBlockScopedBindings15.ts(3,9): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings15.ts(10,9): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings15.ts(16,5): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings15.ts(25,5): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nestedBlockScopedBindings15.ts (4 errors) ====
|
||||
for (; false;) {
|
||||
{
|
||||
let x;
|
||||
~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
() => x;
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
{
|
||||
let y;
|
||||
~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
y = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
switch (1){
|
||||
~~~~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
case 1:
|
||||
let z0;
|
||||
() => z0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
switch (1){
|
||||
~~~~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
case 1:
|
||||
let z;
|
||||
z = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings15.ts ===
|
||||
for (; false;) {
|
||||
{
|
||||
let x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings15.ts, 2, 11))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings15.ts, 2, 11))
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
{
|
||||
let y;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings15.ts, 9, 11))
|
||||
|
||||
y = 1;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings15.ts, 9, 11))
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
switch (1){
|
||||
case 1:
|
||||
let z0;
|
||||
>z0 : Symbol(z0, Decl(nestedBlockScopedBindings15.ts, 17, 15))
|
||||
|
||||
() => z0;
|
||||
>z0 : Symbol(z0, Decl(nestedBlockScopedBindings15.ts, 17, 15))
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
switch (1){
|
||||
case 1:
|
||||
let z;
|
||||
>z : Symbol(z, Decl(nestedBlockScopedBindings15.ts, 26, 15))
|
||||
|
||||
z = 1;
|
||||
>z : Symbol(z, Decl(nestedBlockScopedBindings15.ts, 26, 15))
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings15.ts ===
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
{
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
{
|
||||
let y;
|
||||
>y : any
|
||||
|
||||
y = 1;
|
||||
>y = 1 : number
|
||||
>y : any
|
||||
>1 : number
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
|
||||
switch (1){
|
||||
>1 : number
|
||||
|
||||
case 1:
|
||||
>1 : number
|
||||
|
||||
let z0;
|
||||
>z0 : any
|
||||
|
||||
() => z0;
|
||||
>() => z0 : () => any
|
||||
>z0 : any
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
|
||||
switch (1){
|
||||
>1 : number
|
||||
|
||||
case 1:
|
||||
>1 : number
|
||||
|
||||
let z;
|
||||
>z : any
|
||||
|
||||
z = 1;
|
||||
>z = 1 : number
|
||||
>z : any
|
||||
>1 : number
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
tests/cases/compiler/nestedBlockScopedBindings16.ts(4,9): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings16.ts(12,9): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings16.ts(19,5): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings16.ts(29,5): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nestedBlockScopedBindings16.ts (4 errors) ====
|
||||
var x;
|
||||
for (; false;) {
|
||||
{
|
||||
let x;
|
||||
~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
() => x;
|
||||
}
|
||||
}
|
||||
|
||||
var y;
|
||||
for (; false;) {
|
||||
{
|
||||
let y;
|
||||
~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
y = 1;
|
||||
}
|
||||
}
|
||||
|
||||
var z0;
|
||||
for (; false;) {
|
||||
switch (1){
|
||||
~~~~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
case 1:
|
||||
let z0;
|
||||
() => z0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var z;
|
||||
for (; false;) {
|
||||
switch (1){
|
||||
~~~~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
case 1:
|
||||
let z;
|
||||
z = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings16.ts ===
|
||||
var x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings16.ts, 0, 3))
|
||||
|
||||
for (; false;) {
|
||||
{
|
||||
let x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings16.ts, 3, 11))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings16.ts, 3, 11))
|
||||
}
|
||||
}
|
||||
|
||||
var y;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings16.ts, 8, 3))
|
||||
|
||||
for (; false;) {
|
||||
{
|
||||
let y;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings16.ts, 11, 11))
|
||||
|
||||
y = 1;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings16.ts, 11, 11))
|
||||
}
|
||||
}
|
||||
|
||||
var z0;
|
||||
>z0 : Symbol(z0, Decl(nestedBlockScopedBindings16.ts, 16, 3))
|
||||
|
||||
for (; false;) {
|
||||
switch (1){
|
||||
case 1:
|
||||
let z0;
|
||||
>z0 : Symbol(z0, Decl(nestedBlockScopedBindings16.ts, 20, 15))
|
||||
|
||||
() => z0;
|
||||
>z0 : Symbol(z0, Decl(nestedBlockScopedBindings16.ts, 20, 15))
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var z;
|
||||
>z : Symbol(z, Decl(nestedBlockScopedBindings16.ts, 26, 3))
|
||||
|
||||
for (; false;) {
|
||||
switch (1){
|
||||
case 1:
|
||||
let z;
|
||||
>z : Symbol(z, Decl(nestedBlockScopedBindings16.ts, 30, 15))
|
||||
|
||||
z = 1;
|
||||
>z : Symbol(z, Decl(nestedBlockScopedBindings16.ts, 30, 15))
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings16.ts ===
|
||||
var x;
|
||||
>x : any
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
{
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
}
|
||||
|
||||
var y;
|
||||
>y : any
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
{
|
||||
let y;
|
||||
>y : any
|
||||
|
||||
y = 1;
|
||||
>y = 1 : number
|
||||
>y : any
|
||||
>1 : number
|
||||
}
|
||||
}
|
||||
|
||||
var z0;
|
||||
>z0 : any
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
|
||||
switch (1){
|
||||
>1 : number
|
||||
|
||||
case 1:
|
||||
>1 : number
|
||||
|
||||
let z0;
|
||||
>z0 : any
|
||||
|
||||
() => z0;
|
||||
>() => z0 : () => any
|
||||
>z0 : any
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var z;
|
||||
>z : any
|
||||
|
||||
for (; false;) {
|
||||
>false : boolean
|
||||
|
||||
switch (1){
|
||||
>1 : number
|
||||
|
||||
case 1:
|
||||
>1 : number
|
||||
|
||||
let z;
|
||||
>z : any
|
||||
|
||||
z = 1;
|
||||
>z = 1 : number
|
||||
>z : any
|
||||
>1 : number
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
tests/cases/compiler/nestedBlockScopedBindings5.ts(37,9): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings5.ts(54,9): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings5.ts(71,9): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nestedBlockScopedBindings5.ts (3 errors) ====
|
||||
function a0() {
|
||||
for (let x in []) {
|
||||
x = x + 1;
|
||||
}
|
||||
for (let x;;) {
|
||||
x = x + 2;
|
||||
}
|
||||
}
|
||||
|
||||
function a1() {
|
||||
for (let x in []) {
|
||||
x = x + 1;
|
||||
() => x;
|
||||
}
|
||||
for (let x;;) {
|
||||
x = x + 2;
|
||||
}
|
||||
}
|
||||
|
||||
function a2() {
|
||||
for (let x in []) {
|
||||
x = x + 1;
|
||||
}
|
||||
for (let x;;) {
|
||||
x = x + 2;
|
||||
() => x;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function a3() {
|
||||
for (let x in []) {
|
||||
x = x + 1;
|
||||
() => x;
|
||||
}
|
||||
for (let x;false;) {
|
||||
x = x + 2;
|
||||
~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
() => x;
|
||||
}
|
||||
switch (1) {
|
||||
case 1:
|
||||
let x;
|
||||
() => x;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function a4() {
|
||||
for (let x in []) {
|
||||
x = x + 1;
|
||||
}
|
||||
for (let x;false;) {
|
||||
x = x + 2;
|
||||
~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
}
|
||||
switch (1) {
|
||||
case 1:
|
||||
let x;
|
||||
() => x;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function a5() {
|
||||
let y;
|
||||
for (let x in []) {
|
||||
x = x + 1;
|
||||
}
|
||||
for (let x;false;) {
|
||||
x = x + 2;
|
||||
~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
() => x;
|
||||
}
|
||||
switch (1) {
|
||||
case 1:
|
||||
let x;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,163 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings5.ts ===
|
||||
function a0() {
|
||||
>a0 : Symbol(a0, Decl(nestedBlockScopedBindings5.ts, 0, 0))
|
||||
|
||||
for (let x in []) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 1, 12))
|
||||
|
||||
x = x + 1;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 1, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 1, 12))
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 4, 12))
|
||||
|
||||
x = x + 2;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 4, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 4, 12))
|
||||
}
|
||||
}
|
||||
|
||||
function a1() {
|
||||
>a1 : Symbol(a1, Decl(nestedBlockScopedBindings5.ts, 7, 1))
|
||||
|
||||
for (let x in []) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 10, 12))
|
||||
|
||||
x = x + 1;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 10, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 10, 12))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 10, 12))
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 14, 12))
|
||||
|
||||
x = x + 2;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 14, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 14, 12))
|
||||
}
|
||||
}
|
||||
|
||||
function a2() {
|
||||
>a2 : Symbol(a2, Decl(nestedBlockScopedBindings5.ts, 17, 1))
|
||||
|
||||
for (let x in []) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 20, 12))
|
||||
|
||||
x = x + 1;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 20, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 20, 12))
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 23, 12))
|
||||
|
||||
x = x + 2;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 23, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 23, 12))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 23, 12))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function a3() {
|
||||
>a3 : Symbol(a3, Decl(nestedBlockScopedBindings5.ts, 27, 1))
|
||||
|
||||
for (let x in []) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 31, 12))
|
||||
|
||||
x = x + 1;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 31, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 31, 12))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 31, 12))
|
||||
}
|
||||
for (let x;false;) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 35, 12))
|
||||
|
||||
x = x + 2;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 35, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 35, 12))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 35, 12))
|
||||
}
|
||||
switch (1) {
|
||||
case 1:
|
||||
let x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 41, 15))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 41, 15))
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function a4() {
|
||||
>a4 : Symbol(a4, Decl(nestedBlockScopedBindings5.ts, 46, 1))
|
||||
|
||||
for (let x in []) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 49, 12))
|
||||
|
||||
x = x + 1;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 49, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 49, 12))
|
||||
}
|
||||
for (let x;false;) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 52, 12))
|
||||
|
||||
x = x + 2;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 52, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 52, 12))
|
||||
}
|
||||
switch (1) {
|
||||
case 1:
|
||||
let x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 57, 15))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 57, 15))
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function a5() {
|
||||
>a5 : Symbol(a5, Decl(nestedBlockScopedBindings5.ts, 62, 1))
|
||||
|
||||
let y;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings5.ts, 65, 7))
|
||||
|
||||
for (let x in []) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 66, 12))
|
||||
|
||||
x = x + 1;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 66, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 66, 12))
|
||||
}
|
||||
for (let x;false;) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 69, 12))
|
||||
|
||||
x = x + 2;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 69, 12))
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 69, 12))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 69, 12))
|
||||
}
|
||||
switch (1) {
|
||||
case 1:
|
||||
let x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings5.ts, 75, 15))
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,227 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings5.ts ===
|
||||
function a0() {
|
||||
>a0 : () => void
|
||||
|
||||
for (let x in []) {
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : string
|
||||
>x : string
|
||||
>x + 1 : string
|
||||
>x : string
|
||||
>1 : number
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>2 : number
|
||||
}
|
||||
}
|
||||
|
||||
function a1() {
|
||||
>a1 : () => void
|
||||
|
||||
for (let x in []) {
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : string
|
||||
>x : string
|
||||
>x + 1 : string
|
||||
>x : string
|
||||
>1 : number
|
||||
|
||||
() => x;
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>2 : number
|
||||
}
|
||||
}
|
||||
|
||||
function a2() {
|
||||
>a2 : () => void
|
||||
|
||||
for (let x in []) {
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : string
|
||||
>x : string
|
||||
>x + 1 : string
|
||||
>x : string
|
||||
>1 : number
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>2 : number
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function a3() {
|
||||
>a3 : () => void
|
||||
|
||||
for (let x in []) {
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : string
|
||||
>x : string
|
||||
>x + 1 : string
|
||||
>x : string
|
||||
>1 : number
|
||||
|
||||
() => x;
|
||||
>() => x : () => string
|
||||
>x : string
|
||||
}
|
||||
for (let x;false;) {
|
||||
>x : any
|
||||
>false : boolean
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>2 : number
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
switch (1) {
|
||||
>1 : number
|
||||
|
||||
case 1:
|
||||
>1 : number
|
||||
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function a4() {
|
||||
>a4 : () => void
|
||||
|
||||
for (let x in []) {
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : string
|
||||
>x : string
|
||||
>x + 1 : string
|
||||
>x : string
|
||||
>1 : number
|
||||
}
|
||||
for (let x;false;) {
|
||||
>x : any
|
||||
>false : boolean
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>2 : number
|
||||
}
|
||||
switch (1) {
|
||||
>1 : number
|
||||
|
||||
case 1:
|
||||
>1 : number
|
||||
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function a5() {
|
||||
>a5 : () => void
|
||||
|
||||
let y;
|
||||
>y : any
|
||||
|
||||
for (let x in []) {
|
||||
>x : string
|
||||
>[] : undefined[]
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : string
|
||||
>x : string
|
||||
>x + 1 : string
|
||||
>x : string
|
||||
>1 : number
|
||||
}
|
||||
for (let x;false;) {
|
||||
>x : any
|
||||
>false : boolean
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>2 : number
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
switch (1) {
|
||||
>1 : number
|
||||
|
||||
case 1:
|
||||
>1 : number
|
||||
|
||||
let x;
|
||||
>x : any
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
tests/cases/compiler/nestedBlockScopedBindings7.ts(2,5): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings7.ts(6,5): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nestedBlockScopedBindings7.ts (2 errors) ====
|
||||
for (let x; false;) {
|
||||
() => x;
|
||||
~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
}
|
||||
|
||||
for (let y; false;) {
|
||||
y = 1;
|
||||
~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings7.ts ===
|
||||
for (let x; false;) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings7.ts, 0, 8))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings7.ts, 0, 8))
|
||||
}
|
||||
|
||||
for (let y; false;) {
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings7.ts, 4, 8))
|
||||
|
||||
y = 1;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings7.ts, 4, 8))
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings7.ts ===
|
||||
for (let x; false;) {
|
||||
>x : any
|
||||
>false : boolean
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
|
||||
for (let y; false;) {
|
||||
>y : any
|
||||
>false : boolean
|
||||
|
||||
y = 1;
|
||||
>y = 1 : number
|
||||
>y : any
|
||||
>1 : number
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
tests/cases/compiler/nestedBlockScopedBindings8.ts(3,5): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/nestedBlockScopedBindings8.ts(8,5): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/nestedBlockScopedBindings8.ts (2 errors) ====
|
||||
var x;
|
||||
for (let x; false; ) {
|
||||
() => x;
|
||||
~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
}
|
||||
|
||||
var y;
|
||||
for (let y; false; ) {
|
||||
y = 1;
|
||||
~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings8.ts ===
|
||||
var x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings8.ts, 0, 3))
|
||||
|
||||
for (let x; false; ) {
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings8.ts, 1, 8))
|
||||
|
||||
() => x;
|
||||
>x : Symbol(x, Decl(nestedBlockScopedBindings8.ts, 1, 8))
|
||||
}
|
||||
|
||||
var y;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings8.ts, 5, 3))
|
||||
|
||||
for (let y; false; ) {
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings8.ts, 6, 8))
|
||||
|
||||
y = 1;
|
||||
>y : Symbol(y, Decl(nestedBlockScopedBindings8.ts, 6, 8))
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings8.ts ===
|
||||
var x;
|
||||
>x : any
|
||||
|
||||
for (let x; false; ) {
|
||||
>x : any
|
||||
>false : boolean
|
||||
|
||||
() => x;
|
||||
>() => x : () => any
|
||||
>x : any
|
||||
}
|
||||
|
||||
var y;
|
||||
>y : any
|
||||
|
||||
for (let y; false; ) {
|
||||
>y : any
|
||||
>false : boolean
|
||||
|
||||
y = 1;
|
||||
>y = 1 : number
|
||||
>y : any
|
||||
>1 : number
|
||||
}
|
||||
@@ -1,13 +1,16 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(1,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(2,1): error TS1114: Duplicate label 'target'
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(2,1): error TS7028: Unused label.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts (3 errors) ====
|
||||
target:
|
||||
~~~~~~
|
||||
!!! error TS7028: Unused label.
|
||||
target:
|
||||
~~~~~~
|
||||
!!! error TS1114: Duplicate label 'target'
|
||||
~~~~~~
|
||||
!!! error TS7028: Unused label.
|
||||
while (true) {
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(1,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(3,3): error TS1114: Duplicate label 'target'
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(3,3): error TS7028: Unused label.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts (2 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts (3 errors) ====
|
||||
target:
|
||||
~~~~~~
|
||||
!!! error TS7028: Unused label.
|
||||
@@ -10,6 +11,8 @@ tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_d
|
||||
target:
|
||||
~~~~~~
|
||||
!!! error TS1114: Duplicate label 'target'
|
||||
~~~~~~
|
||||
!!! error TS7028: Unused label.
|
||||
while (true) {
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,12 @@ tests/cases/compiler/reachabilityChecks5.ts(52,17): error TS7030: Not all code p
|
||||
tests/cases/compiler/reachabilityChecks5.ts(80,17): error TS7030: Not all code paths return a value.
|
||||
tests/cases/compiler/reachabilityChecks5.ts(86,13): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/reachabilityChecks5.ts(94,17): error TS7030: Not all code paths return a value.
|
||||
tests/cases/compiler/reachabilityChecks5.ts(97,13): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/reachabilityChecks5.ts(116,18): error TS7030: Not all code paths return a value.
|
||||
tests/cases/compiler/reachabilityChecks5.ts(123,13): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/reachabilityChecks5.ts (10 errors) ====
|
||||
==== tests/cases/compiler/reachabilityChecks5.ts (11 errors) ====
|
||||
|
||||
function f0(x): number {
|
||||
while (true);
|
||||
@@ -124,6 +125,8 @@ tests/cases/compiler/reachabilityChecks5.ts(123,13): error TS7027: Unreachable c
|
||||
try {
|
||||
while (false) {
|
||||
return 1;
|
||||
~~~~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
@@ -5,11 +5,12 @@ tests/cases/compiler/reachabilityChecks6.ts(52,10): error TS7030: Not all code p
|
||||
tests/cases/compiler/reachabilityChecks6.ts(80,10): error TS7030: Not all code paths return a value.
|
||||
tests/cases/compiler/reachabilityChecks6.ts(86,13): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/reachabilityChecks6.ts(94,10): error TS7030: Not all code paths return a value.
|
||||
tests/cases/compiler/reachabilityChecks6.ts(97,13): error TS7027: Unreachable code detected.
|
||||
tests/cases/compiler/reachabilityChecks6.ts(116,10): error TS7030: Not all code paths return a value.
|
||||
tests/cases/compiler/reachabilityChecks6.ts(123,13): error TS7027: Unreachable code detected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/reachabilityChecks6.ts (9 errors) ====
|
||||
==== tests/cases/compiler/reachabilityChecks6.ts (10 errors) ====
|
||||
|
||||
function f0(x) {
|
||||
while (true);
|
||||
@@ -121,6 +122,8 @@ tests/cases/compiler/reachabilityChecks6.ts(123,13): error TS7027: Unreachable c
|
||||
try {
|
||||
while (false) {
|
||||
return 1;
|
||||
~~~~~~
|
||||
!!! error TS7027: Unreachable code detected.
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
@@ -27,7 +27,7 @@ else {
|
||||
if (typeof x !== "number") {
|
||||
>typeof x !== "number" : boolean
|
||||
>typeof x : string
|
||||
>x : number | string | E | V
|
||||
>x : number | string
|
||||
>"number" : string
|
||||
|
||||
x; // string
|
||||
@@ -35,6 +35,6 @@ if (typeof x !== "number") {
|
||||
}
|
||||
else {
|
||||
x; // number|E|V
|
||||
>x : number | E | V
|
||||
>x : number
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri
|
||||
>(typeof strOrBool === 'boolean') : boolean
|
||||
>typeof strOrBool === 'boolean' : boolean
|
||||
>typeof strOrBool : string
|
||||
>strOrBool : boolean | string
|
||||
>strOrBool : string | boolean
|
||||
>'boolean' : string
|
||||
>strOrBool : boolean
|
||||
>false : boolean
|
||||
@@ -56,7 +56,7 @@ if ((typeof strOrBool === 'boolean' && !strOrBool) || typeof strOrBool === 'stri
|
||||
>(typeof strOrBool !== 'string') : boolean
|
||||
>typeof strOrBool !== 'string' : boolean
|
||||
>typeof strOrBool : string
|
||||
>strOrBool : boolean | string
|
||||
>strOrBool : string | boolean
|
||||
>'string' : string
|
||||
>strOrBool : boolean
|
||||
>false : boolean
|
||||
@@ -68,7 +68,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole
|
||||
>typeof strOrBool !== 'string' && !strOrBool : boolean
|
||||
>typeof strOrBool !== 'string' : boolean
|
||||
>typeof strOrBool : string
|
||||
>strOrBool : string | boolean
|
||||
>strOrBool : boolean | string
|
||||
>'string' : string
|
||||
>!strOrBool : boolean
|
||||
>strOrBool : boolean
|
||||
@@ -94,7 +94,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole
|
||||
>(typeof strOrBool === 'boolean') : boolean
|
||||
>typeof strOrBool === 'boolean' : boolean
|
||||
>typeof strOrBool : string
|
||||
>strOrBool : boolean | string
|
||||
>strOrBool : string | boolean
|
||||
>'boolean' : string
|
||||
>strOrBool : boolean
|
||||
>false : boolean
|
||||
@@ -116,7 +116,7 @@ if ((typeof strOrBool !== 'string' && !strOrBool) || typeof strOrBool !== 'boole
|
||||
>(typeof strOrBool !== 'string') : boolean
|
||||
>typeof strOrBool !== 'string' : boolean
|
||||
>typeof strOrBool : string
|
||||
>strOrBool : boolean | string
|
||||
>strOrBool : string | boolean
|
||||
>'string' : string
|
||||
>strOrBool : boolean
|
||||
>false : boolean
|
||||
|
||||
@@ -95,11 +95,11 @@ if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "numbe
|
||||
>typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC !== "string" : boolean
|
||||
>typeof strOrNumOrBoolOrC : string
|
||||
>strOrNumOrBoolOrC : string | number | boolean | C
|
||||
>strOrNumOrBoolOrC : C | string | number | boolean
|
||||
>"string" : string
|
||||
>typeof strOrNumOrBoolOrC !== "number" : boolean
|
||||
>typeof strOrNumOrBoolOrC : string
|
||||
>strOrNumOrBoolOrC : number | boolean | C
|
||||
>strOrNumOrBoolOrC : C | number | boolean
|
||||
>"number" : string
|
||||
>typeof strOrNumOrBool === "boolean" : boolean
|
||||
>typeof strOrNumOrBool : string
|
||||
@@ -107,9 +107,9 @@ if (typeof strOrNumOrBoolOrC !== "string" && typeof strOrNumOrBoolOrC !== "numbe
|
||||
>"boolean" : string
|
||||
|
||||
cOrBool = strOrNumOrBoolOrC; // C | boolean
|
||||
>cOrBool = strOrNumOrBoolOrC : boolean | C
|
||||
>cOrBool = strOrNumOrBoolOrC : C | boolean
|
||||
>cOrBool : C | boolean
|
||||
>strOrNumOrBoolOrC : boolean | C
|
||||
>strOrNumOrBoolOrC : C | boolean
|
||||
|
||||
bool = strOrNumOrBool; // boolean
|
||||
>bool = strOrNumOrBool : boolean
|
||||
@@ -120,7 +120,7 @@ else {
|
||||
var r1: string | number | boolean | C = strOrNumOrBoolOrC; // string | number | boolean | C
|
||||
>r1 : string | number | boolean | C
|
||||
>C : C
|
||||
>strOrNumOrBoolOrC : string | number | boolean | C
|
||||
>strOrNumOrBoolOrC : string | number | C | boolean
|
||||
|
||||
var r2: string | number | boolean = strOrNumOrBool;
|
||||
>r2 : string | number | boolean
|
||||
|
||||
@@ -73,13 +73,13 @@ if (!(typeof strOrNumOrBool !== "string") || !(typeof strOrNumOrBool !== "number
|
||||
>(typeof strOrNumOrBool !== "string") : boolean
|
||||
>typeof strOrNumOrBool !== "string" : boolean
|
||||
>typeof strOrNumOrBool : string
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>strOrNumOrBool : boolean | string | number
|
||||
>"string" : string
|
||||
>!(typeof strOrNumOrBool !== "number") : boolean
|
||||
>(typeof strOrNumOrBool !== "number") : boolean
|
||||
>typeof strOrNumOrBool !== "number" : boolean
|
||||
>typeof strOrNumOrBool : string
|
||||
>strOrNumOrBool : number | boolean
|
||||
>strOrNumOrBool : boolean | number
|
||||
>"number" : string
|
||||
|
||||
strOrNum = strOrNumOrBool; // string | number
|
||||
@@ -152,19 +152,19 @@ if (!(typeof strOrNumOrBool === "string") && numOrBool !== strOrNumOrBool) {
|
||||
>(typeof strOrNumOrBool === "string") : boolean
|
||||
>typeof strOrNumOrBool === "string" : boolean
|
||||
>typeof strOrNumOrBool : string
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>strOrNumOrBool : boolean | string | number
|
||||
>"string" : string
|
||||
>numOrBool !== strOrNumOrBool : boolean
|
||||
>numOrBool : number | boolean
|
||||
>strOrNumOrBool : number | boolean
|
||||
>strOrNumOrBool : boolean | number
|
||||
|
||||
numOrBool = strOrNumOrBool; // number | boolean
|
||||
>numOrBool = strOrNumOrBool : number | boolean
|
||||
>numOrBool = strOrNumOrBool : boolean | number
|
||||
>numOrBool : number | boolean
|
||||
>strOrNumOrBool : number | boolean
|
||||
>strOrNumOrBool : boolean | number
|
||||
}
|
||||
else {
|
||||
var r1: string | number | boolean = strOrNumOrBool; // string | number | boolean
|
||||
>r1 : string | number | boolean
|
||||
>strOrNumOrBool : string | number | boolean
|
||||
>strOrNumOrBool : string | boolean | number
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ var r3 = typeof x === "string" || typeof x === "string" ? x.substr : x.toFixed;
|
||||
>typeof x === "string" || typeof x === "string" : boolean
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : string
|
||||
>x : string | number
|
||||
>x : number | string
|
||||
>"string" : string
|
||||
>typeof x === "string" : boolean
|
||||
>typeof x : string
|
||||
|
||||
@@ -4,9 +4,13 @@ tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperator
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(68,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(69,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(70,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(71,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(72,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(73,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts(74,1): error TS7028: Unused label.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts (6 errors) ====
|
||||
==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithAnyOtherType.ts (10 errors) ====
|
||||
// typeof operator on any type
|
||||
|
||||
var ANY: any;
|
||||
@@ -90,6 +94,14 @@ tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperator
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
z: typeof objA.a;
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
z: typeof A.foo;
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
z: typeof M.n;
|
||||
z: typeof obj1.x;
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
z: typeof obj1.x;
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
@@ -1,9 +1,13 @@
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(50,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(51,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(52,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(54,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(55,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(56,1): error TS7028: Unused label.
|
||||
tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts(57,1): error TS7028: Unused label.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts (3 errors) ====
|
||||
==== tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperatorWithStringType.ts (7 errors) ====
|
||||
// typeof operator on string type
|
||||
var STRING: string;
|
||||
var STRING1: string[] = ["", "abc"];
|
||||
@@ -64,6 +68,14 @@ tests/cases/conformance/expressions/unaryOperators/typeofOperator/typeofOperator
|
||||
!!! error TS7028: Unused label.
|
||||
var y = { a: "", b: "" };
|
||||
z: typeof y.a;
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
z: typeof objA.a;
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
z: typeof A.foo;
|
||||
z: typeof M.n;
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
z: typeof M.n;
|
||||
~
|
||||
!!! error TS7028: Unused label.
|
||||
Reference in New Issue
Block a user