@@ -2040,41 +2040,6 @@ namespace ts {
2040
2040
}
2041
2041
2042
2042
function bindObjectLiteralExpression ( node : ObjectLiteralExpression ) {
2043
- const enum ElementKind {
2044
- Property = 1 ,
2045
- Accessor = 2
2046
- }
2047
-
2048
- if ( inStrictMode && ! isAssignmentTarget ( node ) ) {
2049
- const seen = new Map < __String , ElementKind > ( ) ;
2050
-
2051
- for ( const prop of node . properties ) {
2052
- if ( prop . kind === SyntaxKind . SpreadAssignment || prop . name . kind !== SyntaxKind . Identifier ) {
2053
- continue ;
2054
- }
2055
-
2056
- const identifier = prop . name ;
2057
-
2058
- // ECMA-262 11.1.5 Object Initializer
2059
- // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true
2060
- // a.This production is contained in strict code and IsDataDescriptor(previous) is true and
2061
- // IsDataDescriptor(propId.descriptor) is true.
2062
- // b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true.
2063
- // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true.
2064
- // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true
2065
- // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields
2066
- const currentKind = prop . kind === SyntaxKind . PropertyAssignment || prop . kind === SyntaxKind . ShorthandPropertyAssignment || prop . kind === SyntaxKind . MethodDeclaration
2067
- ? ElementKind . Property
2068
- : ElementKind . Accessor ;
2069
-
2070
- const existingKind = seen . get ( identifier . escapedText ) ;
2071
- if ( ! existingKind ) {
2072
- seen . set ( identifier . escapedText , currentKind ) ;
2073
- continue ;
2074
- }
2075
- }
2076
- }
2077
-
2078
2043
return bindAnonymousDeclaration ( node , SymbolFlags . ObjectLiteral , InternalSymbolName . Object ) ;
2079
2044
}
2080
2045
0 commit comments