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 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

This comment has been minimized.

Copy link
Author

@scabug scabug commented Apr 11, 2012

@scabug

This comment has been minimized.

Copy link
Author

@scabug 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

This comment has been minimized.

Copy link
Author

@scabug 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 May 2, 2012
@scabug

This comment has been minimized.

Copy link
Author

@scabug 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.