title: Mypy error - incompatible types in assignment
body: <p>My function looks like this simplified code sample:</p>
  
  <pre><code>def my_func() -&gt; dict:
      result = {"success": False}
  
      if condition:
          result["success"] = True
          return result
      else:
          result["message"] = "error message"
      return result
  </code></pre>
  
  <p>When I run Mypy (version 0.52) I get this error:</p>
  
  <pre><code>error: Incompatible types in assignment (expression has type "str", target has type "bool")
  </code></pre>
  
  <p>and the error is pointing to the second last line in my code sample.
  Why mypy is returning this error? is my code invalid (in any way) or is this some mypy bug?</p>