Skip to content

Does not get type of casted assignment value correctly for implicit declaration assignments #399

Open
@BSteffaniak

Description

@BSteffaniak
targetMap.forEach((pair) => {
  if (!map.containsKey(pair.key)) {
    map[pair.key] = pair.value
  }

  if (pair.value.class?.isOfType(HashMap.class)) {
    let hashmap = (HashMap)pair.value // right here
    hashmap.forEach({ map[pair.key].add(_) })
  } else {
    map[pair.key] = pair.value
  }
})

But this parses the type correctly:
let HashMap<String, Object> hashmap = (HashMap)pair.value

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions