-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
var expected = new object[] { viewModel }.Concat(viewModel.Items);This triggers WTG3014: Don't use Concat when prepending a single element to an enumerable.
The code-fix changes it to:
var expected = viewModel.Items.Prepend(viewModel);However, viewModel and viewModel.Items do not share a common type, so this then causes CS0411: The type arguments for method 'Enumerable.Prepend(IEnumerable, TSource)' cannot be inferred from the usage. Try specifying the type arguments explicitly.
We should probably change this to .Prepend<object> to preserve the explicit typing.