Odin icon indicating copy to clipboard operation
Odin copied to clipboard

parametric struct from another package can be written without specialization on parameter decl

Open awwdev opened this issue 3 years ago • 1 comments

Odin dev-2021-08:0e84e067

Foo :: struct (T: typeid) {};
bar :: proc   (foo: Foo)  {} //wrong syntax

here the compiler will error out on the declaration, which is expected Invalid use of a non-specialized polymorphic type 'Foo'

however - if you move Foo into a different package, then it will compile fine

package bug
Foo :: struct (T: typeid) {};

package main
bar :: proc(foo: bug.Foo) {}  //wrong syntax

bug.Foo is invalid syntax since it should require specialization

awwdev avatar Aug 15 '21 16:08 awwdev

Hello!

I am marking this issue as stale as it has not received any engagement from the community or maintainers 120 days. That does not imply that the issue has no merit! If you feel strongly about this issue

  • open a PR referencing and resolving the issue;
  • leave a comment on it and discuss ideas how you could contribute towards resolving it;
  • leave a comment and describe in detail why this issue is critical for your use case;
  • open a new issue with updated details and a plan on resolving the issue.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone..

github-actions[bot] avatar Jul 24 '22 21:07 github-actions[bot]

Still a problem in dev-2022-12:1d6f7680. Please reopen.

awwdev avatar Dec 25 '22 17:12 awwdev

Reproducable in dev-2024-07:1770e3a9a

flysand7 avatar Jul 12 '24 08:07 flysand7