Merge pull request #154 from aeternity/bug-with-old-tuple-syntax

Fix bug when using old tuple syntax
This commit is contained in:
Ulf Norell 2019-09-14 15:35:37 +02:00 committed by GitHub
commit 8e3483ced4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -783,7 +783,8 @@ check_type(_Env, Type = {uvar, _, _}, Arity) ->
ensure_base_type(Type, Arity),
Type;
check_type(_Env, {args_t, Ann, Ts}, _) ->
type_error({new_tuple_syntax, Ann, Ts}).
type_error({new_tuple_syntax, Ann, Ts}),
{tuple_t, Ann, Ts}.
ensure_base_type(Type, Arity) ->
[ type_error({wrong_type_arguments, Type, Arity, 0}) || Arity /= 0 ],