Class rename does not work if the class has a constructor that calls another constructor

Issue #918 resolved
Martin Lewis created an issue

I've been seeing some erratic behaviour with class rename and I think I have isolated which classes have a problem. There seem to be two cases:

  1. The class has a constructor with a call to this()
  2. The class has a subclass with a constructor that calls super()

In either case the rename doesn't work, the illuminated cloud rename dialog never appears and the apex-specific rename logic doesn't run.

The class below should reproduce case 1.

public class Test1
{
   public Test1()
   {
   }

   public Test1(String s)
   {
      this();
   }
}

Comments (4)

  1. Scott Wells repo owner

    Thanks for filing, Martin. I'll take a look this weekend and let you know if I have any trouble reproducing. Hopefully it'll reproduce quickly and I can issue a fix in the next build.

  2. Scott Wells repo owner

    Great sleuthing, Martin! With your assistance on how to reproduce, I've just submitted a fix for the issue that will be included in the next build. Thanks!

  3. Log in to comment