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] "use of unknown declaration" on misuse of @nonmaterializable #2836

Open
oskgo opened this issue May 26, 2024 · 0 comments
Open

[BUG] "use of unknown declaration" on misuse of @nonmaterializable #2836

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

Comments

@oskgo
Copy link

oskgo commented May 26, 2024

Bug description

Using @nonmaterializable(T) with certain T emits the error: "use of unknown declaration 'nonmaterializable'" when it shouldn't.

Steps to reproduce

Case where the error shouldn't be emitted because we already get an error for the cause (the nonexistent type):

@nonmaterializable(nonexistenttype)
struct Bar:
    pass

Case where a different error should be emitted (unless this should be supported?):

struct Foo[T: AnyType]:
    pass

@nonmaterializable(Foo[Int])
struct Bar:
    pass

System information

- Ubuntu in WSL
- mojo 2024.5.2605 (9c328b12)
- modular 0.8.0 (39a426b5)
@oskgo oskgo added bug Something isn't working mojo-repo Tag all issues with this label labels May 26, 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 mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

1 participant