ante icon indicating copy to clipboard operation
ante copied to clipboard

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

Open PROMETHIA-27 opened this issue 2 years ago • 1 comments

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.

PROMETHIA-27 avatar Feb 13 '23 20:02 PROMETHIA-27

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

jfecher avatar Feb 15 '23 17:02 jfecher