diff --git a/src/Avalonia.Controls/ItemsSourceView.cs b/src/Avalonia.Controls/ItemsSourceView.cs index e8869d6d0c..ca95b7acc8 100644 --- a/src/Avalonia.Controls/ItemsSourceView.cs +++ b/src/Avalonia.Controls/ItemsSourceView.cs @@ -44,9 +44,9 @@ namespace Avalonia.Controls source = source ?? throw new ArgumentNullException(nameof(source)); _inner = source switch { - ItemsSourceView => throw new ArgumentException("Cannot wrap an existing ItemsSourceView.", nameof(source)), + ItemsSourceView _ => throw new ArgumentException("Cannot wrap an existing ItemsSourceView.", nameof(source)), IList list => list, - INotifyCollectionChanged => throw new ArgumentException( + INotifyCollectionChanged _ => throw new ArgumentException( "Collection implements INotifyCollectionChanged by not IList.", nameof(source)), IEnumerable iObj => new List(iObj),