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

Error in Collection>>flatCollect: b as: String #2845

Closed
MarcusDenker opened this issue Mar 16, 2019 · 1 comment · Fixed by #4594
Closed

Error in Collection>>flatCollect: b as: String #2845

MarcusDenker opened this issue Mar 16, 2019 · 1 comment · Fixed by #4594

Comments

@MarcusDenker
Copy link
Member

From FogBugz: https://pharo.fogbugz.com/f/cases/21690/Error-in-Collection-flatCollect-b-as-String

This code seems to be misbehaving in Pharo 6.1:

#(foo bar baz) flatCollect: #yourself as: String

I had expected the result to be 'foobarbaz' but I see an error:

ShouldNotImplement: #add: should not have been implemented in ByteString

@stale
Copy link

stale bot commented Sep 12, 2019

To limit bug bankruptcy (see https://www.joelonsoftware.com/2012/07/09/software-inventory/) this issue has been automatically marked as stale because it has not had any activity in 6 months. It will be closed in 1 month if no further activity occurs. If this issue remains important to you, please comment to reactivate the issue. Thank you for your contributions.

Joel on Software
Imagine, for a moment, that you came upon a bread factory for the first time. At first it just looks like a jumble of incomprehensible machinery with a few people buzzing around. As your eyes adjus…

@stale stale bot added the stale label Sep 12, 2019
kasperosterbye added a commit to kasperosterbye/pharo that referenced this issue Sep 13, 2019
The reason for the error  is that the method `#flatCollect:as:` inserts elements into the collection type given as second argument. String is immutable, so that is not possible.
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 a pull request may close this issue.

1 participant