Ticket #3739: 3739.patch

File 3739.patch, 1.2 KB (added by Wiktor Walc, 15 years ago)
  • _source/includes/scriptcompressor.js

     
    387387                        case Token.CALL :
    388388                                var child = node.getFirstChild(),
    389389                                        childType = child.getType(),
    390                                         isFunctionCall = ( childType == Token.FUNCTION || childType == Token.SETPROP || childType == Token.SETELEM );
     390                                        isFunctionCall = ( childType == Token.FUNCTION || childType == Token.SETPROP || childType == Token.SETELEM || childType == Token.SETNAME );
    391391
    392392                                if ( childType == Token.NAME && child.getString() == 'PACKAGER_RENAME' )
    393393                                {
  • test/test.js

     
    2121                [       "function Test( param ) { var myVar = 1; return myVar + param; }; Test( 'Sample' );",
    2222                        "function a(b){var c=1;return c+b;};a('Sample');" ],
    2323
     24                [       "var Test; ( Test = function( rtl ){ return rtl + 'y'; } )(); Test( 'x' );",
     25                        "var a;(a=function(b){return b+'y';})();a('x');" ],
     26
    2427                [       "var result = 6 * 10 / 3 + 4;",
    2528                        "var a=24;" ],
    2629
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy