Community
Participate
Working Groups
With annotation-based null analysis enabled, the following program cannot be compiled; the error is: Missing code implementation in the compiler (line 9) import org.eclipse.jdt.annotation.NonNullByDefault; @NonNullByDefault({}) class MyOptional<T> { MyOptional(@org.eclipse.jdt.annotation.Nullable T value) { System.out.println(value); } @NonNullByDefault static void test(Double d) { MyOptional<Double> o2 = new MyOptional<Double>(d); } }
Thanks for the report. Playing with the example I see several problems in how we infer types for allocation expressions. Some are related to null type annotations, some are general problems. I'll try to achieve better test coverage via this bug.
Removing dependency to unblock the other bug.
Test for bug 440462 has a FIXME to be addressed via this bug.
I do have a local git branch with tests and experiments in this area. I should ASAP skim these wip changes to figure out where we stand.
Bulk move: too late for 4.6 M7. Very likely has to be moved out of 4.6 entirely.
Ran out of time for 4.7. Bulk move to 4.8.
bulk move out of 4.8
New Gerrit change created: https://git.eclipse.org/r/128086
(In reply to Eclipse Genie from comment #8) > New Gerrit change created: https://git.eclipse.org/r/128086 I retrieved the local branch mentioned above from an old machine and only draftily resolved merge conflicts. To take stock during 4.10.
I thoroughly dropped the ball here. comment 0 is no longer a problems since 4.4.1 I have no clue what problems I was seeing in comment 1. The fixme mentioned in comment 3 is *not* resolved by https://git.eclipse.org/r/128086 Marking status vs. the original problem comment 0