From 85a4755a0e41171085ef61062b17d3cefc22d768 Mon Sep 17 00:00:00 2001 From: Bartosz Sypytkowski Date: Thu, 6 Sep 2018 20:55:15 +0200 Subject: [PATCH] Added method and type info in convMethodRef exception (#5416) --- src/absil/ilreflect.fs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/absil/ilreflect.fs b/src/absil/ilreflect.fs index c07408e8ab6..96ca8efe04c 100644 --- a/src/absil/ilreflect.fs +++ b/src/absil/ilreflect.fs @@ -763,7 +763,9 @@ let queryableTypeGetMethodBySearch cenv emEnv parentT (mref:ILMethodRef) = res match List.tryFind select methInfos with - | None -> failwith "convMethodRef: could not bind to method" + | None -> + let methNames = methInfos |> List.map (fun m -> m.Name) |> List.distinct + failwithf "convMethodRef: could not bind to method '%A' of type '%s'" (System.String.Join(", ", methNames)) parentT.AssemblyQualifiedName | Some methInfo -> methInfo (* return MethodInfo for (generic) type's (generic) method *) let queryableTypeGetMethod cenv emEnv parentT (mref:ILMethodRef) =