diff options
author | Marek Safar <marek.safar@gmail.com> | 2016-03-09 21:07:15 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2016-03-09 21:07:15 +0300 |
commit | e3e63bd4cafa34914c35292f42affd9c8976cf0d (patch) | |
tree | 8d708c8f69341e44e7a32a66265b1038f90798ee | |
parent | 323eeecdf13c39527c53efa5f6c8487765ee42c0 (diff) | |
parent | c560abdf1dd7d3f027745c8836d3772a2268ec65 (diff) |
Merge branch 'master' of github.com:jfrijters/ikdasm
-rw-r--r-- | Disassembler.cs | 15 | ||||
-rw-r--r-- | IKVM.Reflection.dll | bin | 458752 -> 462848 bytes | |||
-rw-r--r-- | IL.cs | 4 |
3 files changed, 16 insertions, 3 deletions
diff --git a/Disassembler.cs b/Disassembler.cs index 646380c..79ae69d 100644 --- a/Disassembler.cs +++ b/Disassembler.cs @@ -967,18 +967,26 @@ namespace Ildasm lw.Write(".ctor "); } string sep2 = "("; - foreach (var constraint in par.GetGenericParameterConstraints()) + Type[] constraints = par.GetGenericParameterConstraints(); + CustomModifiers[] customModifiers = par.__GetGenericParameterConstraintCustomModifiers(); + for (int j = 0; j < constraints.Length; j++) { + Type constraint = constraints[j]; lw.Write(sep2); sep2 = ", "; if (constraint.__IsMissing || !constraint.IsGenericType) { + if (!customModifiers[j].IsEmpty && !constraint.IsGenericParameter) + { + lw.Write(constraint.IsValueType ? "valuetype " : "class "); + } WriteTypeDefOrRef(lw, constraint); } else { WriteSignatureType(lw, constraint); } + WriteCustomModifiers(lw, customModifiers[j]); } if (sep2 != "(") { @@ -2635,7 +2643,10 @@ namespace Ildasm void WriteCustomAttributeImpl(LineWriter lw, CustomAttributeData ca, bool comment, int level0) { - lw.Write("instance void "); + lw.Write("instance "); + WriteSignatureType(lw, ca.Constructor.__ReturnParameter.ParameterType); + WriteCustomModifiers(lw, ca.Constructor.__ReturnParameter.__GetCustomModifiers()); + lw.Write(" "); WriteTypeDefOrRef(lw, ca.Constructor.DeclaringType); lw.Write("::.ctor("); int level = lw.Column; diff --git a/IKVM.Reflection.dll b/IKVM.Reflection.dll Binary files differindex 6353a61..1c97fd4 100644 --- a/IKVM.Reflection.dll +++ b/IKVM.Reflection.dll @@ -714,7 +714,9 @@ namespace Ildasm WriteCallingConvention(lw, mb.CallingConvention); if (mb is ConstructorInfo) { - lw.Write("void "); + WriteSignatureType(lw, ((ConstructorInfo)mb).__ReturnParameter.ParameterType); + WriteCustomModifiers(lw, ((ConstructorInfo)mb).__ReturnParameter.__GetCustomModifiers()); + lw.Write(" "); } else { |