icsharpcode/NRefactory — pull request #179 by luiscubal (2013-04-29 21:39:45+00:00)
Title: Handle type inference ExtractFieldAction

Previously, statements such as "var i = 0;" would extract the field "var i;" which is incorrect.
Now, ExtractFieldAction will attempt to infer the type of the expression for "var x = y;" declarations.
I've also added a few unit tests to show this problem. All previous ExtractFieldTests pass.

I've copied the ContainsAnonymousType method. Since it's also used in UseExplicitTypeAction, perhaps it'd be better to isolate it and implement it only once to avoid unnecessary repetition? If so, where should I put it?