Polymorphism support #848

Merged
ghallak merged 53 commits from ghallak/307 into master 2022-06-17 18:09:07 +09:00
Showing only changes of commit 1980eb30bf - Show all commits

View File

@ -2796,7 +2796,7 @@ unify1(_Env, A, B, _Variance, When) ->
cannot_unify(A, B, When), cannot_unify(A, B, When),
false. false.
is_subtype(Env, NameA, NameB, invariant) -> is_subtype(_Env, NameA, NameB, invariant) ->
NameA == NameB; NameA == NameB;
is_subtype(Env, NameA, NameB, covariant) -> is_subtype(Env, NameA, NameB, covariant) ->
is_subtype(Env, NameA, NameB); is_subtype(Env, NameA, NameB);