incorrect error message when a struct literal is assigned to a mismatched type — reports expected value instead of expected struct_name.
Steps to Reproduce
- Declare a variable of type
xy.
- Assign it a struct literal of type
xyz.
xy a = xyz{x:0, y:0, z:0};
Actual Behavior
The compiler produces the following error:
error: type mismatch: expected value, but got xyz
--> playground/main.gs:7:12
|
7 | xy a = xyz{x:0,y:0,z:0};
| ^^^
|
Expected Behavior
The error message should name the expected type explicitly:
error: type mismatch: expected xy, but got xyz
--> playground/main.gs:7:12
|
7 | xy a = xyz{x:0,y:0,z:0};
| ^^^
|
incorrect error message when a struct literal is assigned to a mismatched type — reports
expected valueinstead ofexpected struct_name.Steps to Reproduce
xy.xyz.Actual Behavior
The compiler produces the following error:
Expected Behavior
The error message should name the expected type explicitly: