~mna/snow unlisted

ref: b80c93389bef70627bad6a5d2db7398350b0ef65 snow/pkg/compiler/testdata/codegen/fn_add.snow -rw-r--r-- 298 bytes
b80c9338Martin Angers cmd/internal: add packages for command-line 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# This is a minimal version of code that should run. It adds
# two numbers and prints the results using an extern Go
# function.

@extern{import: "fmt", symbol: "Println"}
fn println(v: int)

fn add(x: int, y: int) -> int {
  return x + y
}

fn main() {
  let res: int = add(1, 2)
  println(res)
}