tern icon indicating copy to clipboard operation
tern copied to clipboard

Typing class in a file that has export default class causes a crash

Open abepark01 opened this issue 6 years ago • 0 comments

OSX 10.14.3 neovim 0.34.0 Tern 0.23

Steps to reproduce

  1. create a class via export default class
  2. type the word class to create a new class in the same file.
  3. tern will crash
  4. typing class AFTER the export default class does not cause a crash.
import React, { Component } from 'react';

class 
^^^^^ causes crash
export default class ChatMessageGroup extends Component {
  render() {
    return (<p>OK</p>);
  }
}

Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _boo tstrap_inner self.run() File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "/Users/abe/.vim/bundle/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 318, in completation data = self.run_command(command, pos) File "/Users/abe/.vim/bundle/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 259, in run_command data = self.make_request(doc, silent) File "/Users/abe/.vim/bundle/deoplete-ternjs/rplugin/python3/deoplete/sources/ternjs.py", line 227, in make_request req = opener.open(self._url, payload) File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 543, in _open '_open', req) File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1345, i n http_open return self.do_open(http.client.HTTPConnection, req) File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1320, i n do_open r = h.getresponse() File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1321, in g etresponse response.begin() File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 296, in be gin version, status, reason = self._read_status() File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 265, in _r ead_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response```

abepark01 avatar Mar 26 '19 21:03 abepark01