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

Implement MutatingSlice #1561

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Implement MutatingSlice #1561

wants to merge 3 commits into from

Conversation

kyouko-taiga
Copy link
Contributor

Everything is in the title.

Name resolution may fail to resolve the right subscript variant if
it is looked up from a generic type conforming to `MutableCollection`
without this change.

See also https://github.com/orgs/hylo-lang/discussions/1553
/// The "past-the-end" position in `self`.
private let upper: Base.Position

/// Creates an instance with the given source.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Creates an instance with the given source.
/// Creates an instance projecting the elements at `lower..<upper` in `base`.

FWIW, "the given" is usually a mistake.

(self.base == other.base) && (self.lower == other.lower) && (self.upper == other.upper)
}

/// Projects a slice of `base` presenting its elements from `lower` to `upper`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little ambiguous as to whether the range is half-open.

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