Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system.insert does not work with strings in VM #10561

gmengano opened this issue Feb 5, 2019 · 0 comments


None yet
3 participants
Copy link

commented Feb 5, 2019


# hello.nims
var str = " John"
system.insert(str, "Hello" , 0.Natural)
$ nim e hello.nims

Current Output

hello.nims(3, 14) Error: type mismatch: got <string, string, Natural>
but expected one of:
proc insert[T](x: var seq[T]; item: T; i = 0.Natural)
  first type mismatch at position: 1
  required type: var seq[T]
  but expression 'str' is of type: string

Expected Output

Hello John

Additional Information

$ nim -v
Nim Compiler Version 0.19.0 [Windows: amd64]

@LemonBoy LemonBoy added the VM label Feb 5, 2019

@Araq Araq added Stdlib Easy and removed VM labels Feb 5, 2019

@LemonBoy LemonBoy closed this in 1eaa18f Feb 15, 2019

LemonBoy added a commit that referenced this issue Feb 15, 2019

Merge pull request #10680 from narimiran/fix-10561
allow string insert in nimscript, fixes #10561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.