Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract polymorphism crashes on non-obvious child contract typing #404

Closed
radrow opened this issue Aug 2, 2022 · 0 comments · Fixed by #407
Closed

Contract polymorphism crashes on non-obvious child contract typing #404

radrow opened this issue Aug 2, 2022 · 0 comments · Fixed by #407
Assignees
Labels

Comments

@radrow
Copy link
Member

radrow commented Aug 2, 2022

Repro:

contract interface I =
  entrypoint f : () => int

contract C1 : I =
  entrypoint f() = 123

contract C2 : I =
  entrypoint f() = 888

namespace Make =
  stateful function new1() : I = Chain.create() : C1
  stateful function new2() : I = Chain.create() : C2

  stateful function new(c : I) : int =
    c.f()

This is caused by fcode compiler looking for bytecode of I for some reason (which doesn't make any sense since 1) it is not needed 2) it doesn't even exist).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants