diff --git a/src/linker/Linker/TypeReferenceExtensions.cs b/src/linker/Linker/TypeReferenceExtensions.cs index 9dbcd52589c2..cddf27c89b77 100644 --- a/src/linker/Linker/TypeReferenceExtensions.cs +++ b/src/linker/Linker/TypeReferenceExtensions.cs @@ -45,7 +45,8 @@ public static StringBuilder GetDisplayNameWithoutNamespace (this TypeReference t else PrependGenericParameters (type.GenericParameters.Skip (declaringTypeGenericParametersCount).ToList (), sb); - simpleName = type.Name.Substring (0, type.Name.IndexOf ('`')); + int explicitArityIndex = type.Name.IndexOf ('`'); + simpleName = explicitArityIndex != -1 ? type.Name.Substring (0, explicitArityIndex) : type.Name; } else simpleName = type.Name;