The fix was adding `is_constant = false;`
I also removed the unnecessary check regarding the first element of the
BitSet, since it's checked inside the loop, and also fixed a typo in the
message.
Quaternions and complex numbers are constructed with `quaternion` and
`complex`, but their types are of the `*N` form.
These suggestions should point the user in the right direction.
Enhance support for polymorphic procedures in type checking
1. In src/check_type.cpp, added special handling for polymorphic procedures used as default parameter values. We now allow a polymorphic procedure to be used as a default parameter value, even when its type parameters can't be immediately determined.
2. In src/check_expr.cpp, we modified the check_is_assignable_to_with_score function to handle the special case of assigning a polymorphic procedure as a default parameter. The function now allows a polymorphic procedure to be assigned to a concrete procedure type in this specific context.
Previously, it implied that these are different types:
```
W:/Scratch/scratch.odin(17:5) Error: Cannot compare expression, operator '==' not defined between the types 'Handle_Map($T=u32, $HT=u32, $Max=10000)' and 'Handle_Map($T=u32, $HT=u32, $Max=10000)'
if m == {} {
^~~~~~^
```
Now:
```
W:/Scratch/scratch.odin(20:5) Error: Cannot compare expression. Type 'Handle_Map($T=u32, $HT=u32, $Max=10000)' is not simply comparable, so operator '==' is not defined for it.
if m == {} {
^~~~~~^
```
It's a bit of a band aid fix because the field will get the type of the
alias, not the base type, but that was already the case before #5045 so
it's forward progression.
Closes#5092Fixes#5061
This vet flag will make it so that allocators must be explicitly used
in places where context.allocator and context.temp_allocator are a
procedure parameter.
The goal of this flag is to prevent using the context.allocator in
cases where a different allocator was meant to be used.
Some code bases default context.allocator to nil/panic allocator
to catch this at runtime. This effectively makes it a compile
time error instead.