8000 HashMap toString doc is Any not Iterable · Issue #13099 · scala/bug · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
HashMap toString doc is Any not Iterable #13099
Open
@som-snytt

Description

@som-snytt

Questions are not bug reports

This may be a queston?

Reproduction steps

Scala version: 2 & 3

scala> m.toString
val res2: String = HashMap(5 -> 6, 1 -> 2, 9 -> 10, 7 -> 8, 3 -> 4)

Problem

Explain how the above behavior isn't what you expected.

Doc for Map#toString shows doc for Any, not for Iterable. Same for all collection types extending Function, which has an override for toString.

Cf View#toString.

Maybe it's just a quirk of linearization, but it's clearly not something I should have to ponder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0