840 Commits

Author SHA1 Message Date
Gaith Hallak
113d699b01 Fix variance inference 2022-05-27 15:45:26 +04:00
Gaith Hallak
24178f15d0 Rename functions in variance switching tests for readability 2022-05-25 21:10:06 +04:00
Gaith Hallak
e4db742c72 Rename test files to have common prefix 2022-05-25 19:55:01 +04:00
Gaith Hallak
9e3f42db2c Default to invariant when the variance of the type vars is unknown 2022-05-25 19:38:10 +04:00
Gaith Hallak
8d419bc54f Add test for accessing maps with the wrong type 2022-05-25 19:38:10 +04:00
Gaith Hallak
0c8b95c16d Change the variance of the oracle_query type vars 2022-05-25 19:38:10 +04:00
Gaith Hallak
ef3b0dece9 Rename datatypes in custom types variance switching test for readability 2022-05-25 19:38:10 +04:00
Gaith Hallak
025e0f7b8f Handle comments about polymorphism_variance_switching.aes 2022-05-25 19:38:10 +04:00
Gaith Hallak
8067d15a41 Give clear names to the records in records variance switching test 2022-05-25 19:38:10 +04:00
Gaith Hallak
e5c6efc8ae Test variance switching for bivariant records 2022-05-25 19:38:10 +04:00
Gaith Hallak
08d0c7034f Add the context to unification error 2022-05-25 19:38:10 +04:00
Gaith Hallak
983e7165b0 Replace compare_types with non-throwing version of unify 2022-05-25 19:38:10 +04:00
Gaith Hallak
075fb8a659 Add tests for oracles and oracle queries 2022-05-25 19:38:10 +04:00
Gaith Hallak
7d5ea6a39e Handle builtin types type variables separately 2022-05-25 19:38:10 +04:00
Gaith Hallak
136035b952 Enable variance switching for record types 2022-05-25 19:38:10 +04:00
Gaith Hallak
d06a61cc22 Add test for variance switching in records 2022-05-25 19:38:10 +04:00
Gaith Hallak
3b3e24fb83 Restore test.aes 2022-05-25 19:38:10 +04:00
Gaith Hallak
94c8bc3671 Make interfaces declare functions from extended interfaces 2022-05-25 19:38:10 +04:00
Gaith Hallak
5624279d6d Rename check_implemented_interfaces_recursive to check_implemented_interfaces1 2022-05-25 19:38:10 +04:00
Gaith Hallak
3fc6d47223 Fix previous commit 2022-05-25 19:38:10 +04:00
Gaith Hallak
3b7b207527 Add tests for option and type aliases 2022-05-25 19:38:10 +04:00
Gaith Hallak
f92e995931 Remove arrows_in_type and use infer_type_vars_variance instead 2022-05-25 19:38:10 +04:00
Gaith Hallak
2883b41beb Test only for covariance and contravariance 2022-05-25 19:38:10 +04:00
Gaith Hallak
96d9509b44 Compare named args in fun_t 2022-05-25 19:38:10 +04:00
Gaith Hallak
78d2ce2e75 Use is_list to check if a var is a list 2022-05-25 19:38:10 +04:00
Gaith Hallak
822d54709e Fixes from the reviews 2022-05-25 19:38:10 +04:00
Gaith Hallak
94c2f998ae Don't destroy and recreate type errors table when not needed 2022-05-25 19:38:10 +04:00
Gaith Hallak
8a9c2a61b2 Add type_vars_uvar ets table to ets_tables() 2022-05-25 19:38:10 +04:00
Gaith Hallak
8e888430d9 Mark tvars as invariant 2022-05-25 19:38:10 +04:00
Gaith Hallak
1980eb30bf Fix warning 2022-05-25 19:38:10 +04:00
Gaith Hallak
ae9b8f8b16 Make is_subtype/4 a separate function 2022-05-25 19:38:10 +04:00
Gaith Hallak
b9af3dbe7f Make opposite_variance a separate function 2022-05-25 19:38:10 +04:00
Gaith Hallak
918346445f Add testing for custom types variance switching 2022-05-25 19:38:10 +04:00
Gaith Hallak
dd259fbc96 Fix dialyzer warning 2022-05-25 19:38:10 +04:00
Gaith Hallak
44bd16264a Variance switching for custom datatypes 2022-05-25 19:38:10 +04:00
Gaith Hallak
3a00476f88 Fix tests after rebase 2022-05-25 19:38:10 +04:00
Gaith Hallak
e5e7958c3f Add tests for variance switching 2022-05-25 19:38:10 +04:00
Gaith Hallak
4348affa3e Fix broken abi tests 2022-05-25 19:38:10 +04:00
Gaith Hallak
77f1631467 Fix broken tests 2022-05-25 19:38:10 +04:00
Gaith Hallak
01fb058def Add variance switching 2022-05-25 19:38:10 +04:00
Gaith Hallak
a068822278 Revert "Draft: Add variance switching"
This reverts commit 92dc6ac169cfbff447ed59de04994f564876b3fb.
2022-05-25 19:38:10 +04:00
Gaith Hallak
b1b7f6cf6d Draft: Add variance switching 2022-05-25 19:38:10 +04:00
Gaith Hallak
88666a36d2 Add tests for interfaces implementing interfaces 2022-05-25 19:38:10 +04:00
Gaith Hallak
adb3455f25 Add test for implementing two interfaces with entrypoints of same names and different types 2022-05-25 19:38:10 +04:00
Gaith Hallak
918ff94a37 Add test for implementing multiple interfaces 2022-05-25 19:38:10 +04:00
Gaith Hallak
df676ff6e9 Report undefined interface errors before checking implemented interfaces 2022-05-25 19:38:10 +04:00
Gaith Hallak
03413ab0d4 Fix the comparison between unit and empty tuple 2022-05-25 19:38:10 +04:00
Gaith Hallak
d8db908485 Add new tests and fix old tests 2022-05-25 19:38:10 +04:00
Gaith Hallak
6003aacdea Fix pretty printing 2022-05-25 19:38:10 +04:00
Gaith Hallak
4c25489963 Add polymorphism to infer types 2022-05-25 19:38:09 +04:00