fork(1) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. static void Main()
  7. {
  8. var x = Enumerable.Range(0, 1).Sum(a);
  9. }
  10.  
  11. private static int a(int a)
  12. {
  13. return Enumerable.Range(0, 1).Sum(b);
  14. }
  15. private static int b(int b)
  16. {
  17. return Enumerable.Range(0, 1).Sum(c);
  18. }
  19. private static int c(int c)
  20. {
  21. return Enumerable.Range(0, 1).Sum(d);
  22. }
  23. private static int d(int d)
  24. {
  25. return Enumerable.Range(0, 1).Sum(e);
  26. }
  27. private static int e(int e)
  28. {
  29. return Enumerable.Range(0, 1).Sum(f);
  30. }
  31. private static int f(int f)
  32. {
  33. return Enumerable.Range(0, 1).Count(g);
  34. }
  35. private static bool g(int g)
  36. {
  37. return true;
  38. }
  39. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(8,44): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int>)' and `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int?>)'
/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error)
prog.cs(13,43): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int>)' and `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int?>)'
/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error)
prog.cs(17,43): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int>)' and `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int?>)'
/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error)
prog.cs(21,43): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int>)' and `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int?>)'
/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error)
prog.cs(25,43): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int>)' and `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int?>)'
/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error)
prog.cs(29,43): error CS0121: The call is ambiguous between the following methods or properties: `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int>)' and `System.Linq.Enumerable.Sum<int>(this System.Collections.Generic.IEnumerable<int>, System.Func<int,int?>)'
/usr/lib/mono/gac/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll (Location of the symbol related to previous error)
Compilation failed: 6 error(s), 0 warnings
stdout
Standard output is empty