This makes parsing of these constructs the same whether they are in an object literal or a class. This is important for incrementla parsing for knowing if we can reuse these nodes if we run into them.
27 lines
No EOL
1.2 KiB
Text
27 lines
No EOL
1.2 KiB
Text
tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,15): error TS1005: ']' expected.
|
|
tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,23): error TS1005: ',' expected.
|
|
tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,24): error TS1136: Property assignment expected.
|
|
tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,32): error TS1005: ':' expected.
|
|
tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(5,1): error TS1128: Declaration or statement expected.
|
|
|
|
|
|
==== tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts (5 errors) ====
|
|
// private indexers not allowed
|
|
|
|
var x = {
|
|
private [x: string]: string;
|
|
~
|
|
!!! error TS1005: ']' expected.
|
|
~
|
|
!!! error TS1005: ',' expected.
|
|
~
|
|
!!! error TS1136: Property assignment expected.
|
|
~
|
|
!!! error TS1005: ':' expected.
|
|
}
|
|
~
|
|
!!! error TS1128: Declaration or statement expected.
|
|
|
|
var y: {
|
|
private[x: string]: string;
|
|
} |