Zilliqa / scilla-rtl

Execute Scilla code compiled by the Scilla -> LLVM compiler.
GNU General Public License v3.0
8 stars 3 forks source link

Add type assignability function and tests #19

Closed vaivaswatha closed 3 years ago

vaivaswatha commented 3 years ago

All relevant tests from the Scilla OCaml implementation have been ported.

vaivaswatha commented 3 years ago

@jjcnn bool Typ::assignable(const Typ *To, const Typ *From) in ScillaTypes.cpp is the one that requires your review. Thank you.

vaivaswatha commented 3 years ago

Thanks @jjcnn . Your version of the loops is definitely better than my first version of it https://github.com/Zilliqa/scilla-vm/pull/19/commits/51d9431ceed9b861e179969ada008490fe02c3af.

I'm not sure if I should use yours or my later version that uses std::find_if. Both seem good to me. Let me think about it.

Thank you again :)