roslyn
roslyn copied to clipboard
Multiple errors are generated when using Quick Actions on a IDE0028 Message in .NET 8
Version Used: Microsoft Visual Studio Professional 2022 Version 17.8.0 VisualStudio.17.Release/17.8.0+34309.116 Microsoft .NET Framework Version 4.8.09037
Steps to Reproduce: Simplify someTest using the Quick Actions
Test someTest = new() { "a", { "b", "c" } };
public class Test : IList<string>
{
private readonly List<string> Queries = new();
public string this[int index] { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
public int Count => throw new NotImplementedException();
public bool IsReadOnly => throw new NotImplementedException();
public void Add(string item, params object[] argument) => Queries.Add(string.Format(item, argument));
public void Add(string item)
{
Queries.Add(item);
}
public void Clear()
{
throw new NotImplementedException();
}
public bool Contains(string item)
{
throw new NotImplementedException();
}
public void CopyTo(string[] array, int arrayIndex)
{
throw new NotImplementedException();
}
public IEnumerator<string> GetEnumerator()
{
throw new NotImplementedException();
}
public int IndexOf(string item)
{
throw new NotImplementedException();
}
public void Insert(int index, string item)
{
throw new NotImplementedException();
}
public bool Remove(string item)
{
throw new NotImplementedException();
}
public void RemoveAt(int index)
{
throw new NotImplementedException();
}
IEnumerator IEnumerable.GetEnumerator()
{
throw new NotImplementedException();
}
}
List of error generated:
- CS1002 ; expected
- CS1001 Identifier expected
- CS1003 Syntax error, ']'
- CS1022 Type or namespace definition, or end-of-file expected
- CS1022 Type or namespace definition, or end-of-file expected