Results 1 to 3 of 3

Thread: Cmd 6.7 doesn't support object spread

  1. #1
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,247

    Default Cmd 6.7 doesn't support object spread

    Consider the following two code snippets:

    Code:
    const o = { a: 1, b: 2, c: 3, d: 4 };
    const { a, b, ...rest } = o;
    When compiled, the following exception is thrown:

    Code:
    [ERR] BUILD FAILED
    [ERR] java.lang.ClassCastException: com.sencha.tools.compiler.ast.js.RestParameter cannot be cast to com.sencha.tools.compiler.ast.js.ObjectProperty
    [ERR]   at net.sf.antcontrib.logic.IfTask.exe
    Code:
    const o = { a: 1, b: 2, c: 3, d: 4 };
    const copy = { ...o, a: 100 };
    When compiled, the following exception is thrown:

    Code:
    [ERR] java.lang.ClassCastException: com.sencha.tools.compiler.ast.js.SpreadExpression cannot be cast to com.sencha.tools.compiler.ast.js.ObjectProperty
    [ERR]   at net.sf.antcontrib.logic.IfTask.
    [ERR] execute(IfTask.java:197)
    Please fix it.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  2. #2
    Ext Support Team
    Join Date
    Jan 2018
    Posts
    569

    Default

    Hi,

    The fix for this issue is available in the next release of 6.7 and this should be available soon.

    Regards
    Kumar

  3. #3

    Default

    Quote Originally Posted by rakumar View Post
    Hi,

    The fix for this issue is available in the next release of 6.7 and this should be available soon.

    Regards
    Kumar
    not fixed in Sencha Cmd v6.7.0.63
    [ERR] C2001: Closure Compiler Error (This language feature is only supported for ECMASCRIPT2018 mode or better: object literals with spread.) -- compression-input:302202:20



    mode is
    "js": {
    "input": "ES8",
    "output": "ES5"
    }

Similar Threads

  1. Object doesn't support this property or method
    By xjpmauricio in forum Ext 3.x: Help & Discussion
    Replies: 12
    Last Post: 22 Oct 2010, 3:21 AM
  2. Object doesn't support this property or method
    By dotcomuser in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 15 Jan 2010, 3:26 AM
  3. Object doesn't support this property or method
    By Ash2009 in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Sep 2009, 9:54 AM
  4. Object doesn't support this property or method in ext-base.js
    By dorgan in forum Ext 2.x: Help & Discussion
    Replies: 9
    Last Post: 27 Dec 2007, 2:32 PM
  5. FormUpdate: Object Doesn't Support This Property
    By Domitian in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 30 May 2007, 11:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •