TypeMismatch errors will now show the expected type, and what was found ("Got")
When type-checking arrays and function params, use foldLeft to go from left to right, rather than right-to-left which is was resulting in unituitive errors.
Add a name property to BinaryOp, allowing errors to include the binary operator name (rather than just "binary operator")
Changed the user-display for:
? is now <unknown-type> (this should happen very rarely)
?[] is now array
pair(?, ?) is now pair
Fixed a bug where multiple indexes would return an index error for every index, instead of just once.
Additionally, return the proper type found rather than ?.
- `TypeMismatch` errors will now show the expected type, and what was found ("Got")
- When type-checking arrays and function params, use `foldLeft` to go from left to right, rather than right-to-left which is was resulting in unituitive errors.
- Add a `name` property to `BinaryOp`, allowing errors to include the binary operator name (rather than just "binary operator")
- Changed the user-display for:
- `?` is now `<unknown-type>` (this should happen very rarely)
- `?[]` is now `array`
- `pair(?, ?)` is now `pair`
- Fixed a bug where multiple indexes would return an index error for every index, instead of just once.
- Additionally, return the proper type found rather than `?`.
added 1 commit
<ul><li>ba1b7d67 - fix: return proper type in non-array index error (instead of `?`)</li></ul>
[Compare with previous version](/lab2425_spring/WACC_37/-/merge_requests/15/diffs?diff_id=148794&start_sha=88ddca2b987ffdf395f3cf834baa66751dd2352f)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
TypeMismatcherrors will now show the expected type, and what was found ("Got")foldLeftto go from left to right, rather than right-to-left which is was resulting in unituitive errors.nameproperty toBinaryOp, allowing errors to include the binary operator name (rather than just "binary operator")?is now<unknown-type>(this should happen very rarely)?[]is nowarraypair(?, ?)is nowpair?.added 1 commit
ba1b7d67- fix: return proper type in non-array index error (instead of `?`)Compare with previous version
changed the description
approved this merge request
mentioned in commit
ba5445a4c5