lpython icon indicating copy to clipboard operation
lpython copied to clipboard

Support `Literal` annotation

Open Smit-create opened this issue 2 years ago • 3 comments

Fixes #1939

Smit-create avatar Jun 21 '23 03:06 Smit-create

@rebcabin Literal[i32(0)] means that the actual runtime value of this variable can only be i32(0)?

This PR is a start on that, but we do not actually check this, so the implementation is not finished. Given that, should we give a warning that this is not enforced yet?

certik avatar Jun 21 '23 14:06 certik

@rebcabin Can you please review this? Thanks

Smit-create avatar Jul 31 '23 12:07 Smit-create

I am a little worried about adding types that we don't actually support yet.

certik avatar Jul 31 '23 12:07 certik