blob: c460f434d74082b8eaaa5b20722e36154e417233 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
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 ()
{
}
}
}
|