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

Bug 511883

Summary: Cannot remove unused ClassDeclaration
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 13.0   
Target Milestone: 14.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Michael Rennie CLA 2017-02-07 23:36:44 EST
Consider the following snippet:

class FooBar {
	constructor() {
		this.doIt = function doIt() {console.log("made a class!");};
	}
}

in the editor, FooBar will be tagged as being unused. If you try to use the quickfix, nothing happens.

ClassExpressions do not automatically export into the global scope, so if it is not instantiated or exported, the fix is legit and should remove the class (if clicked)
Comment 1 Michael Rennie CLA 2017-02-07 23:51:27 EST
Typo'd that, I meant to say 'ClassDeclaration' not 'ClassExpression'