From 6342641c789340fde3416b513ffb43bda62c2df7 Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Tue, 29 Jun 2010 20:58:15 +0000 Subject: [PATCH] 2010-06-29 Rodrigo Kumpera * TypeTest.cs: Add tests for #612780. svn path=/trunk/mcs/; revision=159695 --- mcs/class/corlib/Test/System/ChangeLog | 4 ++++ mcs/class/corlib/Test/System/TypeTest.cs | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/mcs/class/corlib/Test/System/ChangeLog b/mcs/class/corlib/Test/System/ChangeLog index ffc9f8e4783..a90cf0ab6bc 100644 --- a/mcs/class/corlib/Test/System/ChangeLog +++ b/mcs/class/corlib/Test/System/ChangeLog @@ -1,3 +1,7 @@ +2010-06-29 Rodrigo Kumpera + + * TypeTest.cs: Add tests for #612780. + 2010-06-29 Sebastien Pouliot * AttributeTest.cs: Add test cases for GetHashCode diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs index dc3b50836dc..16ca22a305c 100644 --- a/mcs/class/corlib/Test/System/TypeTest.cs +++ b/mcs/class/corlib/Test/System/TypeTest.cs @@ -3321,6 +3321,26 @@ PublicKeyToken=b77a5c561934e089")); public int field; } + [Test] // Bug #612780 + public void CannotMakeDerivedTypesFromTypedByRef () + { + try { + typeof (System.TypedReference).MakeArrayType (); + Assert.Fail ("#1"); + } catch (TypeLoadException) { } + + try { + typeof (System.TypedReference).MakeByRefType (); + Assert.Fail ("#2"); + } catch (TypeLoadException) { } + + try { + typeof (System.TypedReference).MakePointerType (); + Assert.Fail ("#3"); + } catch (TypeLoadException) { } + + } + #if NET_4_0 interface IGetInterfaceMap { -- 2.11.4.GIT