Skip to content

Fix compiler warnings - #134

Merged
bobzhang merged 6 commits into
mainfrom
agent/fix-compiler-warnings
Jul 14, 2026
Merged

bobzhang merged 6 commits into
mainfrom
agent/fix-compiler-warnings

Conversation

@bobzhang

Copy link
Copy Markdown
Contributor

Summary

  • replace deprecated try? captures with explicit Result construction where the result must escape
  • migrate deprecated list constructors and disambiguate empty map literals
  • remove redundant constructor qualifiers in code and tested documentation

Why

The latest MoonBit compiler reports 32 warnings for syntax and APIs that have become deprecated or ambiguous. These warnings make routine checks noisy and risk turning into future build failures.

Impact

Builds are warning-free across all supported targets. Error-to-property conversion behavior is preserved, and generated public interfaces are unchanged.

Validation

  • moon check --target all --warn-list +unnecessary_annotation --deny-warn --diagnostic-limit 1000
  • moon test --target all --warn-list +unnecessary_annotation --diagnostic-limit 1000 (304 tests passed on each target)
  • moon fmt
  • moon info (no public API diff)

@bobzhang
bobzhang marked this pull request as ready for review July 14, 2026 14:28
@bobzhang
bobzhang merged commit 8f8b587 into main Jul 14, 2026
12 checks passed
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