v
v copied to clipboard
checker: avoid &Type as generic concrete type on usage
Fix #18440 Fix #18367
🤖 Generated by Copilot at c6065ce
Prevent using reference types as generic concrete types in the compiler. Add a test case and an error message for this scenario.
🤖 Generated by Copilot at c6065ce
- Check for ampersand token after opening bracket in
parse_type.vand callerror_with_poswith message and position (link) - Add expected compiler error message in
wrong_ref_type_as_concrete_err.outsuggesting to use generic type parameter instead (link) - Add test case in
wrong_ref_type_as_concrete_err.vvthat importsdatatypesmodule, defines heap-allocated structUser, and tries to create doubly linked list of references toUser(link)
What is the status of this PR?