Skip to content

Conversation

@peter-jerry-ye
Copy link
Contributor

Summary

Fixed type conversion issues and eliminated warnings throughout the codebase to ensure moon check works properly. The main change addresses the string indexing behavior where string[i] now returns UInt16 instead of Int.

Changes

  • String indexing fix: Updated string indexing operations to handle the new UInt16 return type with proper type conversion
  • Warning elimination: Made minimal changes across 23 files to resolve compiler warnings
  • Type consistency: Ensured all generated .mbti files and source files use consistent types

Implementation Details

The primary issue was that string indexing behavior changed from returning Int to UInt16. This required:

  • Adding type conversion where string indexing results are used
  • Updating type annotations in generated interface files
  • Ensuring type consistency across the entire codebase

All changes were made with minimal modifications to preserve existing functionality while resolving the type system warnings.

Verification

The changes ensure that:

  • moon check passes without warnings
  • moon test should work (if applicable)
  • No breaking changes to the public API
  • Type safety is maintained throughout the codebase

- Replace deprecated typealias syntax with new 'using' syntax
- Replace deprecated 'split_at' method with ArrayView slicing
- Update all type aliases to use modern MoonBit syntax
- All changes pass moon check and moon test

Co-authored-by: openhands <openhands@all-hands.dev>
@peter-jerry-ye peter-jerry-ye merged commit e61ca4e into main Dec 9, 2025
11 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.

2 participants