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

[BUG] Compiler crashes when trying to resolve the type of method with inferred parameter #3552

Open
soraros opened this issue Sep 26, 2024 · 0 comments
Labels
bug Something isn't working crash mojo-repo Tag all issues with this label

Comments

@soraros
Copy link
Contributor

soraros commented Sep 26, 2024

Bug description

Mojo compiler can't resolve the type of a method with an inferred parameter from a struct with variadic parameter. Crash with message:

Stack dump:
0.      Program arguments: /workspaces/mojo/.magic/envs/default/bin/mojo run /workspaces/mojo/playground/bug.mojo
1.      Crash resolving decl signature at loc("/workspaces/mojo/playground/bug.mojo":2:6)
    >>   fn f[T: Movable, //](self, x: T):
            ^.............................<
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  mojo      0x000055d16e252d5b
1  mojo      0x000055d16e250cb9
2  mojo      0x000055d16e2533fd
3  libc.so.6 0x00007fd3e2a42520
4  mojo      0x000055d16adf2fa5
mojo crashed!

Steps to reproduce

struct S[*Ts: Int]:
  fn f[T: Movable, //](self, x: T):
    pass

System information

Mojo 2024.9.2517 (727c911c) on Docker, Intel Mac
@soraros soraros added bug Something isn't working mojo-repo Tag all issues with this label labels Sep 26, 2024
@JoeLoser JoeLoser added the crash label Sep 30, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

2 participants