From 036d67844c4d897a717064f2219d1d48f74b0a7d Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Fri, 28 Feb 2020 17:49:05 -0600 Subject: [PATCH] Fixed generic method instantiation and extended last fix to nonvirtual properties too --- IPA.Loader/Config/Stores/GeneratedStoreImpl.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IPA.Loader/Config/Stores/GeneratedStoreImpl.cs b/IPA.Loader/Config/Stores/GeneratedStoreImpl.cs index 37aad500..ee96b6d8 100644 --- a/IPA.Loader/Config/Stores/GeneratedStoreImpl.cs +++ b/IPA.Loader/Config/Stores/GeneratedStoreImpl.cs @@ -1604,9 +1604,10 @@ namespace IPA.Config.Stores // for now, we assume that its a generated type implementing IGeneratedStore var IGeneratedStore_Serialize = typeof(IGeneratedStore).GetMethod(nameof(IGeneratedStore.Serialize)); - var IGeneratedStoreT_CopyFrom = typeof(IGeneratedStore<>).GetMethod(nameof(IGeneratedStore.CopyFrom)); + var IGeneratedStoreT_CopyFrom = typeof(IGeneratedStore<>).GetMethod(nameof(IGeneratedStore.CopyFrom)) + .MakeGenericMethod(member.Type); - if (member.IsField) + if (!member.IsVirtual) { var noCreate = il.DefineLabel(); var stlocal = GetLocal(member.Type);