2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/conformance/classes/nestedClassDeclaration.ts (8 errors) ====
|
|
|
|
// nested classes are not allowed
|
|
|
|
|
|
|
|
class C {
|
|
|
|
x: string;
|
|
|
|
class C2 {
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1128: Declaration or statement expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
function foo() {
|
|
|
|
class C3 {
|
|
|
|
~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1129: Statement expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1128: Declaration or statement expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
var x = {
|
|
|
|
class C4 {
|
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1005: ':' expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1005: ',' expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2304: Cannot find name 'C4'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS1128: Declaration or statement expected.
|
2014-07-13 01:04:16 +02:00
|
|
|
|