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

Bug 494225

Summary: Entries in LVT and LVTT missing for unused locals inside lambda
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED DUPLICATE QA Contact: Stephan Herrmann <stephan.herrmann>
Severity: normal    
Priority: P3 CC: loskutov, manoj.palat
Version: 4.6   
Target Milestone: 4.8   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/73347
Whiteboard:

Description Stephan Herrmann CLA 2016-05-21 06:01:48 EDT
If a local variable inside a lambda is unused, even when compiling with -g and -preserveAllLocals, no entries are generated into LocalVariableTable and LocalVariableTypeTable
Comment 1 Eclipse Genie CLA 2016-05-21 06:18:38 EDT
New Gerrit change created: https://git.eclipse.org/r/73347
Comment 2 Stephan Herrmann CLA 2016-05-21 06:20:07 EDT
(In reply to Eclipse Genie from comment #1)
> New Gerrit change created: https://git.eclipse.org/r/73347

Failing test

Interestingly, LVT is generated for the first of two unused locals, but not for the last. Additionally pc positions are slightly of for those unused locals.
Comment 3 Andrey Loskutov CLA 2018-01-05 07:24:49 EST
(In reply to Stephan Herrmann from comment #2)
> (In reply to Eclipse Genie from comment #1)
> > New Gerrit change created: https://git.eclipse.org/r/73347
> 
> Failing test
> 
> Interestingly, LVT is generated for the first of two unused locals, but not
> for the last. Additionally pc positions are slightly of for those unused
> locals.

This is a more generic bug pattern, see bug 529450.
Comment 4 Stephan Herrmann CLA 2018-01-05 07:27:52 EST

*** This bug has been marked as a duplicate of bug 529450 ***