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

roc test: entered unreachable code: no borrow signature for LambdaName #7509

Open
phtrivier opened this issue Jan 13, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@phtrivier
Copy link
Contributor

phtrivier commented Jan 13, 2025

  • Using "ubuntu mate 24.04" on an x86_64
○ → lscpu
Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          39 bits physical, 48 bits virtual
  Byte Order:             Little Endian
CPU(s):                   8
  On-line CPU(s) list:    0-7
Vendor ID:                GenuineIntel
  Model name:             Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
○ → lsb_release --all
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.1 LTS
Release:	24.04
Codename:	noble

  • Using a recent nighly
○ → roc --version
roc nightly pre-release, built from commit a089cf2 on Di 07 Jan 2025 09:02:06 UTC

Given two files:

  • Foo.roc :
module [
    foo,
]

foo = { bar: 42 }
  • main.roc
app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br" }

import pf.Stdout
import Foo

expect
    f = Foo.foo
    f.bar == 42

main! = \_args ->
    try Stdout.line! "Ok"
    Ok {}
    

When running roc test:

thread 'main' panicked at crates/compiler/mono/src/inc_dec.rs:984:33:
internal error: entered unreachable code: no borrow signature for LambdaName { name: `Foo.foo`, niche: Niche(Captures([])) } layout
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

If i replace the expectation with:

expect Foo.foo.bar == 42

Then test is successful:

○ → roc test
0 failed and 1 passed in 215 ms.
@Anton-4
Copy link
Collaborator

Anton-4 commented Jan 14, 2025

Thanks for the detailed error report @phtrivier :)

Notes for a future investigator: We have several issues with "no borrow signature for LambdaName" but this is the only one that panics in crates/compiler/mono/src/inc_dec.rs

@Anton-4 Anton-4 added the bug Something isn't working label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants