Skip to content

Consider reporting mixed type inference #845

@muglug

Description

@muglug

Would help diagnose errors in analysis (e.g. #747) and prevent gaps in codebase type coverage that could lead to errors.

So, for example, this would be an issue:

function foo(array $arr) : void {
  foreach ($arr as $a) { // issue on assignment here
    $a->bar(); // issue on method call here
  }
}

as would

/** @return int[] */
function foo(array $arr) : array {
  return $arr; // issue on more generic return type
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions