Yes, FPC figures out the right overload. CodeTools in Lazarus somehow gets it wrong.
On Linux I get a slightly different hint but still wrong. See the screenshot.
Adding {$mode objfpc}{$h+} to the program made no difference. Neither did adding "uses Classes, SysUtils;"