diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2006-10-25 19:24:02 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2006-10-25 19:24:02 +0400 |
commit | 5870949f009bd65f5f5e1d2ed4efd975bc23d0af (patch) | |
tree | 070ad9e2dde2825d9496344e3bb93c69ada8fdfe /mcs/tests/gtest-295.cs | |
parent | f474fceb4ec72d3a551e6716545242f14fdf5d0b (diff) |
In gmcs:
2006-10-25 Brian Crowell <brian@fluggo.com>
Fix #79703
* generic.cs (CheckConstraints): Allow generic parameters with
inheritance constraints to satisfy reference type constraints.
In tests:
2006-10-25 Brian Crowell <brian@fluggo.com>
* gtest-295.cs: New test from #79703.
svn path=/trunk/mcs/; revision=66954
Diffstat (limited to 'mcs/tests/gtest-295.cs')
-rw-r--r-- | mcs/tests/gtest-295.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mcs/tests/gtest-295.cs b/mcs/tests/gtest-295.cs new file mode 100644 index 00000000000..09a98cd3387 --- /dev/null +++ b/mcs/tests/gtest-295.cs @@ -0,0 +1,13 @@ +namespace Test { + class Cache<T> where T : class { + } + + class Base { + } + + class MyType<T> where T : Base { + Cache<T> _cache; // CS0452 + } + + class Foo { static void Main () { object foo = new MyType<Base> (); } } +} |