You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior:
Procedures fn* don't specify the specialization of the parapoly struct. fn1 reports on invalid signature, as expected. fn2 works. fn3 gives an error when using the argument. (Error messages in code snippet)
Expected behavior:
The signature proc(s: ^Parapoly_Struct) of fn2 and fn3 should report on invalid signature like fn1 does.
package main
Parapoly_Struct :: struct($T: typeid) {
entry: T
}
// Error: Invalid use of a non-specialized polymorphic type 'Parapoly_Struct'
fn1 :: proc(s: Parapoly_Struct) {}
// no error.
fn2 :: proc(s: ^Parapoly_Struct) {}
// Error: 's' of type '^Parapoly_Struct' has no field 'entry'
fn3 :: proc(s: ^Parapoly_Struct) {
s.entry = s.entry
}
main :: proc() {
s: Parapoly_Struct(int)
fn1(s)
fn2(&s)
fn3(&s)
}
Current behavior:
Procedures
fn*
don't specify the specialization of the parapoly struct.fn1
reports on invalid signature, as expected.fn2
works.fn3
gives an error when using the argument.(Error messages in code snippet)
Expected behavior:
The signature
proc(s: ^Parapoly_Struct)
offn2
andfn3
should report on invalid signature likefn1
does.#1079 might be related.
Operating System & Odin Version:
Odin: dev-2023-11:cabaac5a
OS: Ubuntu 22.04.3 LTS, Linux 6.2.0-37-generic
CPU: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
RAM: 15747 MiB
The text was updated successfully, but these errors were encountered: