Open edyu opened 11 months ago
I also found that the following is allowed, so it seems that this bug only happens inside the declaration
field_matrix :: proc($N: int) -> any where N <= 4 {
result: matrix[N, N]int
return result
}
Found some more interesting behavior... This is not legal
field_matrix :: proc($N: int, m: matrix[N, N]int) -> int where N <= 4 {
return N
}
But this IS legal and used in the core library
field_matrix :: proc(m: matrix[$N, N]int) -> int where N <= 4 {
return N
}
I'm currently trying to debug this and I'm not sure how this happens yet as I'm not too familiar with the codebase
I encountered this one just now. It was the second procedure I ever wrote in Odin, in first hour of experimentation. Couldn't figure out what I was doing wrong. My luck :)
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
odin report
output:Expected Behavior
Please describe the behavior you are expecting
or
should both work. The following without
matrix
however does workworks
Current Behavior
compiler would complain
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Failure Logs
Please include any relevant log snippets or files here.