Do not test directly swift-friendly flag.
The swift-friendly flag should be a composition of other flags. If its default changes, users should have the option of keeping the previous behavior by using a composition of flags.
Change on 2018/08/02 by antoniocortes
@@ -327,7 +327,7 @@ public class EnumRewriter extends UnitTreeVisitor {
int numConstants = node.getEnumConstants().size();
// The native type is not declared for an empty enum.
- if (options.swiftFriendly() && numConstants > 0) {
+ if (options.staticAccessorMethods() && numConstants > 0) {
String nativeName = NameTable.getNativeEnumName(typeName);
node.addBodyDeclaration(NativeDeclaration.newInnerDeclaration(
UnicodeUtils.format("- (%s)toNSEnum;\n", nativeName),
