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

forst-lang / forst / 24314986808 / 1
76%
main: 76%

Build:
DEFAULT BRANCH: main
Ran 12 Apr 2026 07:52PM UTC
Files 193
Run time 4s
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

12 Apr 2026 07:48PM UTC coverage: 62.993% (+0.1%) from 62.887%
24314986808.1

push

github

haveyaseen
fix(typechecker): narrow Result ensure blocks to the failure branch

`ensure x is Ok() { ... }` / `Err()` now refines the subject inside the block to
the payload type that matches the generated `if !(ok)` branch (F after Ok, S
after Err), then applies successor narrowing for the passing path. Adds
`Ok()`/`Err()` method typing and completion on built-in `Result(S, F)`.

Example:

```forst
x := f()
ensure x is Ok() {
  println(x) // failure payload while Ok() is false
}
println(x.Ok())
```

fix(transformer): map narrowed Result locals to split Go names

When a Result binding is narrowed out of `Result` form, plain references and
`x.Ok()`/`x.Err()` calls target the correct success/error Go identifiers;
`println` expands only while the binding is still a full Result. Restores the
ensure block scope before lowering the failure body so narrowing matches the
typechecker.

feat(lsp): qualify guard hovers using the inferred subject type

Guard identifiers after `is` use `InferredTypesForVariableIdentifier` so hovers
show titles like `Int.GreaterThan` instead of only the bare guard name.

Example:

```forst
ensure n is GreaterThan(0)
```

fix(printer): format `ensure` error alternatives and nested statement indentation

Prints `or` clauses on their own indented line; avoids double-indenting
statements that already embed nested block layout.

feat(vscode-forst): highlight nominal `error Name` and core builtin types

Adds a pattern for `error Name { ... }`, treats `error` as a declaration
keyword, classifies `Error`/`Result`/`Tuple`, and highlights `true`/`false`.

test: extend Result narrowing, LSP hover, and typechecker coverage

Updates `examples/in/ensure.ft` and golden `ensure.go` for the Result-based flow.

16792 of 26657 relevant lines covered (62.99%)

20.45 hits per line

Source Files on job 24314986808.1
  • Tree
  • List 193
  • Changed 11
  • Source Changed 0
  • Coverage Changed 11
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24314986808
  • 3d47e0fa on github
  • Prev Job for on main (#24313529117.1)
  • Next Job for on main (#24315038891.1)
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