Generated code for union with field named 'result' does not compile
See original GitHub issue(with builderless)
Because a val $name = [...]
will be generated by generateReadCall
and there exists a var result = [...]
on the outer scope that will conflict with val $name
if $name
is ‘result’.
See these two lines: https://github.com/microsoft/thrifty/blob/master/thrifty-kotlin-codegen/src/main/kotlin/com/microsoft/thrifty/kgen/KotlinCodeGenerator.kt#L1150 https://github.com/microsoft/thrifty/blob/master/thrifty-kotlin-codegen/src/main/kotlin/com/microsoft/thrifty/kgen/KotlinCodeGenerator.kt#L1370
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Compile Time Union Array - c++ - Stack Overflow
arr() function is not a compile time constant. Reading from a union can only be done on the active field of a union,...
Read more >Code Gen Options (Using the GNU Compiler Collection (GCC))
In this case GCC falls back to generating multiple accesses rather than code that will fault or truncate the result at run time....
Read more >Python Generated Code | Protocol Buffers - Google Developers
The protocol buffer compiler generates a class called Foo , which subclasses google.protobuf.Message . The class is a concrete class; no abstract methods...
Read more >Schema Language - Cap'n Proto
You must define your message structure in a special language, then invoke the Cap'n Proto compiler ( capnp compile ) to generate source...
Read more >v/docs.md at master · vlang/v - GitHub
Any imported module name can be aliased using the as keyword: NOTE: this example will not compile unless you have created mymod/sha256.v.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed in master; I can’t really predict when this will be shipped in a proper release. I’ll update here when that happens.
Thanks!