Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile generated .swift protocol #11

Closed
artemkin opened this issue Nov 20, 2014 · 3 comments
Closed

Can't compile generated .swift protocol #11

artemkin opened this issue Nov 20, 2014 · 3 comments
Labels
Milestone

Comments

@artemkin
Copy link

This is extracted from real .proto used in production. Generated .swift is not compilable, as PROTOCOL_VERSION_MAJOR name is converted to ProtocolVersionMajor

package Dummy;

enum ProtocolVersionMajor
{
    PROTOCOL_VERSION_MAJOR = 1;
}
@artemkin
Copy link
Author

Generated code

enum ProtocolVersionMajor:Int32 {
  case ProtocolVersionMajor = 1

  static func IsValidValue(value:ProtocolVersionMajor) ->Bool {
    switch value {
      case .ProtocolVersionMajor:
        return true;
      default:
        return false;
    }
  }
}

@alexeyxo alexeyxo added the bug label Nov 20, 2014
@alexeyxo alexeyxo added this to the Release 1.2 milestone Nov 20, 2014
@alexeyxo
Copy link
Owner

I will correct it, but the bug in the Swift :)

@artemkin
Copy link
Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants