sophia/test/contracts/polymorphism_variance_switching_chain_create_fail.aes
Gaith Hallak c98ea25e8b
Fix: Get the type of Chain.create() from its application (#407)
* Get the type of Chain.create() from its application

* Add test contract

* Update CHANGELOG.md

* Update the tests

* Update tests again
2022-08-03 22:24:22 +02:00

12 lines
313 B
Plaintext

contract interface I =
entrypoint f : () => int
contract C : I =
entrypoint f() = 123
main contract Main =
stateful entrypoint test() =
let c1 : I = Chain.create() // fails
let c2 : C = Chain.create() : I // fails
let c3 = Chain.create() : I // fails
()