From 1bd96d89adce5f7e265c56ca757aebd31bee1d77 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Sun, 4 Oct 2026 12:06:24 -0300 Subject: [PATCH] Name the non-array default argument. --- src/Stunts/DefaultValueProvider.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Stunts/DefaultValueProvider.cs b/src/Stunts/DefaultValueProvider.cs index afc5abe..781e1c8 100644 --- a/src/Stunts/DefaultValueProvider.cs +++ b/src/Stunts/DefaultValueProvider.cs @@ -204,7 +204,8 @@ public GeneratedDefault(Func create, Func Array.CreateInstance( - type.GetElementType() ?? throw new ArgumentException(nameof(type)), new int[type.GetArrayRank()]); + type.GetElementType() ?? throw new ArgumentException("Type must be an array type.", nameof(type)), + new int[type.GetArrayRank()]); static object CreateEnumerable(Type type) => Enumerable.Empty();