Created
July 15, 2011 22:48
-
-
Save mefcorvi/1085737 to your computer and use it in GitHub Desktop.
C# Compiler Bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
namespace ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
new B().Test().Count(); | |
} | |
} | |
class A<T> | |
{ | |
public virtual IEnumerable<T> Test() | |
{ | |
yield return default(T); | |
} | |
} | |
class B : A<int> | |
{ | |
public IEnumerable<int> Test() | |
{ | |
base.Test(); | |
yield return 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment