Bug 571271 - [Regression] lambda evaluations with outer variables fails
Summary: [Regression] lambda evaluations with outer variables fails
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.19   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.19 RC1   Edit
Assignee: Gayan Perera CLA
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks: 567801
  Show dependency tree
 
Reported: 2021-02-17 17:16 EST by Gayan Perera CLA
Modified: 2021-02-20 08:18 EST (History)
2 users (show)

See Also:
sarika.sinha: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gayan Perera CLA 2021-02-17 17:16:48 EST
public class EvalTest18 {
	public static void main(String[] args) {
		List<String> strings = Arrays.asList("One", "Two", "Three");
		System.out.println("Count of strings in stream from array =" + strings.stream().count());
		nextMain();
	}
	
	public static void nextMain() {
		int someInt = 22; List<Integer> l = Arrays.asList(1,2,3,4);
		
		System.out.println("Just some int = " + someInt);
		
		for (int i : l ) {
			System.out.println("i = " + i);
		}
	}
	
}

the following evaluation fails

l.stream().filter(j -> j > i+1).count()

Testcase : org.eclipse.jdt.debug.tests.eval.Java8Tests

Introduced in Bug567801
Comment 1 Eclipse Genie CLA 2021-02-17 17:20:51 EST
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.debug/+/176436
Comment 2 Gayan Perera CLA 2021-02-18 03:45:33 EST
@Sarika when i run the Java8Tests there is another test that still fails which is testContextEvaluations. The error message is that about compiler doesn’t implement support. I didn’t have time to look at it closer last night. But i can have a look at it today if you think we should see why it is failing.
Comment 3 Sarika Sinha CLA 2021-02-18 04:28:21 EST
(In reply to Gayan Perera from comment #2)
> @Sarika when i run the Java8Tests there is another test that still fails
> which is testContextEvaluations. The error message is that about compiler
> doesn’t implement support. I didn’t have time to look at it closer last
> night. But i can have a look at it today if you think we should see why it
> is failing.

We have time till next Monday. So it will be good if you can look at it also.
Comment 4 Gayan Perera CLA 2021-02-18 04:37:49 EST
May be we can go-ahead with this issue and i will report another issue for the failing test.
Comment 5 Sarika Sinha CLA 2021-02-18 05:11:25 EST
(In reply to Gayan Perera from comment #4)
> May be we can go-ahead with this issue and i will report another issue for
> the failing test.

We can release the changes after M3 release only, i.e after almost 22 hours.
Comment 7 Sarika Sinha CLA 2021-02-20 08:08:54 EST
(In reply to Gayan Perera from comment #4)
> May be we can go-ahead with this issue and i will report another issue for
> the failing test.

Please report the bug.
Comment 8 Sarika Sinha CLA 2021-02-20 08:09:49 EST
Looks good for RC1.
Comment 9 Gayan Perera CLA 2021-02-20 08:18:45 EST
Issue reported for other problems https://bugs.eclipse.org/bugs/show_bug.cgi?id=571310