Ensure there are custom attributes before attempting to resolve

This commit is contained in:
Robert Mills
2017-11-13 16:15:55 -05:00
committed by Ben Adams
parent 77ba50dff9
commit 90487aa452

View File

@@ -524,7 +524,7 @@ namespace System.Diagnostics
var parameterTypeString = "?";
if (parameterType != null)
{
if (parameterType.IsGenericType)
if (parameterType.IsGenericType && parameter.CustomAttributes.Any())
{
var tupleNames = parameter.GetCustomAttributes<TupleElementNamesAttribute>().FirstOrDefault()?.TransformNames;
if (tupleNames != null)