| Summary: | [xtend] Warning for private fields / local variables that are never read but only written | ||
|---|---|---|---|
| Product: | [Tools] Xtend | Reporter: | Sebastian Zarnekow <sebastian.zarnekow> |
| Component: | Core | Assignee: | Project Inbox <xtend-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | Holger.Schill, sven.efftinge |
| Version: | 2.2.0 | Flags: | sebastian.zarnekow:
juno+
|
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | 404167 | ||
| Bug Blocks: | |||
I think we need some more infrastructure for that. It would be doable without that but I am afraid the code would become complicated. Just to clarify what I meant by infrastructure: Moritz showed me how he did control flow analysis for a customer based on a control-flow model. That looked quite comprehensive and simple to use. I just would like to have something similar and do the analysis for this feature enhancement based on that. Not a big deal, though. I don't think that this is actually a complicated thing. Wouldn't it be sufficient to collect all references to a local variable, remove every location that's on the left hand of an assignment (only written) and check for remaining references (the readers)? Did I miss something? (In reply to comment #3) > Did I miss something? My comment maybe ;-) I said it's not a big deal, but I want to build something which we can use to solve these kine of problems. (In reply to comment #4) > I said it's not a big deal, but I want to build something which we can use to > solve these kine of problems. Yeah this 'something' was a little blurry to me since the solution for this particular problem was so obvious to me. I cannot image that some infrastructure will simpify that further. |
def foo(int param) { var x = 7 x = 8 return param; } class Z { String s; new(String s) { this.s = s; } }