Author Topic: C# abstract override method problem  (Read 714 times)

arog

  • Community Member
  • Posts: 19
  • Hero Points: 3
C# abstract override method problem
« on: August 28, 2019, 05:56:44 pm »
This hasn't worked perfectly in the past, but it's gotten worse in v24b2.  If I create a class that implements an abstract class (or interface), and use Override Method, the code generated is not correct.  It doesn't add the override keyword, or carry the correct public / protected / private keyword over, and in v24, adds get_ to the front.

Currently, using override method inside ConcreteClass gives me:
Code: [Select]
public abstract class TestAbstract
{
public abstract bool TestGetter { get; }
}


public class ConcreteClass : TestAbstract
{

private bool get_TestGetter()
{

}
}

Override method should expand to something like
Code: [Select]
public class ConcreteClass : TestAbstract
{
public override bool TestGetter
{
get
{
// cursor here
}
}
}



Thanks!

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5052
  • Hero Points: 418
Re: C# abstract override method problem
« Reply #1 on: August 28, 2019, 11:20:47 pm »
We will look into this.

This doesn't seem to be new. v23 generates the same thing. v22 doesn't support auto code generation for getters/setters. It looks like auto code generation support for getters/setters was added accidentally in v23 and you are the first to notice. Hopefully, getter/setter support get be correctly added.

There is also an issue with methods not getting the override keyword.

arog

  • Community Member
  • Posts: 19
  • Hero Points: 3
Re: C# abstract override method problem
« Reply #2 on: September 04, 2019, 05:47:39 pm »
Thanks!

You are correct... before getters and setters where just ignored.  If that's the easy solution, that's fine with me.

If we could get the public/private and override keywords fixed up at least, that would be great.