Community
Participate
Working Groups
Build ID: I20090426-2000 Steps To Reproduce: This is similar to the bug 253008. Apart from if, while etc. we should consider assert statements also to get boolean methods with higher relevance. e.g. public class TestMain { private int returnA() { return 0;} private boolean returnB() { return false; } public void foo(String... args) { assert ret| } } ( | Ctrl + Space) More information:
Created attachment 135127 [details] Proposed patch Added a case for the AssertStatement to add a boolean as an expected type. Test cases included in the patch.
The fix is not complete. In test case like 'assert foo() : bar|' the assert statement is also the parent node of the assist node.
Created attachment 135526 [details] Updated Patch Updated the patch to include fix and tests for the message part of an assert statement.
Created attachment 135528 [details] Updated Patch Corrected the comments about the fix.
Created attachment 135737 [details] Updated Patch Removed the second part of the fix (expression part of the assert stateement), which should have actually been another bug. At this point, the fix will depend on another bug. Hence removing the second part and the related tests.
Patch looks good. It is too late for 3.5, we should release this fix for 3.6.
Released Jay's fix in HEAD for 3.6 M1.
Verified for 3.6M1 using I20090802-2000 build