| Summary: | [12][quick fix] exception in switch expression: no "Add throws declaration" proposal | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Stephan Herrmann <stephan.herrmann> |
| Component: | UI | Assignee: | Noopur Gupta <noopur_gupta> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | noopur_gupta |
| Version: | 4.11 | ||
| Target Milestone: | BETA J12 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | 539080, 542558 | ||
| Bug Blocks: | 545120 | ||
Should be handled once new AST is available. This is working with the latest code after AST changes (bug 539080). The "surround with try/catch" proposal results in error. Opened bug 545163. |
This code: void throwing (int i) { int next = switch (i) { case 1 -> 2; default -> throw new Exception(); }; } only triggers a proposal "surround with try/catch", but no proposal "Add throws declaration".