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

Repl compiler calls NoSymbol.owner #5657

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

Repl compiler calls NoSymbol.owner #5657

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

Comments

@scabug
Copy link

scabug commented Apr 11, 2012

scala> (List(1,2), List("a", "b"), List("c", "d")).zipped.map((x,y,z) => (y,x,z))
res0: List[(String, Int, String)] = List((a,1,c), (b,2,d))

scala> (List(1,2), List("a", "b"), List("c", "d")).zipped.map(_._1)
<console>:8: error: wrong number of parameters; expected = 3
              (List(1,2), List("a", "b"), List("c", "d")).zipped.map(_._1)
                                                                       ^
error: no-symbol does not have an owner (this is a bug: scala version 2.10.0-20120411-064552-c80d4afa1f)

The compiler correctly shows the error:

$ cat Test.scala
object Test extends App {
  println((List(1,2), List("a", "b"), List("c", "d")).zipped.map(_._1))
}
$ scalac Test.scala 
Test.scala:2: error: wrong number of parameters; expected = 3
  println((List(1,2), List("a", "b"), List("c", "d")).zipped.map(_._1))
                                                                   ^
one error found

PS: Don't mind the git hash that isn't in trunk yet, I was working on scaladoc.

@scabug
Copy link
Author

scabug commented Apr 11, 2012

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

@scabug
Copy link
Author

scabug commented Apr 12, 2012

@paulp said:
Sadly this has been inflicted upon me by the compiler, which used to throw errors where I could catch them but now reports them before I get a chance.

@scabug
Copy link
Author

scabug commented Apr 23, 2012

@kzys said:
Fixed?

% ./build/pack/bin/scala
Welcome to Scala version 2.10.0-20120422-061223-8c95273b70 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_31).
Type in expressions to have them evaluated.
Type :help for more information.

scala> (List(1,2), List("a", "b"), List("c", "d")).zipped.map((x,y,z) => (y,x,z))
res0: List[(String, Int, String)] = List((a,1,c), (b,2,d))

scala> (List(1,2), List("a", "b"), List("c", "d")).zipped.map(_._1)
<console>:8: error: wrong number of parameters; expected = 3
              (List(1,2), List("a", "b"), List("c", "d")).zipped.map(_._1)
                                                                       ^

scala> 

@scabug scabug closed this as completed May 2, 2012
@scabug
Copy link
Author

scabug commented May 2, 2012

@VladUreche said:
Guess so, if trunk works fine.

@scabug scabug added the quickfix label Apr 7, 2017
@scabug scabug added this to the 2.10.0-M2 milestone Apr 7, 2017
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

No branches or pull requests

2 participants