V version: 0.1.26
OS: Fedora 31
I'm getting an error trying to declare a generic struct. Could be related to the work being done with the AST as the code below gives no error in the playground.
Let me know if I am doing something wrong.
module main
pub struct Generic<T> {
pub mut:
t T
}
fn main() {
t := Generic<int>{}
}
$ v main.v
main.v:3:12: error: `Generic` lacks body
1| module main
2|
3| pub struct Generic<T> {
~~~~~~~
4| pub mut:
5| t T
not yet implemented
Please raise the priority. Many functions are restricted and cannot be compiled and run.
Agree, priority should be raised, really needed.
in need too!
Hope the problem could be solved earlier
This is being worked on.
This works now
module main
struct Generic<T> {
pub mut:
t T
}
fn main() {
t := Generic<int>{}
}
Though it will give some warnings, to suppress that use_ instead of t.