mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 13:11:32 +00:00
fix a small bug with return values
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
func depth(i: int32) {
|
||||
if i <= 0 {
|
||||
return None
|
||||
}
|
||||
println("Depth: ", i)
|
||||
depth(i - 1)
|
||||
}
|
||||
|
||||
export func main() {
|
||||
@ -11,5 +15,19 @@ export func main() {
|
||||
true
|
||||
}
|
||||
|
||||
return println("uhm, bad")
|
||||
if true {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if false {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
depth(500)
|
||||
|
||||
println("uhm, bad")
|
||||
}
|
||||
|
Reference in New Issue
Block a user