Community
Participate
Working Groups
def foo(int param) { var x = 7 x = 8 return param; } class Z { String s; new(String s) { this.s = s; } }
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.