FlatLang / Flat

(Deprecated) Soon-to-be legacy Flat compiler all in one
6 stars 0 forks source link

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

Open BSteffaniak opened 2 years ago

BSteffaniak commented 2 years ago
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