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
851
851
852
852
if ( member )
853
853
{
854
+ if (!(member->Grfnop () & fnopBin))
855
+ {
856
+ return m.Fail (node, _u (" Return object member must be an assignment expression" ));
857
+ }
858
+
854
859
ParseNode* field = ParserWrapper::GetBinaryLeft ( member );
855
860
ParseNode* value = ParserWrapper::GetBinaryRight ( member );
856
861
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 987
987
<compile-flags >-forcedeferparse -testtrace:asmjs</compile-flags >
988
988
</default >
989
989
</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 >
990
997
<test >
991
998
<default >
992
999
<files >constbrbug.js</files >
You can’t perform that action at this time.
0 commit comments