• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moonbitlang / core / 4906
91%

Build:
DEFAULT BRANCH: main
Ran 30 Jun 2026 11:41AM UTC
Jobs 1
Files 382
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jun 2026 11:40AM UTC coverage: 91.315% (+0.001%) from 91.314%
4906

push

github

bobzhang
feat(immut/hashmap): add HashMap constructor, deprecate from_array

The immutable `HashMap` was a positional newtype `struct HashMap(Node?)`,
whose tuple constructor reserved the `HashMap` name, so a `HashMap::HashMap`
function could not be defined.

Give the field a name instead:

    struct HashMap[K, V] { data : Node[K, V]? }

This frees the `HashMap` identifier (named structs construct via `{ data: ..}`,
not `HashMap(..)`) while keeping the exact same `Node?` representation, so the
internal logic is unchanged apart from `self.0` -> `self.data` and wrapping
results in `{ data: .. }`. The public type stays abstract (the field is
private), so its `.mbti` is unchanged apart from the new constructor.

Add `HashMap::HashMap(ArrayView[(K, V)]) -> HashMap[K, V]` so a map can be
built with `@hashmap.HashMap([...])`, deprecate the old `from_array` (and its
`of` alias) in favour of it, and migrate all usages across the package. The
`Show`/`output` format string and its snapshot tests intentionally keep
emitting `@immut/hashmap.from_array([...])`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

42 of 42 new or added lines in 1 file covered. (100.0%)

15341 of 16800 relevant lines covered (91.32%)

195679.46 hits per line

Jobs
ID Job ID Ran Files Coverage
1 4906.1 30 Jun 2026 11:41AM UTC 383
91.33
GitHub Action Run
Source Files on build 4906
  • Tree
  • List 382
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 8773eaee on github
  • Prev Build on main (#4904)
  • Next Build on main (#4908)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc