From 6b82b3fd1f4d771cf948ef38dcf30a3225de5730 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);