~mna/snow

snow/pkg/semantic/testdata/generic_struct_instantiation.snow -rw-r--r-- 180 bytes
424066c5Martin Angers doc: v0.0.5 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
# TODO: a more complex case would be if var x was ($T) -> $T, or a generic inner struct.
struct G[$T] {
  var x: $T
}

fn main() {
  let g1 = G [int] (x: 1)
  let g2: G [string]
}