List.add() generated definition has wrong return type

Issue #1978 resolved
Chuck Liddell created an issue

Just noticed the return type in the generated system List class has the wrong return type. It shows as “Object” but it should be “void”.

// Generated by Illuminated Cloud on Mon Aug 23 01:52:29 HST 2021. Do not edit.

global class /*System.*/List implements Iterable
{
    // snip

    global Object add(Object element)
    {
    }

https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_list.htm#apex_System_List_add

Comments (4)

  1. Scott Wells repo owner

    Hah! Looks like this is another one that's reported incorrectly by the tooling API's completions resource:

    Issue_1978.png

    I have a way to massage those API results for a more accurate OST. I'll take care of this one for an upcoming build.

  2. Chuck Liddell reporter

    The only thing worse than no documentation is incorrect documentation. Thanks Tooling API! 😆

  3. Log in to comment