2014-09-12 22:35:07 +02:00
tests/cases/compiler/ambientWithStatements.ts(2,5): error TS1036: Statements are not allowed in ambient contexts.
2014-12-17 04:11:07 +01:00
tests/cases/compiler/ambientWithStatements.ts(2,5): error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement.
tests/cases/compiler/ambientWithStatements.ts(3,5): error TS1104: A 'continue' statement can only be used within an enclosing iteration statement.
2014-12-17 00:56:56 +01:00
tests/cases/compiler/ambientWithStatements.ts(7,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
2014-12-17 04:11:07 +01:00
tests/cases/compiler/ambientWithStatements.ts(11,5): error TS1108: A 'return' statement can only be used within a function body.
2014-09-12 22:35:07 +02:00
tests/cases/compiler/ambientWithStatements.ts(25,11): error TS2410: All symbols within a 'with' block will be resolved to 'any'.
2014-12-17 04:11:07 +01:00
==== tests/cases/compiler/ambientWithStatements.ts (6 errors) ====
2014-07-13 01:04:16 +02:00
declare module M {
break;
~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS1036: Statements are not allowed in ambient contexts.
2014-12-17 04:11:07 +01:00
~~~~~~
!!! error TS1105: A 'break' statement can only be used within an enclosing iteration or switch statement.
2014-07-13 01:04:16 +02:00
continue;
2014-12-17 04:11:07 +01:00
~~~~~~~~~
!!! error TS1104: A 'continue' statement can only be used within an enclosing iteration statement.
2014-07-13 01:04:16 +02:00
debugger;
do { } while (true);
var x;
for (x in null) { }
~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
2014-07-13 01:04:16 +02:00
if (true) { } else { }
1;
L: var y;
return;
~~~~~~
2014-12-17 04:11:07 +01:00
!!! error TS1108: A 'return' statement can only be used within a function body.
2014-07-13 01:04:16 +02:00
switch (x) {
case 1:
break;
default:
break;
}
throw "nooo";
try {
}
catch (e) {
}
finally {
}
with (x) {
2014-07-22 02:09:14 +02:00
~
2014-09-12 00:19:57 +02:00
!!! error TS2410: All symbols within a 'with' block will be resolved to 'any'.
2014-07-13 01:04:16 +02:00
}
}