Fix #1245 by adding support for enumerated cases in annotation classes.
Tests for #1245