No roc check error when trying to access non-existent record field

Open
#250 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Domain
compilers

Research direction

Start with the reproducer in ./test/fx/temp.roc and run ./zig-out/bin/roc check ./test/fx/temp.roc, then run the file to compare the checker and runtime behavior. Done means accessing record.blabla is reported by roc check as an error instead of passing the check and crashing at runtime.

Written by the indexing model from the issue text.

Description

app [main!] { pf: platform "./platform/main.roc" }

import pf.Stdout

main! = || {
    record = { first: "Hello" }
    Stdout.line!(record.blabla)
}
❯ ./zig-out/bin/roc check ./test/fx/temp.roc
No errors found in 4.7 ms for ./test/fx/temp.roc

roc on  main [?] is 📦 v0.0.1 via 🦀 via ↯ v0.15.2 
❯ ./zig-out/bin/roc ./test/fx/temp.roc      

Roc crashed: Error evaluating from shared memory: TypeMismatch
error: Failed to run with POSIX fd inheritance: error.ProcessExitedWithError
Dominant language
Shell
Stars
46
Forks
19
Avg merge
13h 38m
Merged PRs (30d)
19

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from roc-lang/examples

All issues in roc-lang/examples

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.