-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Description
Input code
public class Test
{
public static Test Create()
{
var ins = new Test();
ins.Add(2);
ins.Add(2);
return ins;
}
}
public static class TestExtension
{
public static void Add(this Test obj, int value) { }
}Erroneous output
public class Test
{
public static Test Create()
{
return new Test { 2, 2 };
}
}
public static class TestExtension
{
public static void Add(this Test obj, int value)
{
}
}Language version is C# 10.0 / VS2022
Collection initializer requires its type 'type' to implement System.Collections.IEnumerable.
Details
- Product in use: VS extension
- Version in use: 8.1.1.7464
Reactions are currently unavailable