I'm using swiftgen to generate some enums for my iOS app but the strings that we use have words in them like... "something_string_something" or "something_float_something".
This means that when the enums are generated it creates...
public enum String {
...
}
public enum Float {
...
}
And then the corresponding functions that use variables like...
public enum Something {
public static func name(_ p1: Int) -> String {}
}
Then have a compile error because the compiler thinks that the String
in the return type is actually the public enum String
and not just standard Swift String
.
Is it possible to define alternative keys in this case? Like if I wanted it to out using public enum Strng
and public enum Flt
instead to avoid the collision?
Obviously, if I could change the originating strings I would but they are not so easy to change in a mature project like the one I'm working on.