summaryrefslogtreecommitdiff
path: root/test/files/neg/sammy_error_exist_no_crash.scala
Commit message (Collapse)AuthorAgeFilesLines
* Additional SAM restrictions identified by JasonAdriaan Moors2016-03-261-2/+2
| | | | | Also test roundtripping serialization of a lambda that targets a SAM that's not FunctionN (it should make no difference).
* [sammy] use correct type for method to overrideAdriaan Moors2014-11-071-0/+6
Don't naively derive types for the single method's signature from the provided function's type, as it may be a subtype of the method's MethodType. Instead, once the sam class type is fully defined, determine the sam's info as seen from the class's type, and use those to generate the correct override. ``` scala> Arrays.stream(Array(1, 2, 3)).map(n => 2 * n + 1).average.ifPresent(println) 5.0 scala> IntStream.range(1, 4).forEach(println) 1 2 3 ``` Also, minimal error reporting Can't figure out how to do it properly, but some reporting is better than crashing. Right? Test case that illustrates necessity of the clumsy stop gap `if (block exists (_.isErroneous))` enclosed as `sammy_error_exist_no_crash` added TODO for repeated and by-name params