Bug 51506

Summary: C# compiler fails for constrained generics with yield return
Product: [Mono] Compilers Reporter: Josh Peterson <joshuap>
Component: C#Assignee: Marek Safar <masafa>
Severity: normal CC: mono-bugs+mono
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: C# file to demonstrate the bug

Description Josh Peterson 2017-01-13 13:36:36 UTC
Created attachment 19322 [details]
C# file to demonstrate the bug

The attached C# code fails to compile with this error:

Program.cs(16,2): error CS0314: The type `TVector' cannot be used as type parameter `T' in the generic type or method `Program.BoundingBoxN<T>'. There is no boxing or type parameter conversion from `TVector' to `Program.IVector<TVector>'
D:\scratch\ScratchCSharpProject\ScratchCSharpProject\Program.cs(58,29): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings

The same code compiles with the Microsoft C# Compiler.