slachiewicz opened a new pull request, #3938: URL: https://github.com/apache/thrift/pull/3938
`generate_consts` tested the declared type, so a constant declared through a typedef got neither `const` nor a value (`val ANSWER: kotlin.Int = `). It now resolves the typedef first, as the Java generator does. Not in this PR, and the same with or without a typedef: `uuid` constants render as `0`, `binary` ones as a string literal, and container and struct constants still get no value (the `// TODO` branch). Verified: `--gen kotlin` over every `.thrift` in the repository → only the typedef constants in the two `ConstantsDemo.thrift` files change. - [x] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? [THRIFT-6339](https://issues.apache.org/jira/browse/THRIFT-6339) - [x] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"? - [x] Did you squash your changes to a single commit? - [x] Did you do your best to avoid breaking changes? No: the affected files did not compile. - [x] Code change, so the commit carries no CI-skip marker. - [x] Tests: `compiler/cpp/tests/kotlin/t_kotlin_generator_const_tests.cc`, which fails without the fix; kotlin generator tests are switched on. - [x] AI-assisted: the commit carries a `Co-Authored-By:` trailer. No new dependency or third-party code. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
