File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -851,6 +851,11 @@ namespace Js
851851
852852 if ( member )
853853 {
854+ if (!(member->Grfnop () & fnopBin))
855+ {
856+ return m.Fail (node, _u (" Return object member must be an assignment expression" ));
857+ }
858+
854859 ParseNode* field = ParserWrapper::GetBinaryLeft ( member );
855860 ParseNode* value = ParserWrapper::GetBinaryRight ( member );
856861 if ( !ParserWrapper::IsNameDeclaration ( field ) || !ParserWrapper::IsNameDeclaration ( value ) )
Original file line number Diff line number Diff line change 1+ Return object member must be an assignment expression
2+ Asm.js compilation failed.
Original file line number Diff line number Diff line change 1+ //-------------------------------------------------------------------------------------------------------
2+ // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
3+ // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+ //-------------------------------------------------------------------------------------------------------
5+
6+ function f ( ) {
7+ "use asm" ;
8+ return { ...a , b } ;
9+ }
Original file line number Diff line number Diff line change 987987 <compile-flags >-forcedeferparse -testtrace:asmjs</compile-flags >
988988 </default >
989989 </test >
990+ <test >
991+ <default >
992+ <files >notBinaryPropertyDefinition.js</files >
993+ <baseline >notBinaryPropertyDefinition.baseline</baseline >
994+ <compile-flags >-ES2018ObjectRestSpread -testtrace:asmjs</compile-flags >
995+ </default >
996+ </test >
990997 <test >
991998 <default >
992999 <files >constbrbug.js</files >
You can’t perform that action at this time.
0 commit comments