Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

C#

Found this on a stackoverflow question stackoverflow question:

using System;
using System.Linq;
public class Test
{
 public static void Main()
 {
 Enumerable.Range(0, 1).Sum(a =>
 Enumerable.Range(0, 1).Sum(b =>
 Enumerable.Range(0, 1).Sum(c =>
 Enumerable.Range(0, 1).Sum(d =>
 Enumerable.Range(0, 1).Sum(e =>
 Enumerable.Range(0, 1).Sum(f =>
 Enumerable.Range(0, 1).Count(g => true)))))));
 }
}

The compiler eventually will crash.

The issue seems related to type inference and/or lambda generation combined with overload resolution.

C#

Found this on a stackoverflow question:

using System;
using System.Linq;
public class Test
{
 public static void Main()
 {
 Enumerable.Range(0, 1).Sum(a =>
 Enumerable.Range(0, 1).Sum(b =>
 Enumerable.Range(0, 1).Sum(c =>
 Enumerable.Range(0, 1).Sum(d =>
 Enumerable.Range(0, 1).Sum(e =>
 Enumerable.Range(0, 1).Sum(f =>
 Enumerable.Range(0, 1).Count(g => true)))))));
 }
}

The compiler eventually will crash.

The issue seems related to type inference and/or lambda generation combined with overload resolution.

C#

Found this on a stackoverflow question:

using System;
using System.Linq;
public class Test
{
 public static void Main()
 {
 Enumerable.Range(0, 1).Sum(a =>
 Enumerable.Range(0, 1).Sum(b =>
 Enumerable.Range(0, 1).Sum(c =>
 Enumerable.Range(0, 1).Sum(d =>
 Enumerable.Range(0, 1).Sum(e =>
 Enumerable.Range(0, 1).Sum(f =>
 Enumerable.Range(0, 1).Count(g => true)))))));
 }
}

The compiler eventually will crash.

The issue seems related to type inference and/or lambda generation combined with overload resolution.

Source Link
Alberto
  • 405
  • 3
  • 7

C#

Found this on a stackoverflow question:

using System;
using System.Linq;
public class Test
{
 public static void Main()
 {
 Enumerable.Range(0, 1).Sum(a =>
 Enumerable.Range(0, 1).Sum(b =>
 Enumerable.Range(0, 1).Sum(c =>
 Enumerable.Range(0, 1).Sum(d =>
 Enumerable.Range(0, 1).Sum(e =>
 Enumerable.Range(0, 1).Sum(f =>
 Enumerable.Range(0, 1).Count(g => true)))))));
 }
}

The compiler eventually will crash.

The issue seems related to type inference and/or lambda generation combined with overload resolution.

AltStyle によって変換されたページ (->オリジナル) /