Open BMJHayward opened 1 year ago
Can you try again using a fresh V version?
`v -version
V 0.3.2 46f1b20`
v -keepc -cg -showcc .
/home/brendan/code/v/vlib/rand/rand.v:345:30: error: unexpected token `[`, expecting `(`
343 | // shuffle all elements until the end.
344 | [direct_array_access]
345 | pub fn (mut rng PRNG) shuffle[T](mut a []T, config config.ShuffleConfigStruct) ! {
| ^
346 | config.validate_for(a)!
347 | new_end := if config.end == 0 { a.len } else { config.end }
and v up
gives:
cannot compile `/home/brendan/code/v/cmd/tools/vup.v`:
/home/brendan/code/v/vlib/os/file.c.v:591:32: error: unexpected token `[`, expecting `(`
589 |
590 | // read_struct reads a single struct of type `T`
591 | pub fn (mut f File) read_struct[T](mut t T) ! {
| ^
592 | if !f.is_opened {
593 | return error_file_not_opened()
Still a bit stuck
Is this still an issue with current V?
Describe the bug
v -keepc -cg -showcc .
on github.com/bmjhayward/vml with v -versionV 0.3.2 70bb989
gives the following:vml.tmp.c.tar.gz
Attached vml.tmp.c for reference.
Expected Behavior
I expected a clean compile, as with previous versions.
Current Behavior
Reproduction Steps
Run
v -keepc -cg -showcc .
on github.com/bmjhayward/vml with v -versionV 0.3.2 70bb989
gives the following:Possible Solution
Possible indexation error in the KMeans code in
kmean.v
Additional Information/Context
No response
V version
V 0.3.2 70bb989
Environment details (OS name and version, etc.)