You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return type does not have to be equal for a constructor function type to be a subtype of a functiontype. The adt type should be a subtype of the function return type.
Describe the bug
The typechecker does not show errors when passing a constructor where a value of the type of the ADT would be expected.
To Reproduce
Expected behavior
Errors on the first calls of
x
andy
, thatA::a(int i)
is not of typeA
.The text was updated successfully, but these errors were encountered: