Fail on defined functions in contract prototypes #654

Merged
zxq9 merged 2 commits from fail-on-multiple-contracts into master 2019-10-01 21:28:06 +09:00
zxq9 commented 2019-10-01 20:52:12 +09:00 (Migrated from gitlab.com)

Created by: UlfNorell

Previously the AEVM backend silently accepted defined functions in contract prototypes, but did the wrong thing, and the FATE backend crashed in code generation.

We could in principle allow defined functions in contract prototypes, but disallowing them makes it clear that no code is generated for the prototypes.

Also gives a type error if you try to call a function in another contract as if the contract were a namespace (i.e. RemoteContract.some_fun(...)). Previously this crashed during code generation.

*Created by: UlfNorell* Previously the AEVM backend silently accepted defined functions in contract prototypes, but did the wrong thing, and the FATE backend crashed in code generation. We could in principle allow defined functions in contract prototypes, but disallowing them makes it clear that no code is generated for the prototypes. Also gives a type error if you try to call a function in another contract as if the contract were a namespace (i.e. `RemoteContract.some_fun(...)`). Previously this crashed during code generation.
zxq9 commented 2019-10-01 21:26:50 +09:00 (Migrated from gitlab.com)

Created by: happi

Review: Approved

*Created by: happi* **Review:** Approved
zxq9 commented 2019-10-01 21:28:01 +09:00 (Migrated from gitlab.com)

Created by: hanssv

Review: Approved

*Created by: hanssv* **Review:** Approved
zxq9 commented 2019-10-01 21:28:06 +09:00 (Migrated from gitlab.com)

Merged by: UlfNorell at 2019-10-01 12:28:06 UTC

*Merged by: UlfNorell at 2019-10-01 12:28:06 UTC*
Sign in to join this conversation.
No description provided.