Calling split("") on string hangs program #5119

Closed
filipux opened this Issue Dec 13, 2016 · 2 comments

Projects

None yet

2 participants

@filipux
filipux commented Dec 13, 2016

In some languages calling split("") on a string will conveniently return a list of it's characters. For example, running "hello".split("") in javascript will return ["h", "e", "l", "l", "o"]

In nim, the same code will hang the program indefinitely.

Nim Compiler Version 0.15.2 (2016-10-22) [MacOSX: amd64]

@dom96
Member
dom96 commented Dec 13, 2016

Related discussion on the forum: http://forum.nim-lang.org/t/2348/1

@dom96 dom96 added the Stdlib label Dec 13, 2016
@dom96
Member
dom96 commented Dec 13, 2016

As mentioned in the forum this should raise an error just like in Python.

@dom96 dom96 added the Easy label Dec 13, 2016
@chrisheller chrisheller added a commit to chrisheller/Nim that referenced this issue Dec 22, 2016
@chrisheller chrisheller Revert commits that were for #5119 from fix for #5120 479361e
@Araq Araq closed this in 40d034b Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment