From 012288de1e2a229e313f0c40cc09828287df1f14 Mon Sep 17 00:00:00 2001 From: Victor Milovanov Date: Mon, 12 Oct 2020 19:49:12 -0700 Subject: [PATCH] Fixed polyfill for TypeBuilder.CreateType https://github.com/pythonnet/pythonnet/issues/1228 --- src/runtime/Python.Runtime.15.csproj | 2 +- src/runtime/polyfill/ReflectionPolifills.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/Python.Runtime.15.csproj b/src/runtime/Python.Runtime.15.csproj index 2376f912e..d1e959196 100644 --- a/src/runtime/Python.Runtime.15.csproj +++ b/src/runtime/Python.Runtime.15.csproj @@ -123,7 +123,7 @@ - + diff --git a/src/runtime/polyfill/ReflectionPolifills.cs b/src/runtime/polyfill/ReflectionPolifills.cs index b9ce78d63..b8bc7ea3e 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.CreateTypeInfo(); } #endif public static T GetCustomAttribute(this Type type) where T: Attribute