Recently when I plugged my iPhone for charging it correctly warned me that it detected liquid and it might damage the phone to charge at the moment. I blasted my phone with car AC for a couple of minutes and it dried out and then I was able to charge fine. It's a nice feature to have even on Macs but I doubt the scenarios in which water goes into a Mac are as simple to deal with as they are with iPhone.