Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 536843 - Lexical error ignored - incorrect bytecode generated
Summary: Lexical error ignored - incorrect bytecode generated
Status: CLOSED DUPLICATE of bug 553601
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7.3   Edit
Hardware: PC Windows 10
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-09 10:34 EDT by Michal Ostrowski CLA
Modified: 2023-06-01 05:28 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Ostrowski CLA 2018-07-09 10:34:08 EDT
JDT ignores lexical error and generates bytecode with return statement instead of incorrect line.

Example:
public class Foo {

	public static void subRoutine() {
		foo(bar -> new Baz()))).hereGoesAnything(); // generates return
		System.out.println("2");
	}

	public static void main(String[] args) {
		System.out.println("1");
		subRoutine();
		System.out.println("3");
		foo(bar -> new Baz()))); // generates return
		System.out.println("4");
	}
}
Comment 1 Eclipse Genie CLA 2020-09-05 16:52:34 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 2 Eclipse Genie CLA 2022-09-26 08:30:31 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Srikanth Sankaran CLA 2023-06-01 05:28:22 EDT

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