void () { doTestByText( """ import pathlib import os def foo(p: pathlib.Path): with open(p) as file: pass p1: pathlib.Path p2: os.PathLike[bytes] = <warning descr="Expected type 'PathLike[bytes]', got 'Path' instead">p1</warning> p3: os.PathLike[str] = p1""" ); }