- attached FooBar.cls
- attached Foo.cls
- attached Bar.cls
Spurious "method is not visible" when parent class has abstract methods
Forgive me if there’s already an issue that describes this …but I run across it when using the fflib pattern
Given a top level class Foo
public abstract class Foo implements IFoo {
abstract List<Schema.SObjectField> getSobjectFieldList();
}
and interface IFoo
public interface IFoo {}
and a sub class Bar
public abstract class Bar extends Foo {
abstract List<Schema.SObjectField> getSObjectFieldList();
}
and a subsubclass FooBar (concrete impl)
public virtual class FooBar extends Bar {
public List<Schema.SObjectField> getSObjectFieldList() {
return new List<Schema.SObjectField>{
Account.Name
};
}
}
then IC2 will syntax highlight both Bar and FooBar as shown in images below
The Apex compiler accepts this as valid input and this code executes just fine:
FooBar fb = new FooBar();
System.debug(LoggingLevel.INFO,fb.getSObjectFieldList());
yields:
18:13:37.21 (24128024)|USER_DEBUG|[2]|INFO|(Name)
Comments (3)
-
reporter -
repo owner Eric, with the changes I just committed for
#1609I'm not seeing any issues with the provided code:The fix for the other issue properly takes
private
/default visibility into account for override relationships, so I think it should address the problems you were seeing here as well.I'm going to plan to resolve this one along with
#1609when I release the next build, but if you do see these issues continue, just reopen and let me know. -
repo owner - changed status to resolved
Delivered in 2.1.2.7. If you do see this again, please let me know.
- Log in to comment