mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
30 lines
543 B
TypeScript
30 lines
543 B
TypeScript
//// [tests/cases/compiler/doWhileUnreachableCode.ts] ////
|
|
|
|
//// [doWhileUnreachableCode.ts]
|
|
function test() {
|
|
let foo = 0;
|
|
testLoop: do {
|
|
foo++;
|
|
continue testLoop;
|
|
} while (function() {
|
|
var x = 1;
|
|
return false;
|
|
}());
|
|
|
|
return foo;
|
|
}
|
|
|
|
//// [doWhileUnreachableCode.js]
|
|
"use strict";
|
|
function test() {
|
|
let foo = 0;
|
|
testLoop: do {
|
|
foo++;
|
|
continue testLoop;
|
|
} while (function () {
|
|
var x = 1;
|
|
return false;
|
|
}());
|
|
return foo;
|
|
}
|