提交 c3050dec 编写于 作者: N Neal Gafter

Add a test for capturing a range variable.

上级 8b3df77c
......@@ -4580,11 +4580,13 @@ public static void Main(int[] data)
var f2 = from a in data select a + y;
var f3 = from a in data where x > 0 select a;
var f4 = from a in data let b = 1 select /*<bind>*/a + b/*</bind>*/;
var f5 = from c in data where M(() => c) select c;
}
}
private static bool M(Func<int> f) => true;
}");
var dataFlowAnalysisResults = analysisResults;
Assert.Equal("y, x", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured));
Assert.Equal("y, x, c", GetSymbolNamesJoined(dataFlowAnalysisResults.Captured));
}
#endregion query expressions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册