From ff84b7ef90cc887fedd8f7969bdb7643dab496af Mon Sep 17 00:00:00 2001 From: ldr123 Date: Sun, 27 Sep 2020 16:56:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8protobuf=E7=9A=84=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E4=B8=AD=E4=BD=BF=E7=94=A8ProtoBuf.X=20a=20=3D=20new=20ProtoBu?= =?UTF-8?q?f.X()=E6=97=A0=E6=B3=95=E6=88=90=E5=8A=9F=EF=BC=8C=E8=80=8C?= =?UTF-8?q?=E4=BD=BF=E7=94=A8global::ProtoBuf.X=E5=B0=B1=E5=8F=AF=E4=BB=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ILRuntime/CLR/TypeSystem/ILType.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ILRuntime/CLR/TypeSystem/ILType.cs b/ILRuntime/CLR/TypeSystem/ILType.cs index f467b44d..1bb8cdfd 100644 --- a/ILRuntime/CLR/TypeSystem/ILType.cs +++ b/ILRuntime/CLR/TypeSystem/ILType.cs @@ -732,6 +732,17 @@ public IMethod GetVirtualMethod(IMethod method) } else m = GetMethod(string.Format("{0}.{1}", method.DeclearingType.FullName, method.Name), method.Parameters, genericArguments, method.ReturnType, true); + + if (m == null) + { + if (method.DeclearingType is ILType) + { + ILType iltype = (ILType)method.DeclearingType; + m = GetMethod(string.Format("global::{0}.{1}", iltype.fullNameForNested, method.Name), method.Parameters, genericArguments, method.ReturnType, true); + } + else + m = GetMethod(string.Format("global::{0}.{1}", method.DeclearingType.FullName, method.Name), method.Parameters, genericArguments, method.ReturnType, true); + } } if (m == null)