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 :javap -fun broken under -Ydelambdafy:method #8898

Closed
scabug opened this issue Oct 10, 2014 · 2 comments
Closed

REPL :javap -fun broken under -Ydelambdafy:method #8898

scabug opened this issue Oct 10, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@scabug
Copy link

scabug commented Oct 10, 2014

The :javap -fun C command shows the content of (some?) anonymous function declared in C, except for C itself. Its implementation assumes "anonfun" to be found in the class name, which is no longer true since scala/scala@63207e1.

luc$ qs -Ydelambdafy:method
Welcome to Scala version 2.11.3-20141010-082147-3e0164d7be (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_65).
Type in expressions to have them evaluated.
Type :help for more information.

scala> class C { def f = List(1).map(_ + 1) }
defined class C

scala> :javap -fun C
Failed: No anonfuns found.
@scabug
Copy link
Author

scabug commented Oct 10, 2014

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

@scabug
Copy link
Author

scabug commented Oct 20, 2014

@som-snytt said:
An approximation, perhaps.

scala/scala#4069

The feature intends to save the user from drilling down into closure implementations. For -Ydelambdafy:inline, it examines the anonfun classes for C. For method, it looks at lamba classes and follows the invokestatic of accessors to select the anonfun methods of C.

So -fun C selects all closures in C, -fun C#f closures in method f.

@scabug scabug closed this as completed Nov 5, 2014
@scabug scabug added this to the 2.11.5 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants