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

SeqView.addString returns "...". #5656

Closed
scabug opened this issue Apr 11, 2012 · 7 comments
Closed

SeqView.addString returns "...". #5656

scabug opened this issue Apr 11, 2012 · 7 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Apr 11, 2012

println(Seq(Array('1','2','3'), Array('a','b','c')).view.addString(new StringBuilder, "_"))

I expect it print "123_abc", but I got "...".

@scabug
Copy link
Author

scabug commented Apr 11, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5656?orig=1
Reporter: @Atry
Affected Versions: 2.9.1, 2.10.0-M2

@scabug
Copy link
Author

scabug commented Apr 11, 2012

@paulp said:
Surely it is apparent this behavior does not arise by accident. If you want the contents, force the view. (It still won't print 123_abc because it contains arrays, but that's not a bug either.)

@scabug
Copy link
Author

scabug commented Apr 11, 2012

@Atry said:
Only "transformer methods" have diffent behaviors, and addString is not a transformer method. "addString" should works as usual. See http://www.scala-lang.org/docu/files/collections-api/collections_42.html

@scabug
Copy link
Author

scabug commented Apr 12, 2012

@paulp said:
OK, since I don't whether that is true, reopening and assigning to reviewer.

@scabug
Copy link
Author

scabug commented May 3, 2012

@hubertp said:
Alex can you decide what is the correct behaviour, please?

@scabug
Copy link
Author

scabug commented May 4, 2012

@axel22 said:
I'm unsure why addString was overridden in ViewMkString to add ....
It does not seem consistent with the fact that mkString does force the view contents.

I would say that addString should force the view, just like mkString.

@scabug
Copy link
Author

scabug commented May 4, 2012

@axel22 said:
And I can't seem to find any place where forcing behaviour for addString would break existing code.

@scabug scabug closed this as completed May 4, 2012
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants