roslyn: Implement interface quick fix does not add class brackets for nested types
Version Used: 2.8.0.62811 / 15.7 P4
Steps to Reproduce:
using System;
namespace WPFConsoleApplication1
{
class Program
{
private class Test : ICloneable|
static void Main(string[] args) { }
}
}
Invoke the Implement interface quick fix.
Expected Behavior: Brackets added, as in the case of top-level class:
private class Test : ICloneable
{
public object Clone() => throw new NotImplementedException();
}
Actual Behavior:
private class Test : ICloneable
public object Clone() => throw new NotImplementedException();
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 22 (9 by maintainers)
Fixes with https://github.com/dotnet/roslyn/pull/76083
Reactivating. Thanks for the repro.
AbstractImplementInterfaceService.ImplementInterfaceGenerator.ImplementInterfaceAsync would be a reasonable start.
It seems like this has been fixed, I can’t reproduce this on 15.8.1.