Paul King created GROOVY-12836:
----------------------------------

             Summary: Compile lambdas and method references with a 
functional-interface target as native lambdas
                 Key: GROOVY-12836
                 URL: https://issues.apache.org/jira/browse/GROOVY-12836
             Project: Groovy
          Issue Type: Improvement
          Components: Static compilation
            Reporter: Paul King


Under @CompileStatic, a lambda or method reference written for a type-parameter 
slot (list.add(s -> s.trim()), list << String::trim), a conditional argument, a 
list or map literal, or a generic call such as Optional.of(String::trim) is 
stored as a closure or rejected. Compile it as a native lambda, as javac does, 
with the call's target type taken from its context. Breaking for statically 
compiled code that hands such values to dynamic code; see GEP-34 and PR #3364.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to