groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Milles (JIRA)" <>
Subject [jira] [Created] (GROOVY-9079) STC: NPE in StaticTypeCheckingVisitor.inferSAMTypeGenericsInAssignment
Date Thu, 11 Apr 2019 21:18:00 GMT
Eric Milles created GROOVY-9079:

             Summary: STC: NPE in StaticTypeCheckingVisitor.inferSAMTypeGenericsInAssignment
                 Key: GROOVY-9079
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles

Consider the following:
void meth() {
  java.util.concurrent.Callable<String> call = { -> }

This code produces:
BUG! exception in phase 'instruction selection' in source unit 'Blah.groovy' unexpected NullpointerException
	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(
	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(
	at org.codehaus.groovy.control.CompilationUnit.compile(
Caused by: java.lang.NullPointerException

The method in StaticTypeCheckingVisitor calls ClosureExpression.getParameters(), which returns
null for a closure expression like "{ -> }".

This message was sent by Atlassian JIRA

View raw message