Closed WoodyAtHome closed 2 years ago
The problem is in the generated code for .any(). Changing the example to:
for x in alarms.times {
if x == alarm {
return
}
}
instead of:
if alarms.times.any(it == alarm) {
return
}
compiles fine.
#1 12:29:43 ᛋ master /v/vnew❱colordiff /tmp/v_1000/ss.tmp.c /tmp/v_1000/ss.8248969718819491200.tmp.c
17009c17009
< int _t1_len = _t1_orig.len;
---
> int _t1_len = _t1_orig->val.len;
17011c17011
< time__Time it = ((time__Time*) _t1_orig.data)[_t2];
---
> time__Time it = ((time__Time*) _t1_orig->val.data)[_t2];
^ these changes in the generated code for any() make it compile
Should be fixed in 1c6366e .
What did you do? v -g -o vdbg cmd/v && vdbg shared.v
What did you expect to see? a compile error in line 11, because alarms is not locked
What did you see instead?