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

size_of can query the size of generic types and cause a panic #154

Open
PROMETHIA-27 opened this issue Feb 13, 2023 · 1 comment
Open

size_of can query the size of generic types and cause a panic #154

PROMETHIA-27 opened this issue Feb 13, 2023 · 1 comment

Comments

@PROMETHIA-27
Copy link

Minimal repro:

type Generic t = 
    inner: t
print <| size_of <| MkType : Type Generic

This causes the following error:
thread 'main' panicked at 'Kind error during llvm code generation', src\hir\monomorphisation.rs:278:9

This one seems like it'll require some actual design work to fix, unless it's a mistake that a generic type can be used like this in the first place.

@jfecher
Copy link
Owner

jfecher commented Feb 15, 2023

Yes, this looks like I'll need to add proper kind checking to resolve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants