Apex bound variables reported as errors inside GEOLOCATION SOQL function
Issue #1560
resolved
The following is legitimate Apex, but reported as an error by the code inspector:
Decimal longitude = 0;
Decimal latitude = 0;
Account a = [SELECT Id FROM Account WHERE DISTANCE(ShippingAddress, GEOLOCATION(:latitude, :longitude), 'mi') < 10];
The inspector has a problem with the using the Apex variables in the GEOLOCATION function. It says
'-', FLOATING_POINT_LITERAL or INTEGER_LITERAL expected, got ':'
Comments (2)
-
-
repo owner - changed status to resolved
Delivered in 2.1.1.2.
- Log in to comment
Oh wow, I was literally just about to post a bug about this.