roc icon indicating copy to clipboard operation
roc copied to clipboard

Thread panick when running destructure in top-level.

Open LawftyGoals opened this issue 1 year ago • 1 comments

While running the following code: `app "hello" packages { pf: "https://github.com/roc-lang/basic-cli/releases/download/0.7.1/Icc3xJoIixF3hCcfXrDwLCu4wQHtNdPyoJkEbkgIElA.tar.br" } imports [pf.Stdout] provides [main] to pf

{x, y} = {x:1, y:2}

main = Stdout.line "${Num.toStr x}" `

The following error occurs: thread '<unnamed>' panicked at 'not yet implemented: top-level destrucuture patterns are not implemented', crates/compiler/load_internal/src/file.rs:5962:26 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

The program is then stuck until ctrl+c is pressed.

LawftyGoals avatar Jan 30 '24 18:01 LawftyGoals

@rtfeldman something to consider in the new can rewrite maybe. I think it's not implemented because of complexity, but better design can make it easier maybe?

folkertdev avatar Jan 31 '24 10:01 folkertdev