GenericType<|T|> :: struct {
field: T
}
NonGenericAlias :: GenericType<|i32|>
fn main() {
non_generic :: NonGenericAlias {
// We currently get an error here because the compiler doesn't know this field should have the type `i32`
field: 42
}
}
Note that the problem here is the alias (hence the name of this issue). That is, if we replace the use of NonGenericAlias in the struct literal with GenericType<|i32|>, this code will work fine.
This should be supported, but currently isn't:
Note that the problem here is the alias (hence the name of this issue). That is, if we replace the use of
NonGenericAlias
in the struct literal withGenericType<|i32|>
, this code will work fine.