njit-jerse / specimin

SPECIfication MINimizer. A different kind of slicer for Java.
MIT License
3 stars 5 forks source link

Avoid crash when encountering lambda param #227

Closed kelloggm closed 6 months ago

kelloggm commented 6 months ago

Locally, this fixed the proximate cause of the cf-3032 crash. However, there is another crash hiding behind this one, it seems:

Exception in thread "main" java.lang.RuntimeException: Error calculating the type of parameter BillingEvent::getInvoiceGroupingKey of method call MapElements.into(TypeDescriptor.of(InvoiceGroupingKey.class)).via(BillingEvent::getInvoiceGroupingKey)
    at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.solveMethodAsUsage(JavaParserFacade.java:751)
    at com.github.javaparser.symbolsolver.javaparsermodel.contexts.MethodReferenceExprContext.inferArgumentTypes(MethodReferenceExprContext.java:108)
    at com.github.javaparser.symbolsolver.javaparsermodel.contexts.MethodReferenceExprContext.solveMethod(MethodReferenceExprContext.java:72)
    at com.github.javaparser.symbolsolver.javaparsermodel.JavaParserFacade.solve(JavaParserFacade.java:337)
cf-3032 - FAIL

Still, this is progress towards handling this example, and these changes solve the test cases that I wrote.