The following snippet fails with `5: error: Invalid type "T"` with mypy 0.501 on Python 3.5.2. ``` from typing import List, Optional T = Optional[int] Ts = [] # type: List[T] ``` This is similar to #1637 and was originally discussed there.