Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 473786

Summary: [tern] Indexed types with full function decls as params cause weird proposal formatting
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 10.0   
Target Milestone: 10.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2015-07-28 16:28:57 EDT
Consider the given ecma5 function (from its index):

"filter": {
        "!type": "fn(test: fn(elt: ?, i: number) -> bool, context?: ?) -> !this",
        "!effects": [
          "call !0 this=!1 !this.<i> number"
        ],
        "!url": "https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/filter",
        "!doc": "Creates a new array with all elements that pass the test implemented by the provided function."
      },

When we try parsing it to compute the formatted params and offsets, we get a mixed up proposal that looks like:

filter(test,  -> boolcontext?)