diff options
author | Zoltan Varga <vargaz@gmail.com> | 2020-03-28 22:14:18 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-28 22:14:18 +0300 |
commit | 8362227c5ba876d9ab3bcd765ca9e1921b2dafa0 (patch) | |
tree | 90984e37d2940421936eaeab51f28607c8c565ab | |
parent | 9f805dcf8a87f46c0c5ef01e8468e92af2c2ef47 (diff) | |
parent | 26a033ed9de36f462946232a9b1b7984618c5e1f (diff) |
Merge pull request #16 from vargaz/fix-type-init
Pass DeclaredOnly to GetConstructorImpl (). This fixes crashes when running ikdasm on modules which have global types/methods.
-rw-r--r-- | reflect/Type.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/reflect/Type.cs b/reflect/Type.cs index 1550b02b..0bf1a5aa 100644 --- a/reflect/Type.cs +++ b/reflect/Type.cs @@ -1042,6 +1042,7 @@ namespace IKVM.Reflection public ConstructorInfo GetConstructor(BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) { ConstructorInfo ci1 = null; + bindingAttr |= BindingFlags.DeclaredOnly; if ((bindingAttr & BindingFlags.Instance) != 0) { ci1 = GetConstructorImpl(ConstructorInfo.ConstructorName, bindingAttr, binder, types, modifiers); |