2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/unknownSymbols2.ts(2,12): error TS2304: Cannot find name 'asdf'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(3,17): error TS2304: Cannot find name 'asdf'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(4,14): error TS2304: Cannot find name 'asdf'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(5,9): error TS2304: Cannot find name 'asdf'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(7,14): error TS2304: Cannot find name 'qwerty'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(15,13): error TS2304: Cannot find name 'asdf'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(16,14): error TS2304: Cannot find name 'qwerty'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(22,19): error TS2304: Cannot find name 'asdf'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(23,32): error TS2304: Cannot find name 'qwerty'.
|
|
|
|
tests/cases/compiler/unknownSymbols2.ts(29,5): error TS2304: Cannot find name 'asdf'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/unknownSymbols2.ts (10 errors) ====
|
|
|
|
module M {
|
|
|
|
var x: asdf;
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'asdf'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var y = x + asdf;
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'asdf'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var z = <asdf>x; // should be an error
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'asdf'.
|
2014-07-13 01:04:16 +02:00
|
|
|
if (asdf) {
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'asdf'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
else if (qwerty) {
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'qwerty'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
}
|
|
|
|
catch (asdf) { // no error
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (asdf) {
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'asdf'.
|
2014-07-13 01:04:16 +02:00
|
|
|
case qwerty:
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'qwerty'.
|
2014-07-13 01:04:16 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
var a = () => asdf;
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'asdf'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var b = (asdf) => { return qwerty };
|
|
|
|
~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'qwerty'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
module N {
|
|
|
|
var x = 1;
|
|
|
|
}
|
|
|
|
import c = N;
|
|
|
|
import d = asdf;
|
|
|
|
~~~~~~~~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'asdf'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|