Skip to content

Fix compile error in circular buffer#280

Merged
keiravillekode merged 1 commit intoexercism:mainfrom
kahgoh:fix/circular-buffer
Oct 31, 2025
Merged

Fix compile error in circular buffer#280
keiravillekode merged 1 commit intoexercism:mainfrom
kahgoh:fix/circular-buffer

Conversation

@kahgoh
Copy link
Copy Markdown
Member

@kahgoh kahgoh commented Oct 31, 2025

Fixes the following compiler error due to a recent change in V:

  Error: temp/circular_buffer.v:20:20: error: cannot prepend `T` to `[]T`
     18 |         return error('Buffer is full')
     19 |     }
     20 |     b.content.prepend(value)
        |                       ~~~~~
     21 | }
     22 |
  Error: temp/circular_buffer.v:36:20: error: cannot prepend `T` to `[]T`
     34 |     }
     35 |
     36 |     b.content.prepend(value)
        |                       ~~~~~
     37 | }
     38 |
  checker summary: 2 V errors, 0 V warnings, 0 V notices

Resolves #277.

Fixes the following compiler error due to a recent change in V:

  Error: temp/circular_buffer.v:20:20: error: cannot prepend `T` to `[]T`
     18 |         return error('Buffer is full')
     19 |     }
     20 |     b.content.prepend(value)
        |                       ~~~~~
     21 | }
     22 |
  Error: temp/circular_buffer.v:36:20: error: cannot prepend `T` to `[]T`
     34 |     }
     35 |
     36 |     b.content.prepend(value)
        |                       ~~~~~
     37 | }
     38 |
  checker summary: 2 V errors, 0 V warnings, 0 V notices

Resolves exercism#277.
@keiravillekode keiravillekode merged commit 8f805f5 into exercism:main Oct 31, 2025
5 checks passed
@kahgoh kahgoh deleted the fix/circular-buffer branch November 1, 2025 01:22
kahgoh added a commit to kahgoh/exercism-vlang that referenced this pull request Nov 2, 2025
This reverts commit 8f805f5.

Just received notification that this has been fixed in the V compiler
(see vlang/v#25645).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI failure on circular buffer

2 participants