Skip to content
Bug Barometer

Incorrect Index Passed to resolveVirtualMethodRef When Iterating Child Classes of custom iterable Using For-Loop

Not fixed yet. Salesforce is reviewing it.

Summary

An Incorrect Index Passed to resolveVirtualMethodRef When Iterating Child Classes of custom iterable Using For-Loop.


Consider two classes, ClassA and ClassB, both implementing Iterable<ContactModel>. Additionally, ClassA implements the classTestImpA interface, while ClassB does not.


public virtual class ClassA implements classTestImpA, Iterable<ContactModel> {.....}

public virtual class ClassB implements Iterable<ContactModel> {.....}

We create an array of these custom iterables, with classTestImpA at index 0 and ClassB at index 1.

Workaround

We haven't loaded the full details for this issue yet. Check the official page.

History

  1. First tracked here as In Review with 1 report

    Nov 30, 2026

Also open in Development (Apex, LWC & VF)