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

extends Function1 for convenience and 2.5.x compatibility #57

Merged
merged 1 commit into from Mar 25, 2017

Conversation

xuwei-k
Copy link
Contributor

@xuwei-k xuwei-k commented Mar 24, 2017

2.5.x

val foo: Option[Seq[JsValue]] = None
foo.map(JsArray) // success

2.6.0-M6

val foo: Option[Seq[JsValue]] = None
foo.map(JsArray) // compile error
foo.map(JsArray(_)) // need (_)

http://stackoverflow.com/a/3054165

2.5.x

```
val foo: Option[Seq[JsValue]] = None
foo.map(JsArray) // success
```

2.6.0-M6

```
val foo: Option[Seq[JsValue]] = None
foo.map(JsArray) // compile error
foo.map(JsArray(_)) // need (_)
```

http://stackoverflow.com/a/3054165
@cchantep cchantep merged commit 0807367 into playframework:master Mar 25, 2017
@xuwei-k xuwei-k deleted the extends-Function1 branch March 25, 2017 11:55
@gmethvin
Copy link
Member

gmethvin commented Apr 5, 2017

@xuwei-k I'm ok with adding the functionality, but I'd prefer if we extend Function1 instead of AbstractFunction1 since scala.runtime is considered internal.

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

Successfully merging this pull request may close these issues.

None yet

3 participants