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

Bug 570248

Summary: [DOM AST] DOM AST support for Local Enums
Product: [Eclipse Project] JDT Reporter: Kalyan Prasad Tatavarthi <kalyan_prasad>
Component: CoreAssignee: Sarika Sinha <sarika.sinha>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sarika.sinha, Vikas.Chandra
Version: 4.18   
Target Milestone: BETA J16   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/174683
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=3679deb06ddea0b31023bd528ae01894ca7ba4c8
Whiteboard:
Bug Depends on:    
Bug Blocks: 570245    

Description Kalyan Prasad Tatavarthi CLA 2021-01-11 07:51:22 EST
In the code below

public class Cls1 {

	public static void main(String[] args) {
		class C1 {
			
		}
		
		enum Y1 {
				
				BLEU,
				BLANC,
				ROUGE;
				
				public static void main(String[] args) {
					for(Y1 y: Y1.values()) {
						System.out.print(y);
					}
				}
				
		}
		Y1.main(args);
	}
}

for the local enum Y1, ast is not gtetting created. This can be seen in the ASTView.
Comment 1 Sarika Sinha CLA 2021-01-12 01:39:22 EST
ASTConverter needs to handle this.
Comment 2 Eclipse Genie CLA 2021-01-12 03:18:29 EST
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/174683
Comment 4 Noopur Gupta CLA 2021-01-22 07:42:42 EST
*** Bug 570245 has been marked as a duplicate of this bug. ***