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

Bug 493914

Summary: [es6] Exceptions for incomplete export statement
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: 12.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Rennie CLA 2016-05-18 11:24:57 EDT
Using the snippet:

export

if you try to use the tools (hover, assist, etc), the log will fill with exceptions.

Uncaught TypeError: Cannot read property 'name' of undefined
walk.simple.ExportNamedDeclaration @ es_modules.js:63c 
skipThrough @ walk.js:170c 
base.Program.base.BlockStatement @ walk.js:181c
simple @ walk.js:41
connectModule @ es_modules.js:27
signal @ signal.js:28
(anonymous function) @ modules.js:383
signal @ signal.js:28
(anonymous function) @ tern.js:293
exports.withContext @ infer.js:881
analyzeFile @ tern.js:289
analyzeAll @ tern.js:402
doRequest @ tern.js:267
signal.mixin.request @ tern.js:168
handlers.documentation @ ternWorkerCore.js:246
onmessage @ ternWorkerCore.js:531
Comment 1 Michael Rennie CLA 2016-05-18 11:49:55 EDT
A better snippet to test with:

export for

showcases the problem if there being a decl node (which can be null per the spec), but is not a valid decl node.

Fixed in:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e8da4052413755b939cfee422eebc1df82888da8