~mna/snow

snow/pkg/semantic/testdata/fn_generic_unused_in_signature.snow -rw-r--r-- 344 bytes
424066c5Martin Angers doc: v0.0.5 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
fn g1[$T, $U](v: int) -> int {
  let a: $T 
  let b: $U
  return 1
}

fn g2[$T, $U](v: $T) -> $T {
  let a: $T 
  let b: $U
  return a
}

fn g3[$T](v: int) -> $T {
  let a: $T
  return a
}

fn g4[$T, $U](v: $T) -> $U {
  let a: $T 
  let b: $U
  return b
}

fn g5[$T](v: $U) -> $T {
  let a: $T
  return a
}

fn main() {
  g3[int, string](1)
}