Magic (1978)
Gene Wilder was the original choice for Corky, and director Richard Attenborough and writer William Goldman wanted him, but producer Joseph E. Levine refused, on the grounds he wanted no comedians in the movie to distract from the serious nature of the story.
Many years after the film's release, Gene Wilder was asked at a book signing in New York City what role he wished he had gotten to play, and he said Corky in Magic. Wilder said that he felt that the film would have worked much better with a comedian in the role.