Skip to content

Fix type inferencing and syntax highlighting for anon. inner in with block #927

@eric-milles

Description

@eric-milles

Consider the following:

void meth() {
  org.xml.sax.helpers.XMLReaderFactory.createXMLReader().with {
    contentHandler = new org.xml.sax.helpers.DefaultHandler() {
      private Stack<StringBuilder> chars = []

      @Override
      void characters(char[] text, int offset, int length)
      {
        if (chars) chars.peek().append(text, offset, length)
      }
    }
  }
}

The variable expressions "chars" within the "characters" method are showing as unknown (underlined).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions