Revert baseline changes to the objectTypeLiteralSyntax2 test
This commit is contained in:
parent
d9d67d9003
commit
e363c7582b
2 changed files with 8 additions and 12 deletions
|
@ -2248,10 +2248,12 @@ namespace ts {
|
|||
property.questionToken = questionToken;
|
||||
property.type = parseTypeAnnotation();
|
||||
|
||||
// Although object type properties cannot not have initializers, we attempt to parse an initializer
|
||||
// so we can report in the checker that an interface property or object type literal property cannot
|
||||
// have an initializer.
|
||||
property.initializer = parseNonParameterInitializer();
|
||||
if (token === SyntaxKind.EqualsToken) {
|
||||
// Although object type properties cannot not have initializers, we attempt
|
||||
// to parse an initializer so we can report in the checker that an interface
|
||||
// property or object type literal property cannot have an initializer.
|
||||
property.initializer = parseNonParameterInitializer();
|
||||
}
|
||||
|
||||
parseTypeMemberSemicolon();
|
||||
return finishNode(property);
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts(12,22): error TS1005: '=' expected.
|
||||
tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts(12,22): error TS2304: Cannot find name 'bar'.
|
||||
tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts(12,25): error TS1005: ';' expected.
|
||||
tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts(12,22): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts (3 errors) ====
|
||||
==== tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts (1 errors) ====
|
||||
var x: {
|
||||
foo: string,
|
||||
bar: string
|
||||
|
@ -17,8 +15,4 @@ tests/cases/conformance/types/objectTypeLiteral/objectTypeLiteralSyntax2.ts(12,2
|
|||
|
||||
var z: { foo: string bar: string }
|
||||
~~~
|
||||
!!! error TS1005: '=' expected.
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'bar'.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
Loading…
Reference in a new issue