Diesel in a gas/petrol engine: Poor performance if it runs at all, and will depend on how much diesel was added to the existing gas.
Gas/petrol in diesel: Depends on how much was added to existing diesel. Disaster for the fuel injection pump and/or injector system immediately, pistons and cylinder walls shortly thereafter.
Diesels are high compression engines. The compression causes heat that causes the fuel to burn when it is introduced into the cylinder in an atomized mist. Gas has a lower flash point, it will burn too fast and cause extreme pre-ignition resulting in piston failure if it runs long enough. Diesel fuel also is used to lubricate the injection pump and injectors; gas/petrol lacks lubricating properties and will cause seizing within those components.
Diesel has a higher flash point than gas, and gas engines a lower compression ratio than diesel. Diesel does not efficiently ignite in a spark ignition situation. The lower compression is insufficient to assist the spark ignition to cause the cylinder to fire. The effect will be sort of like adding water to a fire, it just will not work in that engine.
Gas/petrol engines are lower compression. They too use a fuel injection system but at lower pressures than diesel. Older gas/petrol units used carburetor systems to deliver the fuel- very inefficient but more tolerant that fuel injection. The lower compression may not allow diesel to burn at all, but if it does it will not perform well.
Advice: add gas/petrol to gas/petrol engines, and diesel to diesels only, do not mix the 2.
***Contrary to another reply, diesel contains a greater content of BTU of energy per gallon than gas/petrol. That is what gives diesels their low end grunt power and greater efficiency over gas/petrol units.
20+ yrs in and over a shop, built over 400 engines mostly diesels.