andrzejressel opened a new issue, #3544:
URL: https://github.com/apache/fory/issues/3544

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/fory/issues) 
and found no similar issues.
   
   
   ### Version
   
   "0.16.0"
   
   ### Component(s)
   
   Rust
   
   ### Minimal reproduce step
   
   ### test.fdl
   
   ```
   package my_package;
   
   enum Type {
       BOOL = 0;
   }
   
   message MyMessage {
       Type type = 1;
   }
   ```
   
   
   `foryc --lang rust --rust_out .\src\ .\pcl.fdl`
   
   ### What did you expect to see?
   
   Code should compile
   
   ### What did you see instead?
   
   ```
   error: expected identifier, found keyword `type`                             
                                                                                
                                                                                
                                                                      
     --> src\my_package.rs:34:9
      |
   32 | pub struct MyMessage {
      |            --------- while parsing this struct
   33 |     #[fory(id = 1)]
   34 |     pub type: Type,
      |         ^^^^ expected identifier, found keyword
      |
   help: escape `type` to use it as an identifier
      |
   34 |     pub r#type: Type,
      |         ++
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to