@ -222,5 +222,17 @@ namespace LocalFunctions
}
public static int LocalFunctionInLambda(IEnumerable<int> xs)
{
return xs.First(delegate(int x) {
return Do();
bool Do()
return x == 3;
});
@ -169,6 +169,11 @@ namespace ICSharpCode.Decompiler.IL.Transforms
if (function.DeclarationScope != null && function.DeclarationScope.Parent is ILFunction betterParentFunction) {
parentFunction.LocalFunctions.Remove(function);
betterParentFunction.LocalFunctions.Add(function);
return function;