Skip to content

Fix type inferencing and syntax highlighting for switch with class cases #1056

@eric-milles

Description

@eric-milles

Consider the following:

void test(something) {
  switch (something) {
   case Class.class:
    something.canonicalName
    break
   case File:
    something.canonicalPath
    break
   default:
    something.toString()
  }
}

"canonicalName" and "canonicalPath" are shown as unknown (underlined). Their type could be inferred from each CaseStatement with ClassExpression test.

image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions