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

Synthesize SAM from match-defined function literal #8429

Closed
scabug opened this issue Mar 19, 2014 · 5 comments
Closed

Synthesize SAM from match-defined function literal #8429

scabug opened this issue Mar 19, 2014 · 5 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Mar 19, 2014

Under -Xexperimental i get the following compilation error.

public interface Must {
  void musta(String str, int i);
}
object Mustare {
  def takesM(m: Must) = ???
  takesM{ (a, b) => println } // compiles 
  takesM{  
     case (a: String, b: Int) => println("")
  }
}

error: missing parameter type for expanded function
The argument types of an anonymous function must be fully known. (SLS 8.5)
Expected type was: Must
takesM{
^
one error found

@scabug
Copy link
Author

scabug commented Mar 19, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8429?orig=1
Reporter: Raul Bache (arneball)
Affected Versions: 2.11.0-RC1

@scabug
Copy link
Author

scabug commented Mar 19, 2014

@retronym said:
Adriaan: I'm not sure whether we should support this or not. I can see the utility, but I think our SAM impl is approaching its complexity budget. Whatever you decide, we should mention patmat anon funs explicitly in the SIP

@scabug
Copy link
Author

scabug commented Nov 4, 2014

@retronym said:
Reassinging to 2.11.5, 2.11.4 has already been released.

@scabug
Copy link
Author

scabug commented Jan 20, 2016

@adriaanm said:
I think we should support this. It's an easy fix (both code & spec). WIP: https://github.com/scala/scala/compare/2.11.x...adriaanm:t8429?expand=1

@scabug
Copy link
Author

scabug commented Feb 17, 2016

@lrytz said:
scala/scala#4945

@scabug scabug closed this as completed May 25, 2016
@scabug scabug added the quickfix label Apr 7, 2017
@scabug scabug added this to the 2.12.0-M4 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