By Christopher Rosen
November 08, 2016 at 02:02 PM EST
Michael Rozman/Warner Bros.

Warren Beatty made his first appearance on The Ellen DeGeneres Show Monday, and recalled his first experiences with host Ellen DeGeneres, when she appeared with Garry Shandling on The Larry Sanders Show.

Recalling the episode, where DeGeneres and Shandling-as-Sanders slept together, Beatty said he was “very impressed” with the comedian’s work, “and I told Garry that and we had a long talk about you.”

From there, DeGeneres and Beatty got into a charming back-and-forth that ended with Beatty admitting he didn’t know DeGeneres was gay at the time of the episode. (DeGeneres publicly came out months after the Larry Sanders episode aired.)

“I think you didn’t know I was gay at the time,” DeGeneres said. “No, you did.”

“I didn’t. I had no idea,” Beatty said. “I knew you were happy. I didn’t know you were gay.”

Watch the interview below.