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

Unreported internal error when matching array of U8 #4554

Open
junetried opened this issue Nov 28, 2024 · 1 comment
Open

Unreported internal error when matching array of U8 #4554

junetried opened this issue Nov 28, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed needs investigation This needs to be looked into before its "ready for work"

Comments

@junetried
Copy link

The following code causes ponyc to return Error: internal failure not reported:

actor Main
    new create(env: Env) =>
        let arr: Array[U8 val] = [4; 5]
        match arr
        | [2; 3] => env.out.print("two and three")
        | [4; 5] => env.out.print("four and five")
        else
            env.out.print("something else")
        end

This modified version instead (correctly) gives a compile error, because Array does not implement eq:

actor Main
    new create(env: Env) =>
        let arr: Array[U8 val] = [4; 5]
        match arr
        | [U8(2); U8(3)] => env.out.print("two and three")
        | [U8(4); U8(5)] => env.out.print("four and five")
        else
            env.out.print("something else")
        end

Reproduced on my machine using ponyc 0.58.0-a161b7c9 and on the playground with ponyc 0.58.6-41be76e.

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Nov 28, 2024
@SeanTAllen SeanTAllen added help wanted Extra attention is needed bug Something isn't working needs investigation This needs to be looked into before its "ready for work" good first issue Good for newcomers and removed discuss during sync Should be discussed during an upcoming sync labels Nov 28, 2024
@jemc
Copy link
Member

jemc commented Dec 3, 2024

The "internal failure not reported" message is shown when a compiler pass fails, but did not emit any errors explaining why it failed.

The right course of action here is for someone to troubleshoot (probably by running ponyc under a debugger like lldb or gdb) exactly where/why the pass is failing, and add code that emits an appropriate error for that.

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Dec 3, 2024
@jemc jemc removed the discuss during sync Should be discussed during an upcoming sync label Dec 17, 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 good first issue Good for newcomers help wanted Extra attention is needed needs investigation This needs to be looked into before its "ready for work"
Projects
None yet
Development

No branches or pull requests

4 participants