fork download
  1. using System;
  2. public class Tester
  3. {
  4. public static void Main()
  5. {
  6. TestError();
  7. }
  8.  
  9. static void Test(Action a) { Console.WriteLine("Action"); }
  10. static void TestError()
  11. {
  12. bool throwException = true;
  13. //Resolves to Test(Action a)
  14. Test(() =>
  15. {
  16. });
  17. //Resolves to Test(Action a)
  18. Test(() =>
  19. {
  20. if (throwException) throw new Exception();
  21. });
  22. //Resolves to Test(Func<int> a) (This seems like a bug since there is no return value)
  23. Test(() =>
  24. {
  25. throw new Exception();
  26. });
  27. }
  28. }
Success #stdin #stdout 0.02s 33848KB
stdin
1
2
10
42
11
stdout
Action
Action
Action