omni icon indicating copy to clipboard operation
omni copied to clipboard

Make generics work for any type

Open vitreo12 opened this issue 4 years ago • 2 comments

struct Blah:
    x

struct Something[T]:
    a T

init:
   something = Something(Blah()) #Something[Blah]
   something = Something(0) #Something[int]

Is it really necessary, considering that Data already work with this?

vitreo12 avatar Apr 06 '20 19:04 vitreo12

Related to #1

vitreo12 avatar Apr 20 '20 11:04 vitreo12

This can easily be solved by taking the same approach that has been taken for Datas in #67

vitreo12 avatar Apr 23 '20 17:04 vitreo12