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

No output at all when destructuring a bit array #101

Open
michallepicki opened this issue May 25, 2024 · 1 comment
Open

No output at all when destructuring a bit array #101

michallepicki opened this issue May 25, 2024 · 1 comment
Labels
bug Something isn't working help wanted Contributions encouraged

Comments

@michallepicki
Copy link

michallepicki commented May 25, 2024

Two examples, I'm told first one should result in a run-time crash:

import gleam/io

pub fn main() {
  let assert <<"\n":utf8, tail>> = <<"\ngoodbye":utf8>>
  io.debug(tail)
}

and this one I would expect to print the bytes of goodbye:

import gleam/io

pub fn main() {
  let assert <<"\n":utf8, tail:bytes>> = <<"\ngoodbye":utf8>>
  io.debug(tail)
}

edit: or maybe actually both should be compiler errors about the utf8 option on js target

@lpil
Copy link
Member

lpil commented May 25, 2024

Thank you

@lpil lpil added bug Something isn't working help wanted Contributions encouraged labels May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Contributions encouraged
Projects
None yet
Development

No branches or pull requests

2 participants