Add a check for binding an alias. Good thing, as we had two instances in our library.
This commit is contained in:
parent
c5720b2fc4
commit
3e9be14757
4 changed files with 35 additions and 2 deletions
|
|
@ -139,7 +139,7 @@ impure fn set(&t v, uint i, bool x) {
|
|||
}
|
||||
}
|
||||
|
||||
fn init_to_vec(&t v, uint i) -> uint {
|
||||
fn init_to_vec(t v, uint i) -> uint {
|
||||
if (get(v, i)) {
|
||||
ret 1u;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ fn create[T]() -> t[T] {
|
|||
check (nelts == _vec.len[cell[T]](elts));
|
||||
|
||||
fn fill[T](uint i, uint nelts, uint lo,
|
||||
&vec[cell[T]] old) -> cell[T] {
|
||||
vec[cell[T]] old) -> cell[T] {
|
||||
if (i < nelts) {
|
||||
ret old.((lo + i) % nelts);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue