a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
24 lines
464 B
C#
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 ()
|
|
{
|
|
}
|
|
}
|
|
}
|
|
|