For lesser known characters, it isn't a problem. But for iconic characters, it just won't work unless you reinvent the entire character. Specifically the Batman example Darth Madden brought up: a black guy playing Batman/Bruce Wayne would never work. Even if you did a Stan Lee "Just Imagine.." Wayne Williams reinvention, it would suck.
But disregarding that for a second, my choice would be Michael Jai White as a black Batman.
Characters like Nick Fury, making him black was done in an alternative universe story or some ish with the comics. So that worked. But even beyond that, having Samuel L. Jackson play Nick Fury in the movies worked because honestly.. Nick Fury is a complete "WHO!?" to mainstream fans. So whether that character was white, black or even chinese was irrelevant.
On a side note, anyone catch the Hoff as Nick Fury? lmmfao!
Adding new characters to a role is also acceptable. Like making a new Green Lantern who was black. No problem.
But Superman, Batman, The Hulk, Iron Man, Captain America, etc. characters like that, switch ups don't work. Minor, lesser known characters.. yeah.