Code inspector reports assignment of List<AggregateResult> to List<sObject> as error

Issue #905 resolved
Aidan Harding created an issue

AggregateResult is also an sObject. So, generic code that handles sObject can also be used to handle AggregateResult objects.

The code inspector reports this as an error when it should not e.g.

List<sObject> aggregateResults = [SELECT COUNT(Id) FROM Lead GROUP BY Industry];

Is marked as an error.

Comments (2)

  1. Log in to comment