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

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/fory/issues) 
and found no similar issues.
   
   
   ### Version
   
   Latest
   
   ### Component(s)
   
   Rust
   
   ### Minimal reproduce step
   
   ```rust
   #[test]
   fn test_register() {
       #[derive(ForyObject, Debug)]
       struct TypeA { }
   
       #[derive(ForyObject, Debug)]
       struct TypeB { 
           a: TypeA,
       }
       let mut fory = Fory::default().compatible(true);
       fory.register::<TypeB>(101).unwrap();
       fory.register::<TypeA>(100).unwrap();
   }
   ```
   
   ### What did you expect to see?
   
   pass ut
   
   ### What did you see instead?
   
   ```
   thread 'test_register' panicked at tests/tests/mod.rs:37:33:
   called `Result::unwrap()` on an `Err` value: TypeError("TypeId 
TypeId(0xa7cff65b542f9885a4fa70e95938663e) not found in type_id_index, maybe 
you forgot to register some types")
   stack backtrace:
      0: rust_begin_unwind
                at 
/rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/std/src/panicking.rs:695:5
      1: core::panicking::panic_fmt
                at 
/rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/panicking.rs:75:14
      2: core::result::unwrap_failed
                at 
/rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/result.rs:1704:5
      3: core::result::Result<T,E>::unwrap
                at 
/Users/urlyy/environment/rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:1109:23
      4: mod::test_register
                at ./tests/mod.rs:37:5
      5: mod::test_register::{{closure}}
                at ./tests/mod.rs:28:19
      6: core::ops::function::FnOnce::call_once
                at 
/Users/urlyy/environment/rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
      7: core::ops::function::FnOnce::call_once
                at 
/rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library/core/src/ops/function.rs:250:5
   note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 
backtrace.
   
   
   failures:
       test_register
   
   test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 46 filtered 
out; finished in 0.03s
   ```
   
   ### 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