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

Bug 473861

Summary: eslint no-fallthrough rule mutates the backing AST
Product: [ECD] Orion Reporter: Michael Rennie <Michael_Rennie>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3    
Version: 10.0   
Target Milestone: 10.0   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Rennie CLA 2015-07-29 12:07:14 EDT
Consider the following snippet:

var tag = {};
switch(tag.title) {
    case 'name': {
        tag.name;
        break;
    }
    case 'return': {
        tag.description;
        break;
    }
    case 'throws': {
    	tag.description;
    	break;
    }
    case 'see': {
    	tag.type;
    	break;
    }
}

1. turn on linting rule to detect switch case fallthroughs
2. turn on occurrences
3. make a change to the snippet (to have it parse + lint again)
4. select 'tag' in the second case statement

Notice that no occurrences are marked in any of the case statements, except the last one.