Solve constraints together and in the order they are added (#360)

* Solve named argument constraints when record type dereferencing fails

* Revert "Solve named argument constraints when record type dereferencing fails"

This reverts commit ca38a171a9eefdddbc3f6a41f8a268c42662cd7a.

* Solve constraints together and in order

* Fix dialyzer warnings

* Add comment on solve_known_record_types

* Remove unused function
This commit is contained in:
Gaith Hallak
2021-12-16 13:54:06 +02:00
committed by GitHub
parent 40c78c1707
commit 60f3a484e6
3 changed files with 200 additions and 224 deletions
+5 -1
View File
@@ -168,6 +168,7 @@ compilable_contracts() ->
"maps",
"oracles",
"remote_call",
"remote_call_ambiguous_record",
"simple",
"simple_storage",
"spend_test",
@@ -676,7 +677,10 @@ failing_contracts() ->
<<?Pos(15, 5)
"Cannot unify bytes(26)\n"
" and bytes(25)\n"
"at line 15, column 5">>,
"when checking the type of the expression at line 15, column 5\n"
" Bytes.concat(x, y) : bytes(26)\n"
"against the expected type\n"
" bytes(25)">>,
<<?Pos(17, 5)
"Failed to resolve byte array lengths in call to Bytes.concat with arguments of type\n"
" - bytes(6) (at line 16, column 24)\n"
@@ -0,0 +1,11 @@
contract interface Coin =
entrypoint mint : () => int
contract interface OtherCoin =
entrypoint mint : () => int
main contract Main =
function mkCoin() : Coin = ct_11111111111111111111111111111115rHyByZ
entrypoint foo() : int =
let r = mkCoin()
r.mint()