stage1: fix exporting enums

After extern enums were removed, stage1 was left in an incorrect state
of checking for `extern enum` for exported enums. This commit fixes it
to look for an explicit integer tag type instead, and adds test coverage
for the compile error case as well as the success case.

closes #9498
67b201982bAndrew Kelley committed on 11/26/2021, 1:20:39 AMparent7b78b4f
3 files changedLine totals unavailable