Checks that Preview is only used with a top level declarations or in a top level class with a default constructor.