DOOR LATCH COMPATIBILITY

2006 Pontiac G6

My drivers side door latch (it is a coupe) that clicks to the striker bar is broken was curious if I could use a sedans door latch concidering they are both the drivers side. And what years maybe compatible with it