added return statement
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// adds a and b, but also 4 for some reason
|
||||
fn add(a: I32, b: I32): I32 {
|
||||
let foo = 4;
|
||||
let foo = 4; // because I feel like it
|
||||
let test_float: F32 = {
|
||||
10.2
|
||||
};
|
||||
@@ -11,6 +11,18 @@ fn subtract(a: I32, b: I32): I32 {
|
||||
a - b
|
||||
}
|
||||
|
||||
fn return_type_test(a: F64): F64 {
|
||||
return a * 2.0;
|
||||
}
|
||||
|
||||
fn i_hate_this(a: F64): F64 {
|
||||
return {
|
||||
return {
|
||||
return a;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
fn main(): I32 {
|
||||
add(4, subtract(5, 2))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user