diff options
Diffstat (limited to 'mcs/class/corlib/Test/System/AttributeTest.cs')
-rw-r--r-- | mcs/class/corlib/Test/System/AttributeTest.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mcs/class/corlib/Test/System/AttributeTest.cs b/mcs/class/corlib/Test/System/AttributeTest.cs index f8fe8cd7a0..10fb4fcbce 100644 --- a/mcs/class/corlib/Test/System/AttributeTest.cs +++ b/mcs/class/corlib/Test/System/AttributeTest.cs @@ -88,6 +88,13 @@ namespace MonoTests.System class MyDerivedClassNoAttribute : MyClass { } + + internal class AttributeWithTypeId : Attribute + { + public override object TypeId { + get { return this; } + } + } } [TestFixture] @@ -998,6 +1005,14 @@ namespace MonoTests.System MyOwnCustomAttribute b1 = new MyOwnCustomAttribute (null); Assert.AreNotEqual (a1.GetHashCode (), b1.GetHashCode (), "non-identical-types"); } + + [Test] + public void GetHashCodeWithOverriddenTypeId () + { + //check for not throwing stack overflow exception + AttributeWithTypeId a = new AttributeWithTypeId (); + a.GetHashCode (); + } } namespace ParamNamespace { |