Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt new method semantic #430

Merged
merged 3 commits into from
Jan 17, 2025
Merged

Conversation

Guest0x0
Copy link
Collaborator

Adapt the semantic change in moonbitlang/core#1472:

  • update documentation of method
  • fix warnings in test sources

Copy link

peter-jerry-ye-code-review bot commented Jan 17, 2025

‼️ This code review is generated by a bot. Please verify the content before trusting it.

After analyzing the git diff, here are the key problems I've identified:

  1. Inconsistent Method Invocation: Throughout the code, there are changes from List::of to @immut/list.of. This indicates that the code was using the wrong namespace/package for list operations. The changes make it more explicit by using the qualified path @immut/list.of.

  2. Missing Namespace Qualification: In the operator overloading section, there's a change from push(5) to Array::push(5), suggesting that the original code was missing proper namespace qualification for the Array methods. This could have led to ambiguity or incorrect method resolution.

  3. Documentation Inconsistency: In the methods documentation (methods.md), there are structural changes in how method definitions are explained. The original documentation was less clear about the two different ways to define methods (fn method_name(self: T, ..) vs fn T::method_name(..)). The updated version makes this distinction more explicit and provides clearer guidelines on when to use each approach.

These changes generally improve code clarity and reduce potential ambiguity in method resolution and namespace usage.

@Guest0x0 Guest0x0 force-pushed the Guest0x0/adapt-new-method-semantic branch 4 times, most recently from 77b6447 to 878e528 Compare January 17, 2025 08:17
@Guest0x0 Guest0x0 force-pushed the Guest0x0/adapt-new-method-semantic branch from 878e528 to 9d2d6f8 Compare January 17, 2025 08:20
@peter-jerry-ye peter-jerry-ye merged commit 10cb441 into main Jan 17, 2025
16 checks passed
@peter-jerry-ye peter-jerry-ye deleted the Guest0x0/adapt-new-method-semantic branch January 17, 2025 09:32
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