Skip to content

Conversation

mivort
Copy link
Contributor

@mivort mivort commented Sep 30, 2025

This patch adds output of ConvertError's Display to debug-only check's panic message which provides additional context when type mismatch happens.

Panic message would include the intended type name and what was given instead of it.

The output would look roughly like this:

copied array should have same type as original array:
expected array of type Builtin(DICTIONARY), got Untyped: []

@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-1348

This patch adds output of `ConvertError`'s `Display` to debug-only
check's panic message which provides additional context when type
mismatch happens.

Panic message would include the intended type name and what was given
instead of it.

The output would look roughly like this:
```
copied array should have same type as original array:
expected array of type Builtin(DICTIONARY), got Untyped: []
```
@mivort mivort force-pushed the clone-validation-more-context branch from c85aa9c to e420f5f Compare October 3, 2025 22:08
@TitanNano
Copy link
Contributor

In which scenario did you encounter this expect actually failing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants