ProvableHQ / leo

🦁 The Leo Programming Language. A Programming Language for Formally Verified, Zero-Knowledge Applications
https://leo-lang.org/
GNU General Public License v3.0
4.78k stars 661 forks source link

[Epic] Type Cast Design and Implementation #959

Open acoglio opened 3 years ago

acoglio commented 3 years ago
gluax commented 3 years ago

As a heads up, a lot of work for casting was done by @Protryon already. Not sure what is or isn't missing.

acoglio commented 3 years ago

Yes. I referenced @Protryon's proposal issue #600 in the first item. I also looked for some PRs, but didn't see any. @Protryon, is there some implementation code already?

gluax commented 3 years ago

There are cast code in the parser all the way to the compiler. So it seems to be pretty feature complete. We may need to update it to deal with the new type char, though.

acoglio commented 3 years ago

Nice! So it shouldn't take long to check this one off.

collinc97 commented 2 years ago

Moving this feature to a future sprint. Will be marking as low priority for now.

AlexZhao6666 commented 1 year ago

now cast can work?https://github.com/AleoHQ/leo/pull/2426

d0cd commented 1 year ago

Certain cast operations are supported. Currently only between groups, addresses, and fields (can downcast to smaller types). Other operations still need to be supported by snarkVM.