linux-packaging-mono/mcs/tests/test-anon-126.cs
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

24 lines
464 B
C#

using System;
using System.Collections.Generic;
namespace MonoBugs
{
public class BrokenGenericCast
{
public static Converter<TSource,TDest> GetUpcaster<TSource, TDest>() where TSource : TDest
{
return delegate(TSource obj) { return obj; };
}
public static Converter<TSource, TDest> GetDowncaster<TSource, TDest>() where TDest : TSource
{
return delegate(TSource obj) { return (TDest)obj; };
}
public static void Main ()
{
}
}
}