Marvel actors are not allowed to appear in DC films according to Chris Hemsworth. Comicbook writes that Hemsworth told fans at the Supanova convention in Australia that it's "illegal," for stars of Marvel films to appear in any DC property. The move is unsurprising, and I wouldn't be surprised if DC had a contract with its actors that states the exact same thing.
While DC seems to be a no-go, it appears that appearing in a Sony film is cool as evidenced by Tom Holland jumping between the two as Spider-Man and Josh Brolin appearing as Thanos in Avengers as well as Cable in Deadpool 2. At the rate these companies are producing movies, Marvel and DC will begin to run out of big names to cast if they keep locking down actors for roles! Do you think the move is good, or is it a bit silly to force the actors into an exclusive hero deal?