diff options
author | Daniel Grunwald <daniel@danielgrunwald.de> | 2015-06-05 23:23:22 +0300 |
---|---|---|
committer | Daniel Grunwald <daniel@danielgrunwald.de> | 2015-06-05 23:23:22 +0300 |
commit | 86856e9b11ff54b83a37df40085f4cc0075fe39d (patch) | |
tree | e720baa926265b7fd654d17639ad6a85e77d51c4 /ICSharpCode.NRefactory.Tests | |
parent | bca19467216413851d9ffd2d1135d159a030fa42 (diff) |
IkvmLoader: fix attributes on type parameters
Diffstat (limited to 'ICSharpCode.NRefactory.Tests')
-rw-r--r-- | ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs | 2 | ||||
-rw-r--r-- | ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs b/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs index 9fcb4c73..772fb7be 100644 --- a/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs +++ b/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.TestCase.cs @@ -454,6 +454,8 @@ namespace ICSharpCode.NRefactory.TypeSystem.TestCase class Inner {} } } + + public class ClassWithAttributeOnTypeParameter<[Double(2)] T> {} [Guid ("790C6E0B-9194-4cc9-9426-A48A63185696"), InterfaceType (ComInterfaceType.InterfaceIsDual)] [ComImport] diff --git a/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs b/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs index b2e223b7..6939220f 100644 --- a/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs +++ b/ICSharpCode.NRefactory.Tests/TypeSystem/TypeSystemTests.cs @@ -1500,5 +1500,13 @@ namespace ICSharpCode.NRefactory.TypeSystem var inner2MyAttr = attributedInner2.Attributes.Single(a => a.AttributeType.Name == "MyAttribute"); Assert.AreEqual(myAttribute2, inner2MyAttr.AttributeType); } + + [Test] + public void ClassWithAttributeOnTypeParameter() + { + var tp = GetTypeDefinition(typeof(ClassWithAttributeOnTypeParameter<>)).TypeParameters.Single(); + var attr = tp.Attributes.Single(); + Assert.AreEqual("DoubleAttribute", attr.AttributeType.Name); + } } } |