ternjs / tern_for_sublime

Sublime Text package adding Tern support
MIT License
801 stars 52 forks source link

Javascript: "FunctionDeclaration" error when editing function's return block #110

Closed rbarillec closed 8 years ago

rbarillec commented 8 years ago

Sublime Text v. 2.0.2., build 2221 Mac OSX 10.9.5

How to reproduce:

function foo() {}
function foo(){
   return {}
}
function foo(){
   return {
      a
   }
}

The following exception is thrown:

TypeError: Object # has no method 'FunctionDeclaration'

screen shot 2015-12-24 at 10 39 41 apple_error_log.txt

Cheers, Remi

marijnh commented 8 years ago

I can't reproduce this. What version of Tern are you on?

rbarillec commented 8 years ago

Hi Marijn,

I'm not sure, I may have been using an older version? Let me check with the latest version and get back to you.

rbarillec commented 8 years ago

Hi Marijn,

Updating to the latest version of TernJS seems to have removed the issue. Thanks for your help, marking as closed.

Cheers, Remi