Bug 507629 - [9] Implement new definite assignment rules for lambdas
Summary: [9] Implement new definite assignment rules for lambdas
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: helpwanted
: 532850 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-11-16 13:41 EST by Stephan Herrmann CLA
Modified: 2022-07-26 17:07 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2016-11-16 13:41:43 EST
See https://bugs.openjdk.java.net/browse/JDK-8043176

Spec for definite assignment did not properly handle lambdas which has been fixed for Java 9.
Comment 1 Stephan Herrmann CLA 2018-03-04 13:18:18 EST
bulk move to 4.8 M7
Comment 2 Stephan Herrmann CLA 2018-03-23 20:10:38 EDT
*** Bug 532850 has been marked as a duplicate of this bug. ***
Comment 3 Manoj N Palat CLA 2018-08-16 00:07:03 EDT
Bulk move out of 4.9
Comment 4 Nir Lisker CLA 2019-03-29 17:27:17 EDT
Is it possible that this has been fixed? The place where Iv'e seen this bug manifest in the code does not report an error anymore.
Comment 5 Stephan Herrmann CLA 2019-04-02 12:40:32 EDT
(In reply to Nir Lisker from comment #4)
> Is it possible that this has been fixed? The place where Iv'e seen this bug
> manifest in the code does not report an error anymore.

Not that I know of. Can you give an example where ecj's behavior has changed?
Comment 6 Nir Lisker CLA 2019-04-02 22:56:42 EDT
Actually I had a mistake in my test. The bug still exists. Sorry.
Comment 7 Stephan Herrmann CLA 2019-04-03 16:55:41 EDT
(In reply to Nir Lisker from comment #6)
> Actually I had a mistake in my test. The bug still exists. Sorry.

Also a failing test would be helpful, if you can share it.
Comment 8 Nir Lisker CLA 2019-04-04 00:08:21 EDT
The test case I use is:

public class Test {

    final Object o;
    
    Runnable runnable = () -> Test.this.o.toString(); // error here

    public Test() {
        o = new Object();
    }
}

Error on `o`: The blank final field o may not have been initialized

If `o` is not made final then there is no error.

I think that the duplicate bug 532850 shows the same.
Comment 9 Eclipse Genie CLA 2022-07-26 13:58: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 10 Nir Lisker CLA 2022-07-26 17:07:07 EDT
Bug still exists. This is the corresponding JDK ticket for Javac: https://bugs.openjdk.org/browse/JDK-8289777