ternjs / tern

A JavaScript code analyzer for deep, cross-editor language support
https://ternjs.net/
MIT License
4.25k stars 378 forks source link

Wrong completions for a closure #1019

Open satyaa21 opened 5 years ago

satyaa21 commented 5 years ago

Steps to reproduce:

  1. Open https://codemirror.net/demo/tern.html
  2. Paste below code
    return {
    obj: {
      prop1: "2",
      prop2: "3"
    },
    func: function() {
      function innerFn() {
        this.obj.
      }
    }
    }
  3. Press "Ctrl+space" at "this.obj." image

Expected. No completions Actual: Invalid completions are shows