From 0daed344d757727d9dddef06bac1f3609249dcda Mon Sep 17 00:00:00 2001 From: COLBERT Tyler Date: Thu, 17 Sep 2020 08:58:11 -0600 Subject: [PATCH] Fix polyfill for CreateType --- AUTHORS.md | 1 + CHANGELOG.md | 1 + src/runtime/polyfill/ReflectionPolifills.cs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 23327f84c..897d54a5d 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -58,6 +58,7 @@ - Sean Freitag ([@cowboygneox](https://github.com/cowboygneox)) - Serge Weinstock ([@sweinst](https://github.com/sweinst)) - Simon Mourier ([@smourier](https://github.com/smourier)) +- Tyler Colbert ([@shadowbane1000](https://github.com/shadowbane1000)) - Viktoria Kovescses ([@vkovec](https://github.com/vkovec)) - Ville M. Vainio ([@vivainio](https://github.com/vivainio)) - Virgil Dupras ([@hsoft](https://github.com/hsoft)) diff --git a/CHANGELOG.md b/CHANGELOG.md index db73bb629..b9b4b86da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ details about the cause of the failure - Fix incorrect dereference of wrapper object in `tp_repr`, which may result in a program crash - Fix incorrect dereference in params array handling - Fix `object[]` parameters taking precedence when should not in overload resolution +- Fix polyfill CreateType() for .NET Standard 2.0. Used when creating C# delegates from python ## [2.5.0][] - 2020-06-14 diff --git a/src/runtime/polyfill/ReflectionPolifills.cs b/src/runtime/polyfill/ReflectionPolifills.cs index b9ce78d63..9f2c3b731 100644 --- a/src/runtime/polyfill/ReflectionPolifills.cs +++ b/src/runtime/polyfill/ReflectionPolifills.cs @@ -16,7 +16,7 @@ public static AssemblyBuilder DefineDynamicAssembly(this AppDomain appDomain, As public static Type CreateType(this TypeBuilder typeBuilder) { - return typeBuilder.GetTypeInfo().GetType(); + return typeBuilder.GetTypeInfo(); } #endif public static T GetCustomAttribute(this Type type) where T: Attribute