Can't seem to call static method IPAddress:isValid

While implementing udp network discovery I stumbled upon a trivial error I can't seem to fix myself.

According to the header Arduino/cores/esp8266/IPAddress.h at master · esp8266/Arduino · GitHub
IPAddress has a static method 'isValid(const char* arg)'. As far as I am aware the c++ syntax for static function calls is ClassIdentifier::Method(Params).

'isValid' is not a member of 'IPAddress'. if(IPAddress::isValid(hostAddressAsChar)){

int bytesRead = _wifiUDPClient.read(incomingPacket, packetSize);
 
if (bytesRead > 0){

 //4 byte signed big endian int : Port 
 int parsedPort = incomingPacket[0] << 24| (incomingPacket[1] & 0xFF) << 16| ( incomingPacket[2] & 0xFF)  << 8 | (incomingPacket[3] & 0xFF) ;
 
 Serial.println(parsedPort);
   
 //Parse host address
 char*  hostAddressAsChar = incomingPacket;
 hostAddressAsChar += 4;
 
 Serial.print("Parse host address: ");
 Serial.println(hostAddressAsChar);
 
 if(IPAddress::isValid(hostAddressAsChar)){
  Serial.println("Valid address received");
  _hostAddress = IPAddress();
  _hostAddress.fromString(hostAddressAsChar);
  _port = parsedPort;
 }else{
  Serial.println("Invalid address received");
 }

 _wifiUDPClient.stop();
 _udpState = 0x03;
}

Those functions were only added 2 days ago. If you're using the release version of the ESP8266 core for Arduino or even a slightly outdated beta version then those functions won't be in the code you're using. Check the actual files on your computer if you want to be sure.

Hard to help when you post partial code and the part missing is the much needed variable declarations. In one place you refer "IPAddress" as a function and in another place you refer it as a class. Try "IPAddress()::isValid(...)"

pert:
Those functions were only added 2 days ago. If you're using the release version of the ESP8266 core for Arduino or even a slightly outdated beta version then those functions won't be in the code you're using. Check the actual files on your computer if you want to be sure.

That was the issue. Thank you.