add range constraint type
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Milestone 5: ranges and sequence for loops.
|
||||
|
||||
pass :: func(value int) int {
|
||||
pass :: func(value range) range {
|
||||
return value
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
make_range :: func(calls @mut i32, end usize) int {
|
||||
make_range :: func(calls @mut i32, end usize) range {
|
||||
calls^ = calls^ + 1
|
||||
return 0..end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user