You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the FRB generates a Dart file it contains r#type filed while it should have a type
Steps to reproduce
in the Rust code use a reserved name such as:
fileds
structA{pubr#type:String}
function name
fn #for(){}
parameter name
fntest(r#type:String){}
then run FRB generation
Logs
Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
╷
39 │ UserType get r#type;
│ ^^^^
----------------------------------
stderr=error: missing parameters forfunctiondefinition
--> .../rust/src/frb_generated.rs:464:69
|
464 | ... }fn wire__types__model__common__User_auto_accessor_get_r#type_impl(ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUin...
| ^
|
help: add a parameter list
|
464 | }fn wire__types__model__common__User_auto_accessor_get_r()#type_impl(ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,rust_vec_len_: i32,data_len_: i32) -> flutter_rust_bridge::for_generated::WireSyncRust2DartSse {| ++
error: expected one of `->`, `<`, `where`, or `{`, found `#`
--> .../rust/src/frb_generated.rs:464:69
Expected behavior
No response
Generated binding code
No response
OS
No response
Version of flutter_rust_bridge_codegen
No response
Flutter info
No response
Version of clang++
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
Given the struct contains an escaped name
When the FRB generates a Dart file it contains
r#type
filed while it should have atype
Steps to reproduce
in the Rust code use a reserved name such as:
then run FRB generation
Logs
Expected behavior
No response
Generated binding code
No response
OS
No response
Version of
flutter_rust_bridge_codegen
No response
Flutter info
No response
Version of
clang++
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: