Based on my own experience, if you apply OPT first, then H1B, even though your H1B is approved earlier than OPT, you should still be H1B. I applied OPT in the last April, but I didn't get approvel until July 18. Since I thought they might deny my OPT, I applied H1B (premium process)at the begining of July.Finally my H1B was approved on the July 12, so it was 4 days earlier than my OPT. The international office of the school told me that I should be H1B and they informed Immigration office that I ended my OPT.