Skip to content

Commit

Permalink
jakt: Fix signature of default example's main (#4522)
Browse files Browse the repository at this point in the history
And make sure to cast the i32 to a c_int from the example function.
  • Loading branch information
ADKaster authored and mattgodbolt committed Jan 24, 2023
1 parent 908890b commit 127f9b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/jakt/default.jakt
Expand Up @@ -2,6 +2,6 @@ function square(num: i32) -> i32 {
return num * num
}

function main() {
return square(num: 3)
function main() throws -> c_int {
return square(num: 3) as! c_int
}

0 comments on commit 127f9b5

Please sign in to comment.