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

Default value with enum must be declared before used #205

Open
TommyTT1993 opened this issue Dec 1, 2022 · 0 comments
Open

Default value with enum must be declared before used #205

TommyTT1993 opened this issue Dec 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@TommyTT1993
Copy link

struct A {
    1: Type t = Type.AA
}

enum Type {
    AA = 1
    BB = 2
}

And we got error thriftpy2.parser.exc.ThriftParserError: Cann't find name 'Type.AA' at line 2

enum Type {
    AA = 1
    BB = 2
}

struct A {
    1: Type t = Type.AA
}

This will be fine.

@aisk aisk added the enhancement New feature or request label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants