The Supreme Court ruled in a major tax case that the federal government can tax Americans’ foreign income from U.S.-held companies doing business overseas.