Skip to content

Commit 48c0ca6

Browse files
committed
"No method matches given arguments" message now includes type name
1 parent 332cae9 commit 48c0ca6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/methodbinder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,11 +895,11 @@ internal virtual NewReference Invoke(BorrowedReference inst, BorrowedReference a
895895
var value = new StringBuilder("No method matches given arguments");
896896
if (methodinfo != null && methodinfo.Length > 0)
897897
{
898-
value.Append($" for {methodinfo[0].Name}");
898+
value.Append($" for {methodinfo[0].DeclaringType?.Name}.{methodinfo[0].Name}");
899899
}
900900
else if (list.Count > 0 && list[0].Valid)
901901
{
902-
value.Append($" for {list[0].Value.Name}");
902+
value.Append($" for {list[0].Value.DeclaringType?.Name}.{list[0].Value.Name}");
903903
}
904904

905905
value.Append(": ");

0 commit comments

Comments
 (0)