jakt
jakt copied to clipboard
selfhost/typechecker: Output type mismatch error after generic type p…
…arameter number mismatch error
- Output
Type mismatchaftermismatched number of generic parameters for Terror - Extract
Type mismatcherror to a helper function
This gets us closer to pass constructor_with_different_generic_instance.jakt. But because currently unknown and void points to the same type the error message is not exactly as wanted. This change now additionally outputs
Error: Type mismatch: expected ‘B’, but got ‘[void]’
----- tests/typechecker/constructor_with_different_generic_instance.jakt:12:13
11 | function main() {
12 | mut a = A(b: [])
^- Type mismatch: expected ‘B’, but got ‘[void]’
13 | }
-----
The expected output is Type mismatch: expected ‘B’, but got ‘[unknown]’
This has conflicts.
Closing this since it's had conflicts for 2 months with no further work.