Skip to content

Commit

Permalink
Fix #45. Add coercion of LambdaExpression to functional interface
Browse files Browse the repository at this point in the history
No changes required to the implementation API.
Changes will be required to the TCK.
  • Loading branch information
markt-asf committed Sep 6, 2021
1 parent 0793096 commit bcd0eeb
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions spec/src/main/asciidoc/ELSpec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,19 @@ primitive type `boolean`, return `null`
* If `A` is a `String` call `Enum.valueOf(T.getClass(), A)` and return
the result

==== Coerce `A` to functional interface method invocation

* If `A` is a `LambdaExpression` then:

** Return the result of invoking the `LambdaExpression` with the parameters
(coerced if necessary) that were passed to the Functional Interface method
invocation

* Otherwise, apply the rules in <<Coerce `A` to Any Other Type `T`>>

Note: A Type is only considered to be a functional interface it it is annotated
with `java.lang.FunctionalInterface`.

==== Coerce `A` to Any Other Type `T`

* If `A` is `null`, return `null`
Expand Down

0 comments on commit bcd0eeb

Please sign in to comment.