Inner class implementing an inner interface is marked as an error

Issue #902 resolved
Aidan Harding created an issue

This is legal according to Apex:

public with sharing class InnerInterfaces {

    interface IDoStuff {
        void doStuff();
    }

    public class DoStuffImplementation implements IDoStuff {
        public void doStuff() {
        }
    }
}

But the inspector reports an error saying that DoStuffImplementation does not implement doStuff

Comments (7)

  1. Scott Wells repo owner

    Okay, after looking back into this I realize the idiocy of my previous comment (and deleted it to avoid confusion). What you're seeing here is a bit of a timing issue that crops up occasionally as IC knits together inheritance relationships. I'll use this issue to track a resolution for that problem.

  2. Eric Kintzer

    I'm going to reopen this for 2.0.3.6 as the following code displays the inspection error (but compiles and executes just fine) inner class interface inspector.png

    public class AssetsServiceImplAsyncHandlers {
    
        //  Interface to abstract details of configuration for app cancel callout versus kit cancel callout
        public interface IAssetCancelCalloutConfigurator {
            String getHttpMethod();
        }
        //  Concrete implementation of configurators - App, Kit .. add others as needed
        public class AppAssetCalloutConfigurator implements IAssetCancelCalloutConfigurator {
            public String getHttpMethod() {return 'POST';}  
        }
    
  3. Scott Wells repo owner

    I was able to reproduce this, though it's definitely quirky...still something timing-related. By making any single change to the method implementation, it all properly links together. I'll dig in and see why it does this intermittently.

  4. Log in to comment