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

Implicitly available collection methods are ignored for certain element types #4509

Closed
scabug opened this issue Apr 24, 2011 · 3 comments
Closed
Assignees

Comments

@scabug
Copy link

scabug commented Apr 24, 2011

=== What steps will reproduce the problem? ===

class No {
  val ano = new Array[Nothing](5)
  val anu = new Array[Null](5)
  val ans = new Array[String](5)
}

val no = new No
no.ano.map(_ => 42)
no.anu.map(_ => 42)
no.ans.map(_ => 42)

=== What is the expected behavior? ===

res0: Array[Int] = Array(42, 42, 42, 42, 42)
res1: Array[Int] = Array(42, 42, 42, 42, 42)
res2: Array[Int] = Array(42, 42, 42, 42, 42)

=== What do you see instead? ===

<console>:25: error: value map is not a member of Array[Nothing]
       no.ano.map(_ => 42)
              ^
res1: Array[Int] = Array(42, 42, 42, 42, 42)
res2: Array[Int] = Array(42, 42, 42, 42, 42)

=== What versions of the following are you using? ===

  • Scala: 2.10.0.r24736-b20110412020139
@scabug
Copy link
Author

scabug commented Apr 24, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4509?orig=1
Reporter: @soc

@scabug
Copy link
Author

scabug commented May 3, 2011

@lindydonna said:
Duplicate.

@scabug
Copy link
Author

scabug commented May 3, 2011

@adriaanm said:
probably duplicate of #1570

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