Skip to content

Fix type inferencing and syntax highlighting for method call with static method call argument #1121

@eric-milles

Description

@eric-milles

Consider the following:

import org.codehaus.groovy.ast.ClassNode
import static java.lang.reflect.Modifier.*
import static org.codehaus.groovy.ast.ClassHelper.make
import static org.codehaus.groovy.ast.tools.GeneralUtils.*

void test(ClassNode node, String basename) {
  def field = node.addField(basename + 'suffix',
    FINAL | PRIVATE,
    make(Date),
    ctorX(make(Date))
  )
}

Type inferencing errors out at "ctorX(make(Date))" because it picks ClassHelper.make(Class[]): ClassNode[] and this prevents matching on GeneralUtils.ctorX(ClassNode).

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions