Skip to content

Infer Option::None from send and Box::new expected types (v0.1.20) - #19

Merged
Cod-e-Codes merged 1 commit into
mainfrom
fix/v0.1.20-send-option-none
Aug 14, 2026
Merged

Infer Option::None from send and Box::new expected types (v0.1.20)#19
Cod-e-Codes merged 1 commit into
mainfrom
fix/v0.1.20-send-option-none

Conversation

@Cod-e-Codes

Copy link
Copy Markdown
Owner

Summary

  • Type checker: send(&tx, Option::None) infers T from Sender<T>, and Box::new(Option::None) infers from an expected Box<Option<...>>. This impacts passing unannotated no-payload generic variants into send or Box::new (user-function call arguments already inferred in 0.1.19). Unannotated let empty = Option::None still requires an annotation.

Test plan

  • cargo fmt --check
  • cargo test
  • cargo clippy -- -D warnings
  • tests/test_runner.sh (Linux CI)
  • Example ion-build projects compile
  • Confirm send(&tx, Option::None) and Box::new(Option::None) compile; unannotated let empty = Option::None still errors

Builtin value parameters were not checking-mode sites, so send(&tx, Option::None) still required a typed temporary after user-function calls already inferred T.
@Cod-e-Codes
Cod-e-Codes merged commit 230c92b into main Aug 14, 2026
7 checks passed
@Cod-e-Codes
Cod-e-Codes deleted the fix/v0.1.20-send-option-none branch August 14, 2026 02:10
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.

1 participant