An implicit named port connection is made between two inequivalent types. Unlike with a normal port connection, where the type of the connection undergoes implicit conversion, the SystemVerilog standard specifies that this case is an error.
Even if some tools support this syntax, you should refrain from using it to keep your code portable.
module fly(logic p); endmodule module dream; int p; fly fly1(.p); endmodule