diff --git a/src/Nullean.PublicApi.Diff/ApiComparison.cs b/src/Nullean.PublicApi.Diff/ApiComparison.cs index aaa1dc2..3b389c9 100644 --- a/src/Nullean.PublicApi.Diff/ApiComparison.cs +++ b/src/Nullean.PublicApi.Diff/ApiComparison.cs @@ -650,7 +650,8 @@ private static void Parameters( { var o = oldParameters[i]; var n = newParameters[i]; - var label = $"parameter {n.Name}"; + // by position, which both versions share; a renamed parameter has a name of its own on each side + var label = $"parameter {i + 1}"; if (o.Name != n.Name) changed($"parameter {i + 1} name", o.Name, n.Name, ApiAudience.Callers, ApiCompatibility.Source, "callers that pass it by name"); TypeOf(label, o.Type, n.Type, oldType, newType, changed); diff --git a/tests/Nullean.PublicApi.Tests/.snapshots/ComparisonTests/Classifies.default-value-changed.ba9001cb.verified.txt b/tests/Nullean.PublicApi.Tests/.snapshots/ComparisonTests/Classifies.default-value-changed.ba9001cb.verified.txt index 43a7150..d5814ed 100644 --- a/tests/Nullean.PublicApi.Tests/.snapshots/ComparisonTests/Classifies.default-value-changed.ba9001cb.verified.txt +++ b/tests/Nullean.PublicApi.Tests/.snapshots/ComparisonTests/Classifies.default-value-changed.ba9001cb.verified.txt @@ -1,2 +1,2 @@ -A › M(int) › parameter a default changed: 1 → 2 [Major, breaks Callers Binary] (compiled callers pass the old default) +A › M(int) › parameter 1 default changed: 1 → 2 [Major, breaks Callers Binary] (compiled callers pass the old default) suggested: Major